From 9bd063bfdaa578f49c04fbf2e933f2c7cf84f461 Mon Sep 17 00:00:00 2001 From: temandr Date: Mon, 18 Jun 2018 11:50:22 -0700 Subject: [PATCH 01/11] Added functionality for Data Migration Assistant --- src/datamigration/README.rst | 7 + src/datamigration/azext_dms/__init__.py | 31 + .../azext_dms/_client_factory.py | 15 + src/datamigration/azext_dms/_help.py | 140 +++ src/datamigration/azext_dms/_params.py | 21 + src/datamigration/azext_dms/commands.py | 28 + src/datamigration/azext_dms/custom.py | 225 ++++ src/datamigration/azext_dms/mgmt/__init__.py | 1 + .../azext_dms/mgmt/datamigration/__init__.py | 18 + .../data_migration_service_client.py | 106 ++ .../mgmt/datamigration/models/__init__.py | 428 +++++++ .../mgmt/datamigration/models/api_error.py | 41 + .../models/available_service_sku.py | 37 + .../models/available_service_sku_capacity.py | 42 + .../models/available_service_sku_paged.py | 27 + .../models/available_service_sku_sku.py | 41 + .../mgmt/datamigration/models/blob_share.py | 32 + .../models/command_properties.py | 55 + .../connect_to_source_my_sql_task_input.py | 49 + ...onnect_to_source_my_sql_task_properties.py | 65 + .../connect_to_source_non_sql_task_output.py | 57 + .../connect_to_source_oracle_task_input.py | 43 + ...onnect_to_source_oracle_task_properties.py | 65 + ...connect_to_source_sql_server_task_input.py | 55 + ...onnect_to_source_sql_server_task_output.py | 51 + ..._sql_server_task_output_agent_job_level.py | 79 ++ ...e_sql_server_task_output_database_level.py | 73 ++ ...urce_sql_server_task_output_login_level.py | 69 ++ ...ource_sql_server_task_output_task_level.py | 72 ++ ...ct_to_source_sql_server_task_properties.py | 66 + ...o_target_azure_db_for_my_sql_task_input.py | 42 + ..._target_azure_db_for_my_sql_task_output.py | 57 + ...get_azure_db_for_my_sql_task_properties.py | 66 + .../connect_to_target_sql_db_task_input.py | 34 + .../connect_to_target_sql_db_task_output.py | 52 + ...onnect_to_target_sql_db_task_properties.py | 66 + .../connect_to_target_sql_mi_task_input.py | 35 + .../connect_to_target_sql_mi_task_output.py | 62 + ...onnect_to_target_sql_mi_task_properties.py | 66 + ...connect_to_target_sql_server_task_input.py | 35 + ...onnect_to_target_sql_server_task_output.py | 62 + ...ct_to_target_sql_server_task_properties.py | 66 + .../datamigration/models/connection_info.py | 48 + .../data_integrity_validation_result.py | 34 + .../data_item_migration_summary_result.py | 78 ++ .../models/data_migration_error.py | 39 + .../models/data_migration_project_metadata.py | 72 ++ .../models/data_migration_service.py | 82 ++ .../data_migration_service_client_enums.py | 332 +++++ .../models/data_migration_service_paged.py | 27 + .../data_migration_service_status_response.py | 43 + .../mgmt/datamigration/models/database.py | 100 ++ .../models/database_file_info.py | 53 + .../models/database_file_input.py | 45 + .../datamigration/models/database_info.py | 32 + .../models/database_object_name.py | 51 + .../models/database_summary_result.py | 74 ++ .../datamigration/models/database_table.py | 40 + .../models/execution_statistics.py | 51 + .../mgmt/datamigration/models/file_share.py | 41 + ..._project_details_my_sql_sql_task_output.py | 42 + ...ject_details_my_sql_sql_task_properties.py | 66 + .../get_project_details_non_sql_task_input.py | 38 + ..._project_details_oracle_sql_task_output.py | 42 + ...ject_details_oracle_sql_task_properties.py | 66 + .../models/get_user_tables_sql_task_input.py | 38 + .../models/get_user_tables_sql_task_output.py | 48 + .../get_user_tables_sql_task_properties.py | 65 + ...azure_db_for_my_sql_sync_database_input.py | 43 + ...sql_azure_db_for_my_sql_sync_task_input.py | 47 + ...ql_azure_db_for_my_sql_sync_task_output.py | 52 + ..._my_sql_sync_task_output_database_error.py | 48 + ..._my_sql_sync_task_output_database_level.py | 119 ++ ...re_db_for_my_sql_sync_task_output_error.py | 44 + ...my_sql_sync_task_output_migration_level.py | 76 ++ ...for_my_sql_sync_task_output_table_level.py | 112 ++ ...zure_db_for_my_sql_sync_task_properties.py | 66 + .../models/migrate_my_sql_sql_task_input.py | 57 + .../models/migrate_my_sql_sql_task_output.py | 57 + .../migrate_my_sql_sql_task_properties.py | 65 + .../models/migrate_oracle_sql_task_input.py | 57 + .../models/migrate_oracle_sql_task_output.py | 57 + .../migrate_oracle_sql_task_properties.py | 65 + ..._db_for_postgre_sql_sync_database_input.py | 43 + ...zure_db_for_postgre_sql_sync_task_input.py | 48 + ...ure_db_for_postgre_sql_sync_task_output.py | 53 + ...gre_sql_sync_task_output_database_error.py | 48 + ...gre_sql_sync_task_output_database_level.py | 119 ++ ..._for_postgre_sql_sync_task_output_error.py | 44 + ...re_sql_sync_task_output_migration_level.py | 76 ++ ...ostgre_sql_sync_task_output_table_level.py | 112 ++ ...db_for_postgre_sql_sync_task_properties.py | 66 + ...igrate_sql_server_sql_db_database_input.py | 43 + ...grate_sql_server_sql_db_sync_task_input.py | 44 + ...rate_sql_server_sql_db_sync_task_output.py | 52 + ..._sql_db_sync_task_output_database_error.py | 48 + ..._sql_db_sync_task_output_database_level.py | 119 ++ ...ql_server_sql_db_sync_task_output_error.py | 44 + ...sql_db_sync_task_output_migration_level.py | 76 ++ ...ver_sql_db_sync_task_output_table_level.py | 112 ++ ..._sql_server_sql_db_sync_task_properties.py | 66 + .../migrate_sql_server_sql_db_task_input.py | 59 + .../migrate_sql_server_sql_db_task_output.py | 51 + ...erver_sql_db_task_output_database_level.py | 118 ++ ...ate_sql_server_sql_db_task_output_error.py | 44 + ...rver_sql_db_task_output_migration_level.py | 121 ++ ...l_server_sql_db_task_output_table_level.py | 87 ++ ...grate_sql_server_sql_db_task_properties.py | 66 + ...igrate_sql_server_sql_mi_database_input.py | 43 + .../migrate_sql_server_sql_mi_task_input.py | 63 + .../migrate_sql_server_sql_mi_task_output.py | 52 + ...rver_sql_mi_task_output_agent_job_level.py | 76 ++ ...erver_sql_mi_task_output_database_level.py | 83 ++ ...ate_sql_server_sql_mi_task_output_error.py | 44 + ...l_server_sql_mi_task_output_login_level.py | 81 ++ ...rver_sql_mi_task_output_migration_level.py | 121 ++ ...grate_sql_server_sql_mi_task_properties.py | 66 + ...te_sql_server_sql_server_database_input.py | 41 + ...igrate_sql_server_sql_server_task_input.py | 43 + ...grate_sql_server_sql_server_task_output.py | 50 + ...r_sql_server_task_output_database_level.py | 101 ++ ...sql_server_sql_server_task_output_error.py | 44 + ..._sql_server_task_output_migration_level.py | 111 ++ ...e_sql_server_sql_server_task_properties.py | 66 + .../migrate_sync_complete_command_input.py | 36 + .../migrate_sync_complete_command_output.py | 28 + ...igrate_sync_complete_command_properties.py | 56 + .../models/migration_eligibility_info.py | 42 + .../models/migration_report_result.py | 33 + .../models/migration_table_metadata.py | 40 + ...ration_validation_database_level_result.py | 88 ++ ...tion_validation_database_summary_result.py | 67 + .../models/migration_validation_options.py | 42 + .../models/migration_validation_result.py | 53 + .../models/my_sql_connection_info.py | 48 + .../my_sql_data_migration_project_metadata.py | 53 + .../models/name_availability_request.py | 32 + .../models/name_availability_response.py | 40 + .../models/non_sql_data_migration_table.py | 28 + .../non_sql_data_migration_table_result.py | 68 ++ .../models/non_sql_migration_task_input.py | 55 + .../models/non_sql_migration_task_output.py | 75 ++ .../mgmt/datamigration/models/odata_error.py | 37 + .../models/oracle_connection_info.py | 61 + .../oracle_data_migration_project_metadata.py | 69 ++ .../models/postgre_sql_connection_info.py | 52 + .../mgmt/datamigration/models/project.py | 96 ++ .../models/project_artifacts_response.py | 33 + .../datamigration/models/project_paged.py | 27 + .../mgmt/datamigration/models/project_task.py | 50 + .../models/project_task_paged.py | 27 + .../models/project_task_properties.py | 80 ++ .../query_analysis_validation_result.py | 33 + .../models/query_execution_result.py | 40 + .../mgmt/datamigration/models/quota.py | 47 + .../mgmt/datamigration/models/quota_name.py | 32 + .../mgmt/datamigration/models/quota_paged.py | 27 + .../models/reportable_exception.py | 45 + .../mgmt/datamigration/models/resource.py | 45 + .../mgmt/datamigration/models/resource_sku.py | 93 ++ .../models/resource_sku_capabilities.py | 40 + .../models/resource_sku_capacity.py | 52 + .../models/resource_sku_costs.py | 45 + .../models/resource_sku_paged.py | 27 + .../models/resource_sku_restrictions.py | 49 + .../schema_comparison_validation_result.py | 43 + ...chema_comparison_validation_result_type.py | 40 + .../datamigration/models/server_properties.py | 60 + .../datamigration/models/service_operation.py | 33 + .../models/service_operation_display.py | 40 + .../models/service_operation_paged.py | 27 + .../mgmt/datamigration/models/service_sku.py | 49 + .../models/sql_connection_info.py | 65 + .../models/sql_migration_task_input.py | 39 + ...t_migration_scenario_server_role_result.py | 47 + .../sync_migration_database_error_event.py | 45 + .../datamigration/models/tracked_resource.py | 51 + ...tion_input_sql_server_sql_mi_task_input.py | 51 + ...ion_input_sql_server_sql_mi_task_output.py | 68 ++ ...input_sql_server_sql_mi_task_properties.py | 66 + ..._input_sql_server_sql_server_task_input.py | 40 + ...input_sql_server_sql_server_task_output.py | 61 + ...t_sql_server_sql_server_task_properties.py | 66 + .../datamigration/models/validation_error.py | 33 + .../datamigration/models/wait_statistics.py | 37 + .../mgmt/datamigration/operations/__init__.py | 26 + .../datamigration/operations/operations.py | 100 ++ .../operations/projects_operations.py | 462 +++++++ .../operations/resource_skus_operations.py | 103 ++ .../operations/services_operations.py | 1087 +++++++++++++++++ .../operations/tasks_operations.py | 581 +++++++++ .../operations/usages_operations.py | 107 ++ .../azext_dms/mgmt/datamigration/version.py | 13 + src/datamigration/azext_dms/scenarios.py | 68 ++ src/datamigration/setup.py | 40 + 195 files changed, 13677 insertions(+) create mode 100644 src/datamigration/README.rst create mode 100644 src/datamigration/azext_dms/__init__.py create mode 100644 src/datamigration/azext_dms/_client_factory.py create mode 100644 src/datamigration/azext_dms/_help.py create mode 100644 src/datamigration/azext_dms/_params.py create mode 100644 src/datamigration/azext_dms/commands.py create mode 100644 src/datamigration/azext_dms/custom.py create mode 100644 src/datamigration/azext_dms/mgmt/__init__.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/__init__.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/data_migration_service_client.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/__init__.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/api_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_capacity.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_paged.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_sku.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/blob_share.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/command_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_non_sql_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_database_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/connection_info.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/data_integrity_validation_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/data_item_migration_summary_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_project_metadata.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_client_enums.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_paged.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_status_response.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/database.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/database_file_info.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/database_file_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/database_info.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/database_object_name.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/database_summary_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/database_table.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/execution_statistics.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/file_share.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_non_sql_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_database_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_database_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_migration_level.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migration_eligibility_info.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migration_report_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migration_table_metadata.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_level_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_summary_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_options.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_connection_info.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_data_migration_project_metadata.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_request.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_response.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/odata_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/oracle_connection_info.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/oracle_data_migration_project_metadata.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/postgre_sql_connection_info.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/project.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/project_artifacts_response.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/project_paged.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/project_task.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/project_task_paged.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/project_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/query_analysis_validation_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/query_execution_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/quota.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/quota_name.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/quota_paged.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/reportable_exception.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/resource.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capabilities.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capacity.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_costs.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_paged.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_restrictions.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result_type.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/server_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/service_operation.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_display.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_paged.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/service_sku.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/sql_connection_info.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/sql_migration_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/start_migration_scenario_server_role_result.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/sync_migration_database_error_event.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/tracked_resource.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_input.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_output.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_properties.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/validation_error.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/models/wait_statistics.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/operations/__init__.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/operations/operations.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/operations/projects_operations.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/operations/resource_skus_operations.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/operations/services_operations.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/operations/tasks_operations.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/operations/usages_operations.py create mode 100644 src/datamigration/azext_dms/mgmt/datamigration/version.py create mode 100644 src/datamigration/azext_dms/scenarios.py create mode 100644 src/datamigration/setup.py diff --git a/src/datamigration/README.rst b/src/datamigration/README.rst new file mode 100644 index 00000000000..1cf1aca1af7 --- /dev/null +++ b/src/datamigration/README.rst @@ -0,0 +1,7 @@ +Microsoft Azure CLI 'Database Migration Service' Command Module +=============================================================== + +This package is for the 'Database Migration Service' module. +i.e. 'az dms' + + diff --git a/src/datamigration/azext_dms/__init__.py b/src/datamigration/azext_dms/__init__.py new file mode 100644 index 00000000000..182d8afc963 --- /dev/null +++ b/src/datamigration/azext_dms/__init__.py @@ -0,0 +1,31 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader + +import azext_dms._help # pylint: disable=unused-import + +class DmsCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + from azure.cli.command_modules.dms.commands import dms_api_exception_handler + dms_custom = CliCommandType(operations_tmpl='azext_dms.custom#{}', + exception_handler=dms_api_exception_handler) + super(DmsCommandsLoader, self).__init__(cli_ctx=cli_ctx, + min_profile='2017-03-10-profile', + custom_command_type=dms_custom) + + def load_command_table(self, args): + from azext_dms.commands import load_command_table + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_dms._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = DmsCommandsLoader diff --git a/src/datamigration/azext_dms/_client_factory.py b/src/datamigration/azext_dms/_client_factory.py new file mode 100644 index 00000000000..c3f2e0a6f1a --- /dev/null +++ b/src/datamigration/azext_dms/_client_factory.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +def dms_client_factory(cli_ctx, **_): + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from azext_dms.mgmt.datamigration import DataMigrationServiceClient + return get_mgmt_service_client(cli_ctx, DataMigrationServiceClient) + +def dms_cf_projects(cli_ctx, *_): + return dms_client_factory(cli_ctx).projects + +def dms_cf_tasks(cli_ctx, *_): + return dms_client_factory(cli_ctx).tasks diff --git a/src/datamigration/azext_dms/_help.py b/src/datamigration/azext_dms/_help.py new file mode 100644 index 00000000000..e711c454d0c --- /dev/null +++ b/src/datamigration/azext_dms/_help.py @@ -0,0 +1,140 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.help_files import helps + +helps['dms project create'] = """ + type: command + short-summary: Create a migration Project which can contain multiple Tasks. + long-summary: | + This extension currently supports the following project configurations. + -) source -> target :: data movement type + 1) SQL -> SQLDB :: One time + 2) PostgreSQL -> AzureDbForPostgreSql :: Continuous + 3) MySQL -> AzureDbForMySql :: Continuous + + parameters: + - name: --source-platform + type: string + short-summary: > + The type of server for the source database. The supported types are: SQL, PostgreSQL, MySQL + - name: --target-platform + type: string + short-summary: > + The type of service for the target database. The supported types are: SQLDB, AzureDbForPostgreSql, AzureDbForMySql. + examples: + - name: Create a SQL Project for a DMS instance. + text: > + az dms project create -l westus -n myproject -g myresourcegroup --service-name mydms --source-platform SQL--target-platform SQLDB --tags tagName1=tagValue1 tagWithNoValue +""" + +helps['dms project task create'] = """ + type: command + short-summary: Create a migration Project which can contain multiple Tasks. + parameters: + - name: --source-platform + type: string + short-summary: > + The type of server for the source database. The supported types are: SQL, PostgreSQL, MySQL + - name: --target-platform + type: string + short-summary: > + The type of service for the target database. The supported types are: SQLDB, AzureDbForPostgreSql, AzureDbForMySql. + - name: --database-options-json + type: string + short-summary: > + Database and table information. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format. + - name: --source-connection-json + type: string + short-summary: > + The connection information to the source server. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format. + - name: --target-connection-json + type: string + short-summary: > + The connection information to the target server. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format. + - name: --enable-data-integrity-validation + type: bool + short-summary: > + (For SQL only) Whether to perform a checksum based data integrity validation between source and target for the selected database and tables. + - name: --enable-query-analysis-validation + type: bool + short-summary: > + (For SQL only) Whether to perform a quick and intelligent query analysis by retrieving queries from the source database and executing them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries. + - name: --enable-schema-validation + type: bool + short-summary: > + (For SQL only) Whether to compare the schema information between source and target. + examples: + - name: Create and start a SQL Task which performs no validation checks. + text: > + az dms project task create --database-options-json C:\\CLI Files\\databaseOptions.json -n mytask --project-name myproject -g myresourcegroup --service-name mydms --source-connection-json '{'dataSource': 'myserver', 'authentication': 'SqlAuthentication', 'encryptConnection': 'true', 'trustServerCertificate': 'true'}' --target-connection-json C:\\CLI Files\\targetConnection.json + - name: Create and start a SQL Task which performs all validation checks. + text: > + az dms project task create --database-options-json C:\\CLI Files\\databaseOptions.json -n mytask --project-name myproject -g myresourcegroup --service-name mydms --source-connection-json C:\\CLI Files\\sourceConnection.json --target-connection-json C:\\CLI Files\\targetConnection.json --enable-data-integrity-validation=True --enable-query-analysis-validation --enable-schema-validation + - name: For SQL, the format of the database options JSON object. + long-summary: | + For SQL we support per table migrations. To use this, specify the tables names in the 'table_map' as below. + YOu can aslo set the source as read only. + text: > + [ + { + "name": "source database", + "target_database_name": "target database", + "make_source_db_read_only": false|true, + "table_map": { + "schema.SourceTableName1": "schema.TargetTableName1", + "schema.SourceTableName2": "schema.TargetTableName2", + ...n + } + }, + ...n + ] + - name: For PostgreSQL and MySQL, the format of the database options JSON object. + text: > + [ + { + "name": "source database", + "target_database_name": "target database", + }, + ...n + ] + - name: The format of the connection JSON object for SQL connections. + text: > + { + "userName": "user name", // if this is missing or null, you will be prompted + "password": null, // if this is missing or null (highly recommended) you will be prompted + "dataSource": "server name[,port]", + "authentication": "SqlAuthentication|WindowsAuthentication", + "encryptConnection": true, // highly recommended to leave as true + "trustServerCertificate": true // highly recommended to leave as true + } + - name: The format of the connection JSON object for MySql connections. + text: > + { + "userName": "user name", // if this is missing or null, you will be prompted + "password": null, // if this is missing or null (highly recommended) you will be prompted + "serverName": "server name", + "port": 3306 // if this is missing, it will default to 3306 + } + - name: The format of the connection JSON object for PostgreSql connections. + text: > + { + "userName": "user name", // if this is missing or null, you will be prompted + "password": null, // if this is missing or null (highly recommended) you will be prompted + "serverName": "server name", + "databaseName": "database name", // if this is missing, it will default to the 'postgre' server + "port": 5432 // if this is missing, it will default to 5432 + } +""" + +helps['dms project task cutover'] = """ + type: command + short-summary: For a continuous task, complete the migration by performing a cutover. + parameters: + - name: --database-name + type: string + short-summary: > + The name of the database on the source you wish to cutover. +""" diff --git a/src/datamigration/azext_dms/_params.py b/src/datamigration/azext_dms/_params.py new file mode 100644 index 00000000000..ffa85881155 --- /dev/null +++ b/src/datamigration/azext_dms/_params.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from knack.arguments import CLIArgumentType + +from azure.cli.core.commands.parameters import tags_type + +def load_arguments(self, _): + name_arg_type = CLIArgumentType(options_list=['--name', '-n'], metavar='NAME') + + with self.argument_context('dms project') as c: + c.argument('service_name', options_list=['--service-name'], help="The name of the Service.") + c.argument('project_name', name_arg_type, help='The name of the Project.') + c.argument('tags', tags_type, help='A space-delimited list of tags in tag1[=value1]" format.') + + with self.argument_context('dms project task') as c: + c.argument('service_name', options_list=['--service-name'], help="The name of the Service.") + c.argument('project_name', options_list=['--project-name']) + c.argument('task_name', name_arg_type, help='The name of the Task.') diff --git a/src/datamigration/azext_dms/commands.py b/src/datamigration/azext_dms/commands.py new file mode 100644 index 00000000000..855189519c6 --- /dev/null +++ b/src/datamigration/azext_dms/commands.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. +# -------------------------------------------------------------------------------------------- + +from azure.cli.core.commands import CliCommandType + +from azext_dms._client_factory import (dms_client_factory, + dms_cf_projects, + dms_cf_tasks) + +def load_command_table(self, _): + dms_projects_sdk = CliCommandType( + operations_tmpl='azext_dms.mgmt.datamigration.operations.projects_operations#ProjectsOperations.{}', + client_factory=dms_client_factory + ) + + dms_tasks_sdk = CliCommandType( + operations_tmpl='azext_dms.mgmt.datamigration.operations.tasks_operations#TasksOperations.{}', + client_factory=dms_client_factory + ) + + with self.command_group('dms project', dms_projects_sdk, client_factory=dms_cf_projects) as g: + g.custom_command('create', 'create_or_update_project') + + with self.command_group('dms project task', dms_tasks_sdk, client_factory=dms_cf_tasks) as g: + g.custom_command('create', 'create_task') + g.custom_command('cutover', 'cutover_sync_task') diff --git a/src/datamigration/azext_dms/custom.py b/src/datamigration/azext_dms/custom.py new file mode 100644 index 00000000000..461efc785e8 --- /dev/null +++ b/src/datamigration/azext_dms/custom.py @@ -0,0 +1,225 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +import os + +from azure.cli.core.util import get_file_json, shell_safe_json_parse +from knack.prompting import prompt, prompt_pass +from azext_dms.mgmt.datamigration.models import (Project, + SqlConnectionInfo, + MySqlConnectionInfo, + PostgreSqlConnectionInfo, + MigrateSyncCompleteCommandInput, + MigrateSqlServerSqlDbTaskProperties, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, + MigrateMySqlAzureDbForMySqlSyncTaskProperties, + MigrateSyncCompleteCommandProperties) +from azext_dms.scenarios import (get_migrate_sql_server_to_sqldb_input, + get_migrate_postgresql_to_azuredbforpostgresql_sync_input, + get_migrate_mysql_to_azuredbformysql_sync_input) + +# region Project +def create_or_update_project( + client, + project_name, + service_name, + resource_group_name, + location, + source_platform, + target_platform, + tags=None): + + # Validation: Test scenario eligibility + if not determine_scenario_eligibility(source_platform, target_platform): + raise ValueError('The provided source-platform and target-platform combination is not appropriate. \n\ + The only supported scenarios are: \n\ + 1) Sql -> SqlDb \n\ + 2) PostgreSql -> AzureDbForPostgreSql \n\ + 3) MySql -> AzureDbForMySql') + + # Get the data movement type + data_movement_type = get_data_movement_type(source_platform, target_platform) + + parameters = Project(location=location, + source_platform=source_platform, + target_platform=target_platform, + tags=tags, + data_movement=data_movement_type) + + return client.create_or_update(parameters=parameters, + group_name=resource_group_name, + service_name=service_name, + project_name=project_name) +# endregion + +# region Task +def create_task( + client, + resource_group_name, + service_name, + project_name, + task_name, + source_platform, + target_platform, + source_connection_json, + target_connection_json, + database_options_json, + enable_schema_validation=False, + enable_data_integrity_validation=False, + enable_query_analysis_validation=False): + + # Validation: Test scenario eligibility + if not determine_scenario_eligibility(source_platform, target_platform): + raise ValueError('The provided source-platform and target-platform combination is not appropriate. \n\ + The only supported scenarios are: \n\ + 1) Sql -> SqlDb \n \ + 2) PostgreSql -> AzureDbForPostgreSql \n\ + 3) MySql -> AzureDbForMySql') + + if os.path.exists(source_connection_json): + source_connection_json = get_file_json(source_connection_json) + else: + source_connection_json = shell_safe_json_parse(source_connection_json) + source_connection_info = create_connection(source_connection_json, "Source Database", source_platform) + + if os.path.exists(target_connection_json): + target_connection_json = get_file_json(target_connection_json) + else: + target_connection_json = shell_safe_json_parse(target_connection_json) + target_connection_info = create_connection(target_connection_json, "Target Database", target_platform) + + if os.path.exists(database_options_json): + database_options_json = get_file_json(database_options_json) + else: + database_options_json = shell_safe_json_parse(database_options_json) + + task_properties = get_task_migration_properties(database_options_json, + source_platform, + target_platform, + source_connection_info, + target_connection_info, + enable_schema_validation, + enable_data_integrity_validation, + enable_query_analysis_validation) + + return client.create_or_update(group_name=resource_group_name, + service_name=service_name, + project_name=project_name, + task_name=task_name, + properties=task_properties) + +def cutover_sync_task( + client, + resource_group_name, + service_name, + project_name, + task_name, + database_name): + sync_input = MigrateSyncCompleteCommandInput(database_name=database_name) + + # 'input' is a built in function. Even though we can technically use it, it's not recommended. + # https://stackoverflow.com/questions/20670732/is-input-a-keyword-in-python + sync_properties_params = {'input': sync_input} + sync_properties = MigrateSyncCompleteCommandProperties(**sync_properties_params) + + client.command(group_name=resource_group_name, + service_name=service_name, + project_name=project_name, + task_name=task_name, + parameters=sync_properties) + +# endregion + +# region Helper Methods +def determine_scenario_eligibility(source_raw, target_raw): + source_type = source_raw.lower() + target_type = target_raw.lower() + + return (source_type == "sql" and target_type == "sqldb") or \ + (source_type == "postgresql" and target_type == "azuredbforpostgresql") or \ + (source_type == "mysql" and target_type == "azuredbformysql") + +# As of now, we dont expose Sql continuous migrations. +# So we'll hard code the data movement type to simplify user interaction. +# In the future, we can remove this method and add a validation in its stead. +def get_data_movement_type(source_type, target_type): + source_type = source_type.lower() + target_type = target_type.lower() + oneTime = "OneTimeMigration" + cont = "Continuous" + + if source_type == "sql" and target_type == "sqldb": + return oneTime + return cont + +def create_connection(connection_info_json, prompt_prefix, typeOfInfo): + typeOfInfo = typeOfInfo.lower() + + user_name = connection_info_json.get('userName', None) or prompt(prompt_prefix + 'Username: ') + password = connection_info_json.get('password', None) or prompt_pass(msg=prompt_prefix + 'Password: ') + server_name = connection_info_json.get('serverName', None) + if "mysql" in typeOfInfo: + port = connection_info_json.get('port', 3306) + return MySqlConnectionInfo(user_name=user_name, + password=password, + server_name=server_name, + port=port) + elif "postgre" in typeOfInfo: + database_name = connection_info_json.get('databaseName', "postgre") + port = connection_info_json.get('port', 5432) + return PostgreSqlConnectionInfo(user_name=user_name, + password=password, + server_name=server_name, + database_name=database_name, + port=port) + data_source = connection_info_json.get('dataSource', None) + authentication = connection_info_json.get('authentication', None) + encrypt_connection = connection_info_json.get('encryptConnection', None) + trust_server_certificate = connection_info_json.get('trustServerCertificate', None) + additional_settings = connection_info_json.get('additionalSettings', None) + return SqlConnectionInfo(user_name=user_name, + password=password, + data_source=data_source, + authentication=authentication, + encrypt_connection=encrypt_connection, + trust_server_certificate=trust_server_certificate, + additional_settings=additional_settings) + +def get_task_migration_properties( + database_options_json, + source_raw, + target_raw, + source_connection_info, + target_connection_info, + enable_schema_validation, + enable_data_integrity_validation, + enable_query_analysis_validation): + source_type = source_raw.lower() + target_type = target_raw.lower() + + if source_type == 'sql' and target_type == 'sqldb': + TaskProperties = MigrateSqlServerSqlDbTaskProperties + task_input = get_migrate_sql_server_to_sqldb_input( + database_options_json, + source_connection_info, + target_connection_info, + enable_schema_validation, + enable_data_integrity_validation, + enable_query_analysis_validation) + elif source_type == 'postgresql' and target_type == 'azuredbforpostgresql': + TaskProperties = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties + task_input = get_migrate_postgresql_to_azuredbforpostgresql_sync_input( + database_options_json, + source_connection_info, + target_connection_info) + elif source_type == 'mysql' and target_type == 'azuredbformysql': + TaskProperties = MigrateMySqlAzureDbForMySqlSyncTaskProperties + task_input = get_migrate_mysql_to_azuredbformysql_sync_input( + database_options_json, + source_connection_info, + target_connection_info) + + return TaskProperties(input=task_input) +# endregion diff --git a/src/datamigration/azext_dms/mgmt/__init__.py b/src/datamigration/azext_dms/mgmt/__init__.py new file mode 100644 index 00000000000..de40ea7ca05 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/src/datamigration/azext_dms/mgmt/datamigration/__init__.py b/src/datamigration/azext_dms/mgmt/datamigration/__init__.py new file mode 100644 index 00000000000..50b17677a35 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/__init__.py @@ -0,0 +1,18 @@ +# 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_service_client import DataMigrationServiceClient +from .version import VERSION + +__all__ = ['DataMigrationServiceClient'] + +__version__ = VERSION + diff --git a/src/datamigration/azext_dms/mgmt/datamigration/data_migration_service_client.py b/src/datamigration/azext_dms/mgmt/datamigration/data_migration_service_client.py new file mode 100644 index 00000000000..71e3f5ff95d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/data_migration_service_client.py @@ -0,0 +1,106 @@ +# 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 msrest.service_client import ServiceClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.resource_skus_operations import ResourceSkusOperations +from .operations.services_operations import ServicesOperations +from .operations.tasks_operations import TasksOperations +from .operations.projects_operations import ProjectsOperations +from .operations.usages_operations import UsagesOperations +from .operations.operations import Operations +from . import models + + +class DataMigrationServiceClientConfiguration(AzureConfiguration): + """Configuration for DataMigrationServiceClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Identifier of the subscription + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(DataMigrationServiceClientConfiguration, self).__init__(base_url) + + self.add_user_agent('datamigrationserviceclient/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class DataMigrationServiceClient(object): + """Data Migration Client + + :ivar config: Configuration for client. + :vartype config: DataMigrationServiceClientConfiguration + + :ivar resource_skus: ResourceSkus operations + :vartype resource_skus: azure.mgmt.datamigration.operations.ResourceSkusOperations + :ivar services: Services operations + :vartype services: azure.mgmt.datamigration.operations.ServicesOperations + :ivar tasks: Tasks operations + :vartype tasks: azure.mgmt.datamigration.operations.TasksOperations + :ivar projects: Projects operations + :vartype projects: azure.mgmt.datamigration.operations.ProjectsOperations + :ivar usages: Usages operations + :vartype usages: azure.mgmt.datamigration.operations.UsagesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.datamigration.operations.Operations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Identifier of the subscription + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = DataMigrationServiceClientConfiguration(credentials, subscription_id, base_url) + self._client = ServiceClient(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2017-11-15-privatepreview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + 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.projects = ProjectsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/__init__.py b/src/datamigration/azext_dms/mgmt/datamigration/models/__init__.py new file mode 100644 index 00000000000..cabbb157d36 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/__init__.py @@ -0,0 +1,428 @@ +# 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 .odata_error import ODataError +from .reportable_exception import ReportableException +from .migrate_sync_complete_command_output import MigrateSyncCompleteCommandOutput +from .migrate_sync_complete_command_input import MigrateSyncCompleteCommandInput +from .migrate_sync_complete_command_properties import MigrateSyncCompleteCommandProperties +from .command_properties import CommandProperties +from .tracked_resource import TrackedResource +from .resource import Resource +from .validate_migration_input_sql_server_sql_server_task_output import ValidateMigrationInputSqlServerSqlServerTaskOutput +from .database_file_input import DatabaseFileInput +from .migrate_sql_server_sql_server_database_input import MigrateSqlServerSqlServerDatabaseInput +from .oracle_connection_info import OracleConnectionInfo +from .postgre_sql_connection_info import PostgreSqlConnectionInfo +from .my_sql_connection_info import MySqlConnectionInfo +from .connection_info import ConnectionInfo +from .sql_connection_info import SqlConnectionInfo +from .validate_migration_input_sql_server_sql_server_task_input import ValidateMigrationInputSqlServerSqlServerTaskInput +from .validate_migration_input_sql_server_sql_server_task_properties import ValidateMigrationInputSqlServerSqlServerTaskProperties +from .validate_migration_input_sql_server_sql_mi_task_output import ValidateMigrationInputSqlServerSqlMITaskOutput +from .blob_share import BlobShare +from .file_share import FileShare +from .migrate_sql_server_sql_mi_database_input import MigrateSqlServerSqlMIDatabaseInput +from .validate_migration_input_sql_server_sql_mi_task_input import ValidateMigrationInputSqlServerSqlMITaskInput +from .validate_migration_input_sql_server_sql_mi_task_properties import ValidateMigrationInputSqlServerSqlMITaskProperties +from .sync_migration_database_error_event import SyncMigrationDatabaseErrorEvent +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input import MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput +from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error import MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_error import MigrateMySqlAzureDbForMySqlSyncTaskOutputError +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level import MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level import MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level import MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel +from .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput +from .migrate_my_sql_azure_db_for_my_sql_sync_database_input import MigrateMySqlAzureDbForMySqlSyncDatabaseInput +from .migrate_my_sql_azure_db_for_my_sql_sync_task_input import MigrateMySqlAzureDbForMySqlSyncTaskInput +from .migrate_my_sql_azure_db_for_my_sql_sync_task_properties import MigrateMySqlAzureDbForMySqlSyncTaskProperties +from .migrate_sql_server_sql_db_sync_task_output_database_error import MigrateSqlServerSqlDbSyncTaskOutputDatabaseError +from .migrate_sql_server_sql_db_sync_task_output_error import MigrateSqlServerSqlDbSyncTaskOutputError +from .migrate_sql_server_sql_db_sync_task_output_table_level import MigrateSqlServerSqlDbSyncTaskOutputTableLevel +from .migrate_sql_server_sql_db_sync_task_output_database_level import MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel +from .migrate_sql_server_sql_db_sync_task_output_migration_level import MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel +from .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput +from .sql_migration_task_input import SqlMigrationTaskInput +from .migrate_sql_server_sql_db_database_input import MigrateSqlServerSqlDbDatabaseInput +from .migrate_sql_server_sql_db_sync_task_input import MigrateSqlServerSqlDbSyncTaskInput +from .migrate_sql_server_sql_db_sync_task_properties import MigrateSqlServerSqlDbSyncTaskProperties +from .migrate_sql_server_sql_server_task_output_error import MigrateSqlServerSqlServerTaskOutputError +from .data_item_migration_summary_result import DataItemMigrationSummaryResult +from .migrate_sql_server_sql_server_task_output_database_level import MigrateSqlServerSqlServerTaskOutputDatabaseLevel +from .migrate_sql_server_sql_server_task_output_migration_level import MigrateSqlServerSqlServerTaskOutputMigrationLevel +from .migrate_sql_server_sql_server_task_output import MigrateSqlServerSqlServerTaskOutput +from .migrate_sql_server_sql_server_task_input import MigrateSqlServerSqlServerTaskInput +from .migrate_sql_server_sql_server_task_properties import MigrateSqlServerSqlServerTaskProperties +from .validation_error import ValidationError +from .wait_statistics import WaitStatistics +from .execution_statistics import ExecutionStatistics +from .query_execution_result import QueryExecutionResult +from .query_analysis_validation_result import QueryAnalysisValidationResult +from .schema_comparison_validation_result_type import SchemaComparisonValidationResultType +from .schema_comparison_validation_result import SchemaComparisonValidationResult +from .data_integrity_validation_result import DataIntegrityValidationResult +from .migration_validation_database_level_result import MigrationValidationDatabaseLevelResult +from .migration_validation_database_summary_result import MigrationValidationDatabaseSummaryResult +from .migration_validation_result import MigrationValidationResult +from .migrate_sql_server_sql_db_task_output_error import MigrateSqlServerSqlDbTaskOutputError +from .migrate_sql_server_sql_db_task_output_table_level import MigrateSqlServerSqlDbTaskOutputTableLevel +from .migrate_sql_server_sql_db_task_output_database_level import MigrateSqlServerSqlDbTaskOutputDatabaseLevel +from .migration_report_result import MigrationReportResult +from .database_summary_result import DatabaseSummaryResult +from .migrate_sql_server_sql_db_task_output_migration_level import MigrateSqlServerSqlDbTaskOutputMigrationLevel +from .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput +from .migration_validation_options import MigrationValidationOptions +from .migrate_sql_server_sql_db_task_input import MigrateSqlServerSqlDbTaskInput +from .migrate_sql_server_sql_db_task_properties import MigrateSqlServerSqlDbTaskProperties +from .migrate_sql_server_sql_mi_task_output_error import MigrateSqlServerSqlMITaskOutputError +from .migrate_sql_server_sql_mi_task_output_login_level import MigrateSqlServerSqlMITaskOutputLoginLevel +from .migrate_sql_server_sql_mi_task_output_agent_job_level import MigrateSqlServerSqlMITaskOutputAgentJobLevel +from .migrate_sql_server_sql_mi_task_output_database_level import MigrateSqlServerSqlMITaskOutputDatabaseLevel +from .start_migration_scenario_server_role_result import StartMigrationScenarioServerRoleResult +from .migrate_sql_server_sql_mi_task_output_migration_level import MigrateSqlServerSqlMITaskOutputMigrationLevel +from .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput +from .migrate_sql_server_sql_mi_task_input import MigrateSqlServerSqlMITaskInput +from .migrate_sql_server_sql_mi_task_properties import MigrateSqlServerSqlMITaskProperties +from .migration_table_metadata import MigrationTableMetadata +from .data_migration_project_metadata import DataMigrationProjectMetadata +from .oracle_data_migration_project_metadata import OracleDataMigrationProjectMetadata +from .get_project_details_oracle_sql_task_output import GetProjectDetailsOracleSqlTaskOutput +from .get_project_details_non_sql_task_input import GetProjectDetailsNonSqlTaskInput +from .get_project_details_oracle_sql_task_properties import GetProjectDetailsOracleSqlTaskProperties +from .my_sql_data_migration_project_metadata import MySqlDataMigrationProjectMetadata +from .get_project_details_my_sql_sql_task_output import GetProjectDetailsMySqlSqlTaskOutput +from .get_project_details_my_sql_sql_task_properties import GetProjectDetailsMySqlSqlTaskProperties +from .connect_to_target_azure_db_for_my_sql_task_output import ConnectToTargetAzureDbForMySqlTaskOutput +from .connect_to_target_azure_db_for_my_sql_task_input import ConnectToTargetAzureDbForMySqlTaskInput +from .connect_to_target_azure_db_for_my_sql_task_properties import ConnectToTargetAzureDbForMySqlTaskProperties +from .connect_to_target_sql_server_task_output import ConnectToTargetSqlServerTaskOutput +from .connect_to_target_sql_server_task_input import ConnectToTargetSqlServerTaskInput +from .connect_to_target_sql_server_task_properties import ConnectToTargetSqlServerTaskProperties +from .connect_to_target_sql_mi_task_output import ConnectToTargetSqlMITaskOutput +from .connect_to_target_sql_mi_task_input import ConnectToTargetSqlMITaskInput +from .connect_to_target_sql_mi_task_properties import ConnectToTargetSqlMITaskProperties +from .database_table import DatabaseTable +from .get_user_tables_sql_task_output import GetUserTablesSqlTaskOutput +from .get_user_tables_sql_task_input import GetUserTablesSqlTaskInput +from .get_user_tables_sql_task_properties import GetUserTablesSqlTaskProperties +from .connect_to_target_sql_db_task_output import ConnectToTargetSqlDbTaskOutput +from .connect_to_target_sql_db_task_input import ConnectToTargetSqlDbTaskInput +from .connect_to_target_sql_db_task_properties import ConnectToTargetSqlDbTaskProperties +from .migration_eligibility_info import MigrationEligibilityInfo +from .connect_to_source_sql_server_task_output_agent_job_level import ConnectToSourceSqlServerTaskOutputAgentJobLevel +from .connect_to_source_sql_server_task_output_login_level import ConnectToSourceSqlServerTaskOutputLoginLevel +from .database_file_info import DatabaseFileInfo +from .connect_to_source_sql_server_task_output_database_level import ConnectToSourceSqlServerTaskOutputDatabaseLevel +from .connect_to_source_sql_server_task_output_task_level import ConnectToSourceSqlServerTaskOutputTaskLevel +from .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput +from .connect_to_source_sql_server_task_input import ConnectToSourceSqlServerTaskInput +from .connect_to_source_sql_server_task_properties import ConnectToSourceSqlServerTaskProperties +from .project_task_properties import ProjectTaskProperties +from .project_task import ProjectTask +from .service_sku import ServiceSku +from .data_migration_service import DataMigrationService +from .name_availability_request import NameAvailabilityRequest +from .database_info import DatabaseInfo +from .project import Project +from .api_error import ApiError, ApiErrorException +from .service_operation_display import ServiceOperationDisplay +from .service_operation import ServiceOperation +from .quota_name import QuotaName +from .quota import Quota +from .name_availability_response import NameAvailabilityResponse +from .project_artifacts_response import ProjectArtifactsResponse +from .available_service_sku_sku import AvailableServiceSkuSku +from .available_service_sku_capacity import AvailableServiceSkuCapacity +from .available_service_sku import AvailableServiceSku +from .data_migration_service_status_response import DataMigrationServiceStatusResponse +from .resource_sku_restrictions import ResourceSkuRestrictions +from .resource_sku_capabilities import ResourceSkuCapabilities +from .resource_sku_costs import ResourceSkuCosts +from .resource_sku_capacity import ResourceSkuCapacity +from .resource_sku import ResourceSku +from .connect_to_source_my_sql_task_input import ConnectToSourceMySqlTaskInput +from .server_properties import ServerProperties +from .connect_to_source_non_sql_task_output import ConnectToSourceNonSqlTaskOutput +from .connect_to_source_my_sql_task_properties import ConnectToSourceMySqlTaskProperties +from .connect_to_source_oracle_task_input import ConnectToSourceOracleTaskInput +from .connect_to_source_oracle_task_properties import ConnectToSourceOracleTaskProperties +from .migrate_my_sql_sql_task_input import MigrateMySqlSqlTaskInput +from .migrate_my_sql_sql_task_output import MigrateMySqlSqlTaskOutput +from .migrate_my_sql_sql_task_properties import MigrateMySqlSqlTaskProperties +from .data_migration_error import DataMigrationError +from .non_sql_data_migration_table_result import NonSqlDataMigrationTableResult +from .non_sql_migration_task_output import NonSqlMigrationTaskOutput +from .non_sql_data_migration_table import NonSqlDataMigrationTable +from .non_sql_migration_task_input import NonSqlMigrationTaskInput +from .migrate_oracle_sql_task_input import MigrateOracleSqlTaskInput +from .migrate_oracle_sql_task_output import MigrateOracleSqlTaskOutput +from .migrate_oracle_sql_task_properties import MigrateOracleSqlTaskProperties +from .database import Database +from .database_object_name import DatabaseObjectName +from .resource_sku_paged import ResourceSkuPaged +from .available_service_sku_paged import AvailableServiceSkuPaged +from .data_migration_service_paged import DataMigrationServicePaged +from .project_task_paged import ProjectTaskPaged +from .project_paged import ProjectPaged +from .quota_paged import QuotaPaged +from .service_operation_paged import ServiceOperationPaged +from .data_migration_service_client_enums import ( + CommandState, + DatabaseFileType, + AuthenticationType, + OracleConnectionMode, + SyncTableMigrationState, + SyncDatabaseMigrationReportingState, + SyncMigrationState, + MigrationState, + DatabaseMigrationStage, + MigrationStatus, + ValidationStatus, + Severity, + UpdateActionType, + ObjectType, + LoginMigrationStage, + LoginType, + DatabaseState, + DatabaseCompatLevel, + ServerLevelPermissionsGroup, + TaskState, + ServiceProvisioningState, + ProjectTargetPlatform, + ProjectSourcePlatform, + ProjectProvisioningState, + DataMovement, + NameCheckFailureReason, + ServiceScalability, + ResourceSkuRestrictionsType, + ResourceSkuRestrictionsReasonCode, + ResourceSkuCapacityScaleType, + MySqlTargetPlatformType, + ErrorType, + DataMigrationResultCode, +) + +__all__ = [ + 'ODataError', + 'ReportableException', + 'MigrateSyncCompleteCommandOutput', + 'MigrateSyncCompleteCommandInput', + 'MigrateSyncCompleteCommandProperties', + 'CommandProperties', + 'TrackedResource', + 'Resource', + 'ValidateMigrationInputSqlServerSqlServerTaskOutput', + 'DatabaseFileInput', + 'MigrateSqlServerSqlServerDatabaseInput', + 'OracleConnectionInfo', + 'PostgreSqlConnectionInfo', + 'MySqlConnectionInfo', + 'ConnectionInfo', + 'SqlConnectionInfo', + 'ValidateMigrationInputSqlServerSqlServerTaskInput', + 'ValidateMigrationInputSqlServerSqlServerTaskProperties', + 'ValidateMigrationInputSqlServerSqlMITaskOutput', + 'BlobShare', + 'FileShare', + 'MigrateSqlServerSqlMIDatabaseInput', + 'ValidateMigrationInputSqlServerSqlMITaskInput', + 'ValidateMigrationInputSqlServerSqlMITaskProperties', + 'SyncMigrationDatabaseErrorEvent', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput', + 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputError', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel', + 'MigrateMySqlAzureDbForMySqlSyncTaskOutput', + 'MigrateMySqlAzureDbForMySqlSyncDatabaseInput', + 'MigrateMySqlAzureDbForMySqlSyncTaskInput', + 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', + 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseError', + 'MigrateSqlServerSqlDbSyncTaskOutputError', + 'MigrateSqlServerSqlDbSyncTaskOutputTableLevel', + 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel', + 'MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel', + 'MigrateSqlServerSqlDbSyncTaskOutput', + 'SqlMigrationTaskInput', + 'MigrateSqlServerSqlDbDatabaseInput', + 'MigrateSqlServerSqlDbSyncTaskInput', + 'MigrateSqlServerSqlDbSyncTaskProperties', + 'MigrateSqlServerSqlServerTaskOutputError', + 'DataItemMigrationSummaryResult', + 'MigrateSqlServerSqlServerTaskOutputDatabaseLevel', + 'MigrateSqlServerSqlServerTaskOutputMigrationLevel', + 'MigrateSqlServerSqlServerTaskOutput', + 'MigrateSqlServerSqlServerTaskInput', + 'MigrateSqlServerSqlServerTaskProperties', + 'ValidationError', + 'WaitStatistics', + 'ExecutionStatistics', + 'QueryExecutionResult', + 'QueryAnalysisValidationResult', + 'SchemaComparisonValidationResultType', + 'SchemaComparisonValidationResult', + 'DataIntegrityValidationResult', + 'MigrationValidationDatabaseLevelResult', + 'MigrationValidationDatabaseSummaryResult', + 'MigrationValidationResult', + 'MigrateSqlServerSqlDbTaskOutputError', + 'MigrateSqlServerSqlDbTaskOutputTableLevel', + 'MigrateSqlServerSqlDbTaskOutputDatabaseLevel', + 'MigrationReportResult', + 'DatabaseSummaryResult', + 'MigrateSqlServerSqlDbTaskOutputMigrationLevel', + 'MigrateSqlServerSqlDbTaskOutput', + 'MigrationValidationOptions', + 'MigrateSqlServerSqlDbTaskInput', + 'MigrateSqlServerSqlDbTaskProperties', + 'MigrateSqlServerSqlMITaskOutputError', + 'MigrateSqlServerSqlMITaskOutputLoginLevel', + 'MigrateSqlServerSqlMITaskOutputAgentJobLevel', + 'MigrateSqlServerSqlMITaskOutputDatabaseLevel', + 'StartMigrationScenarioServerRoleResult', + 'MigrateSqlServerSqlMITaskOutputMigrationLevel', + 'MigrateSqlServerSqlMITaskOutput', + 'MigrateSqlServerSqlMITaskInput', + 'MigrateSqlServerSqlMITaskProperties', + 'MigrationTableMetadata', + 'DataMigrationProjectMetadata', + 'OracleDataMigrationProjectMetadata', + 'GetProjectDetailsOracleSqlTaskOutput', + 'GetProjectDetailsNonSqlTaskInput', + 'GetProjectDetailsOracleSqlTaskProperties', + 'MySqlDataMigrationProjectMetadata', + 'GetProjectDetailsMySqlSqlTaskOutput', + 'GetProjectDetailsMySqlSqlTaskProperties', + 'ConnectToTargetAzureDbForMySqlTaskOutput', + 'ConnectToTargetAzureDbForMySqlTaskInput', + 'ConnectToTargetAzureDbForMySqlTaskProperties', + 'ConnectToTargetSqlServerTaskOutput', + 'ConnectToTargetSqlServerTaskInput', + 'ConnectToTargetSqlServerTaskProperties', + 'ConnectToTargetSqlMITaskOutput', + 'ConnectToTargetSqlMITaskInput', + 'ConnectToTargetSqlMITaskProperties', + 'DatabaseTable', + 'GetUserTablesSqlTaskOutput', + 'GetUserTablesSqlTaskInput', + 'GetUserTablesSqlTaskProperties', + 'ConnectToTargetSqlDbTaskOutput', + 'ConnectToTargetSqlDbTaskInput', + 'ConnectToTargetSqlDbTaskProperties', + 'MigrationEligibilityInfo', + 'ConnectToSourceSqlServerTaskOutputAgentJobLevel', + 'ConnectToSourceSqlServerTaskOutputLoginLevel', + 'DatabaseFileInfo', + 'ConnectToSourceSqlServerTaskOutputDatabaseLevel', + 'ConnectToSourceSqlServerTaskOutputTaskLevel', + 'ConnectToSourceSqlServerTaskOutput', + 'ConnectToSourceSqlServerTaskInput', + 'ConnectToSourceSqlServerTaskProperties', + 'ProjectTaskProperties', + 'ProjectTask', + 'ServiceSku', + 'DataMigrationService', + 'NameAvailabilityRequest', + 'DatabaseInfo', + 'Project', + 'ApiError', 'ApiErrorException', + 'ServiceOperationDisplay', + 'ServiceOperation', + 'QuotaName', + 'Quota', + 'NameAvailabilityResponse', + 'ProjectArtifactsResponse', + 'AvailableServiceSkuSku', + 'AvailableServiceSkuCapacity', + 'AvailableServiceSku', + 'DataMigrationServiceStatusResponse', + 'ResourceSkuRestrictions', + 'ResourceSkuCapabilities', + 'ResourceSkuCosts', + 'ResourceSkuCapacity', + 'ResourceSku', + 'ConnectToSourceMySqlTaskInput', + 'ServerProperties', + 'ConnectToSourceNonSqlTaskOutput', + 'ConnectToSourceMySqlTaskProperties', + 'ConnectToSourceOracleTaskInput', + 'ConnectToSourceOracleTaskProperties', + 'MigrateMySqlSqlTaskInput', + 'MigrateMySqlSqlTaskOutput', + 'MigrateMySqlSqlTaskProperties', + 'DataMigrationError', + 'NonSqlDataMigrationTableResult', + 'NonSqlMigrationTaskOutput', + 'NonSqlDataMigrationTable', + 'NonSqlMigrationTaskInput', + 'MigrateOracleSqlTaskInput', + 'MigrateOracleSqlTaskOutput', + 'MigrateOracleSqlTaskProperties', + 'Database', + 'DatabaseObjectName', + 'ResourceSkuPaged', + 'AvailableServiceSkuPaged', + 'DataMigrationServicePaged', + 'ProjectTaskPaged', + 'ProjectPaged', + 'QuotaPaged', + 'ServiceOperationPaged', + 'CommandState', + 'DatabaseFileType', + 'AuthenticationType', + 'OracleConnectionMode', + 'SyncTableMigrationState', + 'SyncDatabaseMigrationReportingState', + 'SyncMigrationState', + 'MigrationState', + 'DatabaseMigrationStage', + 'MigrationStatus', + 'ValidationStatus', + 'Severity', + 'UpdateActionType', + 'ObjectType', + 'LoginMigrationStage', + 'LoginType', + 'DatabaseState', + 'DatabaseCompatLevel', + 'ServerLevelPermissionsGroup', + 'TaskState', + 'ServiceProvisioningState', + 'ProjectTargetPlatform', + 'ProjectSourcePlatform', + 'ProjectProvisioningState', + 'DataMovement', + 'NameCheckFailureReason', + 'ServiceScalability', + 'ResourceSkuRestrictionsType', + 'ResourceSkuRestrictionsReasonCode', + 'ResourceSkuCapacityScaleType', + 'MySqlTargetPlatformType', + 'ErrorType', + 'DataMigrationResultCode', +] diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/api_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/api_error.py new file mode 100644 index 00000000000..e14fcd41d59 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/api_error.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ApiError(Model): + """Error information. + + :param error: Error information in OData format + :type error: ~azure.mgmt.datamigration.models.ODataError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ODataError'}, + } + + def __init__(self, error=None): + super(ApiError, self).__init__() + self.error = error + + +class ApiErrorException(HttpOperationError): + """Server responsed with exception of type: 'ApiError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku.py b/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku.py new file mode 100644 index 00000000000..3b186fc62c0 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class AvailableServiceSku(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.AvailableServiceSkuSku + :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': 'AvailableServiceSkuSku'}, + 'capacity': {'key': 'capacity', 'type': 'AvailableServiceSkuCapacity'}, + } + + def __init__(self, resource_type=None, sku=None, capacity=None): + super(AvailableServiceSku, self).__init__() + self.resource_type = resource_type + self.sku = sku + self.capacity = capacity diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_capacity.py b/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_capacity.py new file mode 100644 index 00000000000..6253220f9c4 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_capacity.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class AvailableServiceSkuCapacity(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=None, maximum=None, default=None, scale_type=None): + super(AvailableServiceSkuCapacity, self).__init__() + self.minimum = minimum + self.maximum = maximum + self.default = default + self.scale_type = scale_type diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_paged.py b/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_paged.py new file mode 100644 index 00000000000..9f2cc263342 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class AvailableServiceSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`AvailableServiceSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AvailableServiceSku]'} + } + + def __init__(self, *args, **kwargs): + + super(AvailableServiceSkuPaged, self).__init__(*args, **kwargs) diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_sku.py b/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_sku.py new file mode 100644 index 00000000000..730d866f2ae --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_sku.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class AvailableServiceSkuSku(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 "Free", "Basic", "Standard", or + "Premium" + :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=None, family=None, size=None, tier=None): + super(AvailableServiceSkuSku, self).__init__() + self.name = name + self.family = family + self.size = size + self.tier = tier diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/blob_share.py b/src/datamigration/azext_dms/mgmt/datamigration/models/blob_share.py new file mode 100644 index 00000000000..b4408dfce85 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/blob_share.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class BlobShare(Model): + """Blob container storage information. + + :param sas_uri: 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): + super(BlobShare, self).__init__() + self.sas_uri = sas_uri diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/command_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/command_properties.py new file mode 100644 index 00000000000..5c243d2bd21 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/command_properties.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class CommandProperties(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: MigrateSyncCompleteCommandProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 command_type: Constant filled by server. + :type command_type: str + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'command_type': {'required': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'command_type': {'key': 'commandType', 'type': 'str'}, + } + + _subtype_map = { + 'command_type': {'Migrate.Sync.Complete.Database': 'MigrateSyncCompleteCommandProperties'} + } + + def __init__(self): + super(CommandProperties, self).__init__() + self.errors = None + self.state = None + self.command_type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_input.py new file mode 100644 index 00000000000..75d849f42be --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_input.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class ConnectToSourceMySqlTaskInput(Model): + """Input for the task that validates MySQL database connection. + + :param source_connection_info: 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', 'MigrationFromSqlServerToAzureVM', + 'MigrationFromOracleToSQL', 'MigrationFromOracleToAzureDB', + 'MigrationFromOracleToAzureDW', 'MigrationFromMySQLToSQL', + 'MigrationFromMySQLToAzureDB', 'MigrationFromMySQLToAzureDBForMySQL' + :type check_permissions_group: str or + ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup + """ + + _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'}, + } + + def __init__(self, source_connection_info, target_platform=None, check_permissions_group=None): + super(ConnectToSourceMySqlTaskInput, self).__init__() + self.source_connection_info = source_connection_info + self.target_platform = target_platform + self.check_permissions_group = check_permissions_group diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_properties.py new file mode 100644 index 00000000000..3d78dbeae22 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_properties.py @@ -0,0 +1,65 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +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. + + :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 task_type: Constant filled by server. + :type task_type: 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 = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceNonSqlTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(ConnectToSourceMySqlTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'ConnectToSource.MySql' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_non_sql_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_non_sql_task_output.py new file mode 100644 index 00000000000..78d028ee42d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_non_sql_task_output.py @@ -0,0 +1,57 @@ +# 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 msrest.serialization import Model + + +class ConnectToSourceNonSqlTaskOutput(Model): + """Output for connect to Oracle, 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): + super(ConnectToSourceNonSqlTaskOutput, self).__init__() + self.id = None + self.source_server_brand_version = None + self.server_properties = None + self.databases = None + self.validation_errors = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_input.py new file mode 100644 index 00000000000..5cbe4a96ae5 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_input.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class ConnectToSourceOracleTaskInput(Model): + """Input for the task that validates Oracle database connection. + + :param source_connection_info: Information for connecting to Oracle source + :type source_connection_info: + ~azure.mgmt.datamigration.models.OracleConnectionInfo + :param check_permissions_group: Permission group for validations. Possible + values include: 'Default', 'MigrationFromSqlServerToAzureDB', + 'MigrationFromSqlServerToAzureMI', 'MigrationFromSqlServerToAzureVM', + 'MigrationFromOracleToSQL', 'MigrationFromOracleToAzureDB', + 'MigrationFromOracleToAzureDW', 'MigrationFromMySQLToSQL', + 'MigrationFromMySQLToAzureDB', 'MigrationFromMySQLToAzureDBForMySQL' + :type check_permissions_group: str or + ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'OracleConnectionInfo'}, + 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, + } + + def __init__(self, source_connection_info, check_permissions_group=None): + super(ConnectToSourceOracleTaskInput, self).__init__() + self.source_connection_info = source_connection_info + self.check_permissions_group = check_permissions_group diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_properties.py new file mode 100644 index 00000000000..ad8b1abb7f2 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_properties.py @@ -0,0 +1,65 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class ConnectToSourceOracleTaskProperties(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. + + :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 task_type: Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToSourceOracleTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToSourceNonSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceOracleTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceNonSqlTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(ConnectToSourceOracleTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'ConnectToSource.Oracle' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py new file mode 100644 index 00000000000..aa84f537cfb --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class ConnectToSourceSqlServerTaskInput(Model): + """Input for the task that validates connection to SQL Server and also + validates source server requirements. + + :param source_connection_info: 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', 'MigrationFromSqlServerToAzureVM', + 'MigrationFromOracleToSQL', 'MigrationFromOracleToAzureDB', + 'MigrationFromOracleToAzureDW', 'MigrationFromMySQLToSQL', + 'MigrationFromMySQLToAzureDB', 'MigrationFromMySQLToAzureDBForMySQL' + :type check_permissions_group: str or + ~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup + :param collect_logins: Flag for whether to collect logins from source + server. Default value: False . + :type collect_logins: bool + :param collect_agent_jobs: Flag for whether to collect agent jobs from + source server. Default value: False . + :type collect_agent_jobs: bool + """ + + _validation = { + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'check_permissions_group': {'key': 'checkPermissionsGroup', 'type': 'str'}, + 'collect_logins': {'key': 'collectLogins', 'type': 'bool'}, + 'collect_agent_jobs': {'key': 'collectAgentJobs', 'type': 'bool'}, + } + + def __init__(self, source_connection_info, check_permissions_group=None, collect_logins=False, collect_agent_jobs=False): + super(ConnectToSourceSqlServerTaskInput, self).__init__() + self.source_connection_info = source_connection_info + self.check_permissions_group = check_permissions_group + self.collect_logins = collect_logins + self.collect_agent_jobs = collect_agent_jobs diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output.py new file mode 100644 index 00000000000..eb59c54ffa2 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class ConnectToSourceSqlServerTaskOutput(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, + ConnectToSourceSqlServerTaskOutputLoginLevel, + ConnectToSourceSqlServerTaskOutputDatabaseLevel, + ConnectToSourceSqlServerTaskOutputTaskLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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': 'ConnectToSourceSqlServerTaskOutputAgentJobLevel', 'LoginLevelOutput': 'ConnectToSourceSqlServerTaskOutputLoginLevel', 'DatabaseLevelOutput': 'ConnectToSourceSqlServerTaskOutputDatabaseLevel', 'TaskLevelOutput': 'ConnectToSourceSqlServerTaskOutputTaskLevel'} + } + + def __init__(self): + super(ConnectToSourceSqlServerTaskOutput, self).__init__() + self.id = None + self.result_type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py new file mode 100644 index 00000000000..446a82c9208 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py @@ -0,0 +1,79 @@ +# 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 .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput + + +class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTaskOutput): + """AgentJob 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. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Constant filled by server. + :type result_type: str + :ivar name: AgentJob name + :vartype name: str + :ivar job_category: The type of AgentJob. + :vartype job_category: str + :ivar is_enabled: The state of the original AgentJob. + :vartype is_enabled: bool + :ivar job_owner: The owner of the AgentJob + :vartype job_owner: str + :ivar last_executed_on: UTC Date and time when the AgentJob was last + executed. + :vartype last_executed_on: datetime + :ivar validation_errors: Validation errors + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar migration_eligibility: Information about eligiblity 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): + super(ConnectToSourceSqlServerTaskOutputAgentJobLevel, self).__init__() + 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 + self.result_type = 'AgentJobLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_database_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_database_level.py new file mode 100644 index 00000000000..804d07e9e18 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_database_level.py @@ -0,0 +1,73 @@ +# 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 .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput + + +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. + + :ivar id: Result identifier + :vartype id: str + :param result_type: 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): + super(ConnectToSourceSqlServerTaskOutputDatabaseLevel, self).__init__() + self.name = None + self.size_mb = None + self.database_files = None + self.compatibility_level = None + self.database_state = None + self.result_type = 'DatabaseLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level.py new file mode 100644 index 00000000000..bd8215a1a59 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level.py @@ -0,0 +1,69 @@ +# 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 .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput + + +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. + + :ivar id: Result identifier + :vartype id: str + :param result_type: 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 eligiblity 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): + super(ConnectToSourceSqlServerTaskOutputLoginLevel, self).__init__() + self.name = None + self.login_type = None + self.default_database = None + self.is_enabled = None + self.migration_eligibility = None + self.result_type = 'LoginLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py new file mode 100644 index 00000000000..8eb5b26a6df --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py @@ -0,0 +1,72 @@ +# 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 .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTaskOutput + + +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. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Constant filled by server. + :type result_type: str + :ivar databases: Source databases as a map from database name to database + id + :vartype databases: dict[str, str] + :ivar logins: Source logins as a map from login name to login id. + :vartype logins: dict[str, str] + :ivar agent_jobs: Source agent jobs as a map from agent job name to id. + :vartype agent_jobs: dict[str, 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}, + '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}'}, + 'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'}, + 'source_server_brand_version': {'key': 'sourceServerBrandVersion', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self): + super(ConnectToSourceSqlServerTaskOutputTaskLevel, self).__init__() + self.databases = None + self.logins = None + self.agent_jobs = None + self.source_server_version = None + self.source_server_brand_version = None + self.validation_errors = None + self.result_type = 'TaskLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py new file mode 100644 index 00000000000..66f7ede5de9 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +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. + + :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 task_type: Constant filled by server. + :type task_type: 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 = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToSourceSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToSourceSqlServerTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(ConnectToSourceSqlServerTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'ConnectToSource.SqlServer' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py new file mode 100644 index 00000000000..391d558e271 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class ConnectToTargetAzureDbForMySqlTaskInput(Model): + """Input for the task that validates connection to Azure Database for MySQL + and target server requirements. + + :param source_connection_info: Connection information for source MySQL + server + :type source_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param target_connection_info: Connection information for target Azure + Database for MySQL server + :type target_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + """ + + _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'}, + } + + def __init__(self, source_connection_info, target_connection_info): + super(ConnectToTargetAzureDbForMySqlTaskInput, self).__init__() + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py new file mode 100644 index 00000000000..4b19e2d1202 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py @@ -0,0 +1,57 @@ +# 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 msrest.serialization import Model + + +class ConnectToTargetAzureDbForMySqlTaskOutput(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): + super(ConnectToTargetAzureDbForMySqlTaskOutput, self).__init__() + self.id = None + self.server_version = None + self.databases = None + self.target_server_brand_version = None + self.validation_errors = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py new file mode 100644 index 00000000000..f935b4619b5 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +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. + + :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 task_type: Constant filled by server. + :type task_type: 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 = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetAzureDbForMySqlTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetAzureDbForMySqlTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(ConnectToTargetAzureDbForMySqlTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'ConnectToTarget.AzureDbForMySql' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_input.py new file mode 100644 index 00000000000..f417cb5bda2 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_input.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class ConnectToTargetSqlDbTaskInput(Model): + """Input for the task that validates connection to SQL DB and target server + requirements. + + :param target_connection_info: 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): + super(ConnectToTargetSqlDbTaskInput, self).__init__() + self.target_connection_info = target_connection_info diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_output.py new file mode 100644 index 00000000000..3763bfed08a --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_output.py @@ -0,0 +1,52 @@ +# 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 msrest.serialization import Model + + +class ConnectToTargetSqlDbTaskOutput(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: dict[str, 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): + super(ConnectToTargetSqlDbTaskOutput, self).__init__() + self.id = None + self.databases = None + self.target_server_version = None + self.target_server_brand_version = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py new file mode 100644 index 00000000000..1664cf0f23d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +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. + + :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 task_type: Constant filled by server. + :type task_type: 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 = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlDbTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlDbTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(ConnectToTargetSqlDbTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'ConnectToTarget.SqlDb' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py new file mode 100644 index 00000000000..aeed2ae4a87 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ConnectToTargetSqlMITaskInput(Model): + """Input for the task that validates connection to Azure SQL Database Managed + Instance. + + :param target_connection_info: Connection information for target SQL + Server + :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): + super(ConnectToTargetSqlMITaskInput, self).__init__() + self.target_connection_info = target_connection_info diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py new file mode 100644 index 00000000000..f0a33fe53da --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py @@ -0,0 +1,62 @@ +# 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 msrest.serialization import Model + + +class ConnectToTargetSqlMITaskOutput(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): + super(ConnectToTargetSqlMITaskOutput, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py new file mode 100644 index 00000000000..8ae1108f5ed --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +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. + + :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 task_type: Constant filled by server. + :type task_type: 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 = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlMITaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlMITaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(ConnectToTargetSqlMITaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'ConnectToTarget.AzureSqlDbMI' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_input.py new file mode 100644 index 00000000000..424d38217d0 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_input.py @@ -0,0 +1,35 @@ +# 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 msrest.serialization import Model + + +class ConnectToTargetSqlServerTaskInput(Model): + """Input for the task that validates connection to SQL Server and target + server requirements. + + :param target_connection_info: Connection information for target SQL + Server + :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): + super(ConnectToTargetSqlServerTaskInput, self).__init__() + self.target_connection_info = target_connection_info diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_output.py new file mode 100644 index 00000000000..e66aafefabf --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_output.py @@ -0,0 +1,62 @@ +# 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 msrest.serialization import Model + + +class ConnectToTargetSqlServerTaskOutput(Model): + """Output for the task that validates connection to SQL Server 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: Target server version + :vartype target_server_version: str + :ivar target_server_brand_version: Target server brand version + :vartype target_server_brand_version: str + :ivar server_default_data_path: Default path of the data files + :vartype server_default_data_path: str + :ivar server_default_log_path: Default path of the log files + :vartype server_default_log_path: 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}, + 'server_default_data_path': {'readonly': True}, + 'server_default_log_path': {'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'}, + 'server_default_data_path': {'key': 'serverDefaultDataPath', 'type': 'str'}, + 'server_default_log_path': {'key': 'serverDefaultLogPath', 'type': 'str'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self): + super(ConnectToTargetSqlServerTaskOutput, self).__init__() + self.id = None + self.target_server_version = None + self.target_server_brand_version = None + self.server_default_data_path = None + self.server_default_log_path = None + self.validation_errors = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_properties.py new file mode 100644 index 00000000000..9718274430d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class ConnectToTargetSqlServerTaskProperties(ProjectTaskProperties): + """Properties for the task that validates connection to SQL Server and target + server requirements. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ConnectToTargetSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ConnectToTargetSqlServerTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ConnectToTargetSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ConnectToTargetSqlServerTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(ConnectToTargetSqlServerTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'ConnectToTarget.SqlServer' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connection_info.py b/src/datamigration/azext_dms/mgmt/datamigration/models/connection_info.py new file mode 100644 index 00000000000..2caab30b68a --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/connection_info.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class ConnectionInfo(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: OracleConnectionInfo, PostgreSqlConnectionInfo, + MySqlConnectionInfo, SqlConnectionInfo + + :param user_name: User name + :type user_name: str + :param password: Password credential. + :type password: str + :param type: Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'OracleConnectionInfo': 'OracleConnectionInfo', 'PostgreSqlConnectionInfo': 'PostgreSqlConnectionInfo', 'MySqlConnectionInfo': 'MySqlConnectionInfo', 'SqlConnectionInfo': 'SqlConnectionInfo'} + } + + def __init__(self, user_name=None, password=None): + super(ConnectionInfo, self).__init__() + self.user_name = user_name + self.password = password + self.type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_integrity_validation_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/data_integrity_validation_result.py new file mode 100644 index 00000000000..2d659aeac9f --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/data_integrity_validation_result.py @@ -0,0 +1,34 @@ +# 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 msrest.serialization import Model + + +class DataIntegrityValidationResult(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=None, validation_errors=None): + super(DataIntegrityValidationResult, self).__init__() + self.failed_objects = failed_objects + self.validation_errors = validation_errors diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_item_migration_summary_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/data_item_migration_summary_result.py new file mode 100644 index 00000000000..692ec37ad44 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/data_item_migration_summary_result.py @@ -0,0 +1,78 @@ +# 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 msrest.serialization import Model + + +class DataItemMigrationSummaryResult(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 + :ivar ended_on: Migration end time + :vartype ended_on: 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): + super(DataItemMigrationSummaryResult, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_error.py new file mode 100644 index 00000000000..906a4505cf9 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_error.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class DataMigrationError(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: 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=None): + super(DataMigrationError, self).__init__() + self.message = None + self.type = type diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_project_metadata.py b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_project_metadata.py new file mode 100644 index 00000000000..34425519b63 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_project_metadata.py @@ -0,0 +1,72 @@ +# 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 msrest.serialization import Model + + +class DataMigrationProjectMetadata(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): + super(DataMigrationProjectMetadata, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service.py b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service.py new file mode 100644 index 00000000000..bf7b088de62 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service.py @@ -0,0 +1,82 @@ +# 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 .tracked_resource import TrackedResource + + +class DataMigrationService(TrackedResource): + """A Data Migration Service 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: Resource location. + :type location: str + :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 + :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 sku: Service SKU + :type sku: ~azure.mgmt.datamigration.models.ServiceSku + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'virtual_subnet_id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'public_key': {'key': 'properties.publicKey', 'type': 'str'}, + 'virtual_subnet_id': {'key': 'properties.virtualSubnetId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ServiceSku'}, + } + + def __init__(self, location, virtual_subnet_id, tags=None, etag=None, kind=None, public_key=None, sku=None): + super(DataMigrationService, self).__init__(tags=tags, location=location) + self.etag = etag + self.kind = kind + self.provisioning_state = None + self.public_key = public_key + self.virtual_subnet_id = virtual_subnet_id + self.sku = sku diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_client_enums.py b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_client_enums.py new file mode 100644 index 00000000000..1d52c50c9d0 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_client_enums.py @@ -0,0 +1,332 @@ +# 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 + + +class CommandState(Enum): + + unknown = "Unknown" + accepted = "Accepted" + running = "Running" + succeeded = "Succeeded" + failed = "Failed" + + +class DatabaseFileType(Enum): + + rows = "Rows" + log = "Log" + filestream = "Filestream" + not_supported = "NotSupported" + fulltext = "Fulltext" + + +class AuthenticationType(Enum): + + none = "None" + windows_authentication = "WindowsAuthentication" + sql_authentication = "SqlAuthentication" + active_directory_integrated = "ActiveDirectoryIntegrated" + active_directory_password = "ActiveDirectoryPassword" + + +class OracleConnectionMode(Enum): + + connection_string = "ConnectionString" + standard = "Standard" + + +class SyncTableMigrationState(Enum): + + before_load = "BEFORE_LOAD" + full_load = "FULL_LOAD" + completed = "COMPLETED" + canceled = "CANCELED" + error = "ERROR" + failed = "FAILED" + + +class SyncDatabaseMigrationReportingState(Enum): + + 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" + + +class SyncMigrationState(Enum): + + undefined = "UNDEFINED" + validating = "VALIDATING" + pending = "PENDING" + complete = "COMPLETE" + action_required = "ACTION_REQUIRED" + failed = "FAILED" + + +class MigrationState(Enum): + + none = "None" + in_progress = "InProgress" + failed = "Failed" + warning = "Warning" + completed = "Completed" + skipped = "Skipped" + stopped = "Stopped" + + +class DatabaseMigrationStage(Enum): + + none = "None" + initialize = "Initialize" + backup = "Backup" + file_copy = "FileCopy" + restore = "Restore" + completed = "Completed" + + +class MigrationStatus(Enum): + + 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 ValidationStatus(Enum): + + default = "Default" + not_started = "NotStarted" + initialized = "Initialized" + in_progress = "InProgress" + completed = "Completed" + completed_with_issues = "CompletedWithIssues" + stopped = "Stopped" + failed = "Failed" + + +class Severity(Enum): + + message = "Message" + warning = "Warning" + error = "Error" + + +class UpdateActionType(Enum): + + deleted_on_target = "DeletedOnTarget" + changed_on_target = "ChangedOnTarget" + added_on_target = "AddedOnTarget" + + +class ObjectType(Enum): + + stored_procedures = "StoredProcedures" + table = "Table" + user = "User" + view = "View" + function = "Function" + + +class LoginMigrationStage(Enum): + + 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(Enum): + + windows_user = "WindowsUser" + windows_group = "WindowsGroup" + sql_login = "SqlLogin" + certificate = "Certificate" + asymmetric_key = "AsymmetricKey" + external_user = "ExternalUser" + external_group = "ExternalGroup" + + +class DatabaseState(Enum): + + online = "Online" + restoring = "Restoring" + recovering = "Recovering" + recovery_pending = "RecoveryPending" + suspect = "Suspect" + emergency = "Emergency" + offline = "Offline" + copying = "Copying" + offline_secondary = "OfflineSecondary" + + +class DatabaseCompatLevel(Enum): + + compat_level80 = "CompatLevel80" + compat_level90 = "CompatLevel90" + compat_level100 = "CompatLevel100" + compat_level110 = "CompatLevel110" + compat_level120 = "CompatLevel120" + compat_level130 = "CompatLevel130" + compat_level140 = "CompatLevel140" + + +class ServerLevelPermissionsGroup(Enum): + + default = "Default" + migration_from_sql_server_to_azure_db = "MigrationFromSqlServerToAzureDB" + migration_from_sql_server_to_azure_mi = "MigrationFromSqlServerToAzureMI" + migration_from_sql_server_to_azure_vm = "MigrationFromSqlServerToAzureVM" + migration_from_oracle_to_sql = "MigrationFromOracleToSQL" + migration_from_oracle_to_azure_db = "MigrationFromOracleToAzureDB" + migration_from_oracle_to_azure_dw = "MigrationFromOracleToAzureDW" + migration_from_my_sql_to_sql = "MigrationFromMySQLToSQL" + migration_from_my_sql_to_azure_db = "MigrationFromMySQLToAzureDB" + migration_from_my_sql_to_azure_db_for_my_sql = "MigrationFromMySQLToAzureDBForMySQL" + + +class TaskState(Enum): + + unknown = "Unknown" + queued = "Queued" + running = "Running" + canceled = "Canceled" + succeeded = "Succeeded" + failed = "Failed" + failed_input_validation = "FailedInputValidation" + faulted = "Faulted" + + +class ServiceProvisioningState(Enum): + + 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 ProjectTargetPlatform(Enum): + + sql10 = "SQL10" + sql11 = "SQL11" + sql12 = "SQL12" + sql13 = "SQL13" + sql14 = "SQL14" + sqldb = "SQLDB" + sqldw = "SQLDW" + sqlmi = "SQLMI" + sqlvm = "SQLVM" + azure_db_for_my_sql = "AzureDbForMySql" + azure_db_for_postgre_sql = "AzureDbForPostgreSql" + unknown = "Unknown" + + +class ProjectSourcePlatform(Enum): + + sql = "SQL" + access = "Access" + db2 = "DB2" + my_sql = "MySQL" + oracle = "Oracle" + sybase = "Sybase" + postgre_sql = "PostgreSql" + unknown = "Unknown" + + +class ProjectProvisioningState(Enum): + + deleting = "Deleting" + succeeded = "Succeeded" + + +class DataMovement(Enum): + + one_time_migration = "OneTimeMigration" + continuous = "Continuous" + + +class NameCheckFailureReason(Enum): + + already_exists = "AlreadyExists" + invalid = "Invalid" + + +class ServiceScalability(Enum): + + none = "none" + manual = "manual" + automatic = "automatic" + + +class ResourceSkuRestrictionsType(Enum): + + location = "location" + + +class ResourceSkuRestrictionsReasonCode(Enum): + + quota_id = "QuotaId" + not_available_for_subscription = "NotAvailableForSubscription" + + +class ResourceSkuCapacityScaleType(Enum): + + automatic = "Automatic" + manual = "Manual" + none = "None" + + +class MySqlTargetPlatformType(Enum): + + sql_server = "SqlServer" + azure_db_for_my_sql = "AzureDbForMySQL" + + +class ErrorType(Enum): + + default = "Default" + warning = "Warning" + error = "Error" + + +class DataMigrationResultCode(Enum): + + initial = "Initial" + completed = "Completed" + object_not_exists_in_source = "ObjectNotExistsInSource" + object_not_exists_in_target = "ObjectNotExistsInTarget" + target_object_is_inaccessible = "TargetObjectIsInaccessible" + fatal_error = "FatalError" diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_paged.py b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_paged.py new file mode 100644 index 00000000000..c49a03551cb --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class DataMigrationServicePaged(Paged): + """ + A paging container for iterating over a list of :class:`DataMigrationService ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DataMigrationService]'} + } + + def __init__(self, *args, **kwargs): + + super(DataMigrationServicePaged, self).__init__(*args, **kwargs) diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_status_response.py b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_status_response.py new file mode 100644 index 00000000000..3c90e5c91ed --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_status_response.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class DataMigrationServiceStatusResponse(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=None, status=None, vm_size=None, supported_task_types=None): + super(DataMigrationServiceStatusResponse, self).__init__() + self.agent_version = agent_version + self.status = status + self.vm_size = vm_size + self.supported_task_types = supported_task_types diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database.py b/src/datamigration/azext_dms/mgmt/datamigration/models/database.py new file mode 100644 index 00000000000..069644f6aa0 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/database.py @@ -0,0 +1,100 @@ +# 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 msrest.serialization import Model + + +class Database(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=None, name=None, compatibility_level=None, collation=None, server_name=None, fqdn=None, install_id=None, server_version=None, server_edition=None, server_level=None, server_default_data_path=None, server_default_log_path=None, server_default_backup_path=None, server_core_count=None, server_visible_online_core_count=None, database_state=None, server_id=None): + super(Database, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_file_info.py b/src/datamigration/azext_dms/mgmt/datamigration/models/database_file_info.py new file mode 100644 index 00000000000..e963e64ebbf --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/database_file_info.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class DatabaseFileInfo(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=None, id=None, logical_name=None, physical_full_name=None, restore_full_name=None, file_type=None, size_mb=None): + super(DatabaseFileInfo, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_file_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/database_file_input.py new file mode 100644 index 00000000000..007c6ad5363 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/database_file_input.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class DatabaseFileInput(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=None, logical_name=None, physical_full_name=None, restore_full_name=None, file_type=None): + super(DatabaseFileInput, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_info.py b/src/datamigration/azext_dms/mgmt/datamigration/models/database_info.py new file mode 100644 index 00000000000..8d4172eb106 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/database_info.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class DatabaseInfo(Model): + """Project Database Details. + + :param source_database_name: 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): + super(DatabaseInfo, self).__init__() + self.source_database_name = source_database_name diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_object_name.py b/src/datamigration/azext_dms/mgmt/datamigration/models/database_object_name.py new file mode 100644 index 00000000000..41d6d8fca9e --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/database_object_name.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class DatabaseObjectName(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=None): + super(DatabaseObjectName, self).__init__() + self.database_name = None + self.object_name = None + self.schema_name = None + self.object_type = object_type diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_summary_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/database_summary_result.py new file mode 100644 index 00000000000..fc5b8ee7d10 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/database_summary_result.py @@ -0,0 +1,74 @@ +# 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_item_migration_summary_result import DataItemMigrationSummaryResult + + +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 + :ivar ended_on: Migration end time + :vartype ended_on: 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): + super(DatabaseSummaryResult, self).__init__() + self.size_mb = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_table.py b/src/datamigration/azext_dms/mgmt/datamigration/models/database_table.py new file mode 100644 index 00000000000..685fcca40a7 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/database_table.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class DatabaseTable(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): + super(DatabaseTable, self).__init__() + self.has_rows = None + self.name = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/execution_statistics.py b/src/datamigration/azext_dms/mgmt/datamigration/models/execution_statistics.py new file mode 100644 index 00000000000..aa54dea81c8 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/execution_statistics.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class ExecutionStatistics(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=None, cpu_time_ms=None, elapsed_time_ms=None, wait_stats=None, has_errors=None, sql_errors=None): + super(ExecutionStatistics, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/file_share.py b/src/datamigration/azext_dms/mgmt/datamigration/models/file_share.py new file mode 100644 index 00000000000..10f079a5e11 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/file_share.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class FileShare(Model): + """File share information with Path, Username, and Password. + + :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: 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, user_name=None, password=None): + super(FileShare, self).__init__() + self.user_name = user_name + self.password = password + self.path = path diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_output.py new file mode 100644 index 00000000000..6a5a2d83e14 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_output.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class GetProjectDetailsMySqlSqlTaskOutput(Model): + """Output for task that reads information from project artifacts for MySQL as + source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar migration_project_metadata: Metadata obtained from project + :vartype migration_project_metadata: + ~azure.mgmt.datamigration.models.MySqlDataMigrationProjectMetadata + """ + + _validation = { + 'id': {'readonly': True}, + 'migration_project_metadata': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'migration_project_metadata': {'key': 'migrationProjectMetadata', 'type': 'MySqlDataMigrationProjectMetadata'}, + } + + def __init__(self): + super(GetProjectDetailsMySqlSqlTaskOutput, self).__init__() + self.id = None + self.migration_project_metadata = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_properties.py new file mode 100644 index 00000000000..98c57d64426 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class GetProjectDetailsMySqlSqlTaskProperties(ProjectTaskProperties): + """Properties for task that reads information from project artifacts for MySQL + as source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.GetProjectDetailsNonSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.GetProjectDetailsMySqlSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetProjectDetailsNonSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetProjectDetailsMySqlSqlTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(GetProjectDetailsMySqlSqlTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'GetProjectDetails.MySql.Sql' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_non_sql_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_non_sql_task_input.py new file mode 100644 index 00000000000..04059885287 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_non_sql_task_input.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class GetProjectDetailsNonSqlTaskInput(Model): + """Input for the task that reads configuration from project artifacts. + + :param project_name: Name of the migration project + :type project_name: str + :param project_location: 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, project_location): + super(GetProjectDetailsNonSqlTaskInput, self).__init__() + self.project_name = project_name + self.project_location = project_location diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_output.py new file mode 100644 index 00000000000..53d2e92f771 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_output.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class GetProjectDetailsOracleSqlTaskOutput(Model): + """Output for task that reads information from project artifacts for Oracle as + source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :ivar migration_project_metadata: Metadata obtained from project + :vartype migration_project_metadata: + ~azure.mgmt.datamigration.models.OracleDataMigrationProjectMetadata + """ + + _validation = { + 'id': {'readonly': True}, + 'migration_project_metadata': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'migration_project_metadata': {'key': 'migrationProjectMetadata', 'type': 'OracleDataMigrationProjectMetadata'}, + } + + def __init__(self): + super(GetProjectDetailsOracleSqlTaskOutput, self).__init__() + self.id = None + self.migration_project_metadata = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_properties.py new file mode 100644 index 00000000000..ec56f4bdb99 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class GetProjectDetailsOracleSqlTaskProperties(ProjectTaskProperties): + """Properties for task that reads information from project artifacts for + Oracle as source. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.GetProjectDetailsNonSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.GetProjectDetailsOracleSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetProjectDetailsNonSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetProjectDetailsOracleSqlTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(GetProjectDetailsOracleSqlTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'GetProjectDetails.Oracle.Sql' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_input.py new file mode 100644 index 00000000000..8207803dbbe --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_input.py @@ -0,0 +1,38 @@ +# 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 msrest.serialization import Model + + +class GetUserTablesSqlTaskInput(Model): + """Input for the task that collects user tables for the given list of + databases. + + :param connection_info: Connection information for SQL Server + :type connection_info: ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: 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, selected_databases): + super(GetUserTablesSqlTaskInput, self).__init__() + self.connection_info = connection_info + self.selected_databases = selected_databases diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_output.py new file mode 100644 index 00000000000..12a6a07e8b0 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_output.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class GetUserTablesSqlTaskOutput(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: dict[str, + list[~azure.mgmt.datamigration.models.DatabaseTable]] + :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': '{[DatabaseTable]}'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self): + super(GetUserTablesSqlTaskOutput, self).__init__() + self.id = None + self.databases_to_tables = None + self.validation_errors = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_properties.py new file mode 100644 index 00000000000..b335fbfeb9a --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_properties.py @@ -0,0 +1,65 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +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. + + :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 task_type: Constant filled by server. + :type task_type: 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 = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetUserTablesSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesSqlTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(GetUserTablesSqlTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'GetUserTables.Sql' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py new file mode 100644 index 00000000000..0c025398b02 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class MigrateMySqlAzureDbForMySqlSyncDatabaseInput(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 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] + """ + + _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}'}, + } + + def __init__(self, name=None, target_database_name=None, make_source_db_read_only=None, table_map=None): + super(MigrateMySqlAzureDbForMySqlSyncDatabaseInput, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py new file mode 100644 index 00000000000..31d4353081b --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class MigrateMySqlAzureDbForMySqlSyncTaskInput(Model): + """Input for the task that migrates MySQL databases to Azure Database for + MySQL with continuous sync. + + :param selected_databases: Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncDatabaseInput] + :param target_connection_info: Connection information for target Azure + Database for MySQL + :type target_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + :param source_connection_info: Connection information for source MySQL + :type source_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + """ + + _validation = { + 'selected_databases': {'required': True}, + 'target_connection_info': {'required': True}, + 'source_connection_info': {'required': True}, + } + + _attribute_map = { + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateMySqlAzureDbForMySqlSyncDatabaseInput]'}, + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + } + + def __init__(self, selected_databases, target_connection_info, source_connection_info): + super(MigrateMySqlAzureDbForMySqlSyncTaskInput, self).__init__() + self.selected_databases = selected_databases + self.target_connection_info = target_connection_info + self.source_connection_info = source_connection_info diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py new file mode 100644 index 00000000000..c700914b9cc --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py @@ -0,0 +1,52 @@ +# 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 msrest.serialization import Model + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutput(Model): + """Output for the task that migrates MySQL databases to Azure Database for + MySQL with continuous sync. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputError, + MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, + MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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', 'ErrorOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputError', 'TableLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel', 'DatabaseLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel'} + } + + def __init__(self): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutput, self).__init__() + self.id = None + self.result_type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py new file mode 100644 index 00000000000..965a138ce59 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py @@ -0,0 +1,48 @@ +# 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 .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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=None, events=None): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError, self).__init__() + self.error_message = error_message + self.events = events + self.result_type = 'DatabaseLevelErrorOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py new file mode 100644 index 00000000000..a821acd23b2 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py @@ -0,0 +1,119 @@ +# 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 .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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 + :ivar ended_on: Migration end time + :vartype ended_on: 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' + :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): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseLevel, self).__init__() + 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 + self.result_type = 'DatabaseLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py new file mode 100644 index 00000000000..c8080354690 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py @@ -0,0 +1,44 @@ +# 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 .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputError(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputError, self).__init__() + self.error = None + self.result_type = 'ErrorOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py new file mode 100644 index 00000000000..77212cd97f0 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py @@ -0,0 +1,76 @@ +# 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 .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar state: Current state of migration. Possible values include: + 'UNDEFINED', 'VALIDATING', 'PENDING', 'COMPLETE', 'ACTION_REQUIRED', + 'FAILED' + :vartype state: str or ~azure.mgmt.datamigration.models.SyncMigrationState + :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}, + 'state': {'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'}, + 'state': {'key': 'state', 'type': 'str'}, + '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): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel, self).__init__() + self.started_on = None + self.ended_on = None + self.state = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.result_type = 'MigrationLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py new file mode 100644 index 00000000000..6eadd0921be --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py @@ -0,0 +1,112 @@ +# 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 .migrate_my_sql_azure_db_for_my_sql_sync_task_output import MigrateMySqlAzureDbForMySqlSyncTaskOutput + + +class MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel(MigrateMySqlAzureDbForMySqlSyncTaskOutput): + """MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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 FullLoad + :vartype full_load_est_finish_time: datetime + :ivar full_load_started_on: Full load start time + :vartype full_load_started_on: datetime + :ivar full_load_ended_on: Full load end time + :vartype full_load_ended_on: datetime + :ivar full_load_total_volume_bytes: Total size of full load in bytes + :vartype full_load_total_volume_bytes: long + :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 + """ + + _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_volume_bytes': {'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_volume_bytes': {'key': 'fullLoadTotalVolumeBytes', 'type': 'long'}, + '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): + super(MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel, self).__init__() + 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_volume_bytes = 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 + self.result_type = 'TableLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py new file mode 100644 index 00000000000..da94ecb877b --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class MigrateMySqlAzureDbForMySqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates MySQL databases to Azure Database for + MySQL with continuous sync. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: 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 = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateMySqlAzureDbForMySqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateMySqlAzureDbForMySqlSyncTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(MigrateMySqlAzureDbForMySqlSyncTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'Migrate.MySql.AzureDbForMySql.Sync' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_input.py new file mode 100644 index 00000000000..bf954fee8db --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_input.py @@ -0,0 +1,57 @@ +# 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 .non_sql_migration_task_input import NonSqlMigrationTaskInput + + +class MigrateMySqlSqlTaskInput(NonSqlMigrationTaskInput): + """Input for task that migrates MySQL databases to Azure and SQL Server + databases. + + :param target_connection_info: Information for connecting to target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_database_name: Target database name + :type target_database_name: str + :param project_name: Name of the migration project + :type project_name: str + :param project_location: An URL that points to the drop location to access + project artifacts + :type project_location: str + :param selected_tables: Metadata of the tables selected for migration + :type selected_tables: + list[~azure.mgmt.datamigration.models.NonSqlDataMigrationTable] + :param source_connection_info: Information for connecting to MySQL source + :type source_connection_info: + ~azure.mgmt.datamigration.models.MySqlConnectionInfo + """ + + _validation = { + 'target_connection_info': {'required': True}, + 'target_database_name': {'required': True}, + 'project_name': {'required': True}, + 'project_location': {'required': True}, + 'selected_tables': {'required': True}, + 'source_connection_info': {'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]'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'}, + } + + def __init__(self, target_connection_info, target_database_name, project_name, project_location, selected_tables, source_connection_info): + super(MigrateMySqlSqlTaskInput, self).__init__(target_connection_info=target_connection_info, target_database_name=target_database_name, project_name=project_name, project_location=project_location, selected_tables=selected_tables) + self.source_connection_info = source_connection_info diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_output.py new file mode 100644 index 00000000000..84b8212579a --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_output.py @@ -0,0 +1,57 @@ +# 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 .non_sql_migration_task_output import NonSqlMigrationTaskOutput + + +class MigrateMySqlSqlTaskOutput(NonSqlMigrationTaskOutput): + """Output for task that migrates MySQL databases to Azure and SQL Server + databases. + + 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 + :ivar ended_on: Migration end time + :vartype ended_on: 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: dict[str, + ~azure.mgmt.datamigration.models.NonSqlDataMigrationTableResult] + :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}, + } + + def __init__(self): + super(MigrateMySqlSqlTaskOutput, self).__init__() diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_properties.py new file mode 100644 index 00000000000..1b0458babe7 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_properties.py @@ -0,0 +1,65 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class MigrateMySqlSqlTaskProperties(ProjectTaskProperties): + """Properties for task that migrates MySQL databases to Azure and SQL Server + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: str + :param input: Task input + :type input: ~azure.mgmt.datamigration.models.MigrateMySqlSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateMySqlSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateMySqlSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateMySqlSqlTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(MigrateMySqlSqlTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'Migrate.MySql.Sql' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_input.py new file mode 100644 index 00000000000..4b63760271d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_input.py @@ -0,0 +1,57 @@ +# 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 .non_sql_migration_task_input import NonSqlMigrationTaskInput + + +class MigrateOracleSqlTaskInput(NonSqlMigrationTaskInput): + """Input for task that migrates Oracle databases to Azure and SQL Server + databases. + + :param target_connection_info: Information for connecting to target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_database_name: Target database name + :type target_database_name: str + :param project_name: Name of the migration project + :type project_name: str + :param project_location: An URL that points to the drop location to access + project artifacts + :type project_location: str + :param selected_tables: Metadata of the tables selected for migration + :type selected_tables: + list[~azure.mgmt.datamigration.models.NonSqlDataMigrationTable] + :param source_connection_info: Information for connecting to Oracle source + :type source_connection_info: + ~azure.mgmt.datamigration.models.OracleConnectionInfo + """ + + _validation = { + 'target_connection_info': {'required': True}, + 'target_database_name': {'required': True}, + 'project_name': {'required': True}, + 'project_location': {'required': True}, + 'selected_tables': {'required': True}, + 'source_connection_info': {'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]'}, + 'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'OracleConnectionInfo'}, + } + + def __init__(self, target_connection_info, target_database_name, project_name, project_location, selected_tables, source_connection_info): + super(MigrateOracleSqlTaskInput, self).__init__(target_connection_info=target_connection_info, target_database_name=target_database_name, project_name=project_name, project_location=project_location, selected_tables=selected_tables) + self.source_connection_info = source_connection_info diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_output.py new file mode 100644 index 00000000000..fd59373c94f --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_output.py @@ -0,0 +1,57 @@ +# 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 .non_sql_migration_task_output import NonSqlMigrationTaskOutput + + +class MigrateOracleSqlTaskOutput(NonSqlMigrationTaskOutput): + """Output for task that migrates Oracle databases to Azure and SQL Server + databases. + + 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 + :ivar ended_on: Migration end time + :vartype ended_on: 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: dict[str, + ~azure.mgmt.datamigration.models.NonSqlDataMigrationTableResult] + :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}, + } + + def __init__(self): + super(MigrateOracleSqlTaskOutput, self).__init__() diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_properties.py new file mode 100644 index 00000000000..de9cbdd7556 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_properties.py @@ -0,0 +1,65 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class MigrateOracleSqlTaskProperties(ProjectTaskProperties): + """Properties for task that migrates Oracle databases to Azure and SQL Server + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: str + :param input: Task input + :type input: ~azure.mgmt.datamigration.models.MigrateOracleSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateOracleSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateOracleSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateOracleSqlTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(MigrateOracleSqlTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'Migrate.Oracle.Sql' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py new file mode 100644 index 00000000000..19baa60c451 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput(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 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] + """ + + _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}'}, + } + + def __init__(self, name=None, target_database_name=None, make_source_db_read_only=None, table_map=None): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py new file mode 100644 index 00000000000..e93b7f5fac5 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py @@ -0,0 +1,48 @@ +# 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 msrest.serialization import Model + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput(Model): + """Input for the task that migrates PostgreSQL databases to Azure Database for + PostgreSQL with continuous sync. + + :param selected_databases: Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput] + :param target_connection_info: Connection information for target Azure + Database for PostgreSQL + :type target_connection_info: + ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param source_connection_info: Connection information for source + PostgreSQL + :type source_connection_info: + ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + """ + + _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'}, + } + + def __init__(self, selected_databases, target_connection_info, source_connection_info): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, self).__init__() + self.selected_databases = selected_databases + self.target_connection_info = target_connection_info + self.source_connection_info = source_connection_info diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py new file mode 100644 index 00000000000..7e01c72c3aa --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput(Model): + """Output for the task that migrates PostgreSQL databases to Azure Database + for PostgreSQL with continuous sync. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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', 'ErrorOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError', 'TableLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel', 'DatabaseLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel'} + } + + def __init__(self): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput, self).__init__() + self.id = None + self.result_type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py new file mode 100644 index 00000000000..6533e6c1306 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py @@ -0,0 +1,48 @@ +# 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 .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """Output database task error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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=None, events=None): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, self).__init__() + self.error_message = error_message + self.events = events + self.result_type = 'DatabaseLevelErrorOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py new file mode 100644 index 00000000000..c1278ff4457 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py @@ -0,0 +1,119 @@ +# 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 .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """Output info on the database level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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 + :ivar ended_on: Migration end time + :vartype ended_on: 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' + :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): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel, self).__init__() + 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 + self.result_type = 'DatabaseLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py new file mode 100644 index 00000000000..ac363855ae1 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py @@ -0,0 +1,44 @@ +# 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 .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """Output task error. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError, self).__init__() + self.error = None + self.result_type = 'ErrorOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py new file mode 100644 index 00000000000..9044c24bd49 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py @@ -0,0 +1,76 @@ +# 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 .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """Output info on the migration level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar state: Current state of migration. Possible values include: + 'UNDEFINED', 'VALIDATING', 'PENDING', 'COMPLETE', 'ACTION_REQUIRED', + 'FAILED' + :vartype state: str or ~azure.mgmt.datamigration.models.SyncMigrationState + :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}, + 'state': {'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'}, + 'state': {'key': 'state', 'type': 'str'}, + '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): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, self).__init__() + self.started_on = None + self.ended_on = None + self.state = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.result_type = 'MigrationLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py new file mode 100644 index 00000000000..b457fdfb126 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py @@ -0,0 +1,112 @@ +# 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 .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput): + """Output info on the table level. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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 FullLoad + :vartype full_load_est_finish_time: datetime + :ivar full_load_started_on: Full load start time + :vartype full_load_started_on: datetime + :ivar full_load_ended_on: Full load end time + :vartype full_load_ended_on: datetime + :ivar full_load_total_volume_bytes: Total size of full load in bytes + :vartype full_load_total_volume_bytes: long + :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 + """ + + _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_volume_bytes': {'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_volume_bytes': {'key': 'fullLoadTotalVolumeBytes', 'type': 'long'}, + '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): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel, self).__init__() + 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_volume_bytes = 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 + self.result_type = 'TableLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py new file mode 100644 index 00000000000..d04e32efb3c --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates PostgreSQL databases to Azure + Database for PostgreSQL with continuous sync. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: 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] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_database_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_database_input.py new file mode 100644 index 00000000000..323847870db --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_database_input.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class MigrateSqlServerSqlDbDatabaseInput(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] + """ + + _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}'}, + } + + def __init__(self, name=None, target_database_name=None, make_source_db_read_only=None, table_map=None): + super(MigrateSqlServerSqlDbDatabaseInput, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py new file mode 100644 index 00000000000..7d1ff426957 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py @@ -0,0 +1,44 @@ +# 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 .sql_migration_task_input import SqlMigrationTaskInput + + +class MigrateSqlServerSqlDbSyncTaskInput(SqlMigrationTaskInput): + """Input for the task that migrates on-prem SQL Server databases to Azure SQL + Database with continuous sync. + + :param source_connection_info: Information for connecting to source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Information for connecting to target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlDbDatabaseInput] + """ + + _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]'}, + } + + def __init__(self, source_connection_info, target_connection_info, selected_databases): + super(MigrateSqlServerSqlDbSyncTaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info) + self.selected_databases = selected_databases diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py new file mode 100644 index 00000000000..94efca91bb3 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py @@ -0,0 +1,52 @@ +# 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 msrest.serialization import Model + + +class MigrateSqlServerSqlDbSyncTaskOutput(Model): + """Output for the task that migrates on-prem SQL Server databases to Azure SQL + Database with continuous sync. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, + MigrateSqlServerSqlDbSyncTaskOutputError, + MigrateSqlServerSqlDbSyncTaskOutputTableLevel, + MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, + MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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', 'ErrorOutput': 'MigrateSqlServerSqlDbSyncTaskOutputError', 'TableLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputTableLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel'} + } + + def __init__(self): + super(MigrateSqlServerSqlDbSyncTaskOutput, self).__init__() + self.id = None + self.result_type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py new file mode 100644 index 00000000000..f91b229b5ec --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py @@ -0,0 +1,48 @@ +# 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 .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputDatabaseError(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputDatabaseError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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=None, events=None): + super(MigrateSqlServerSqlDbSyncTaskOutputDatabaseError, self).__init__() + self.error_message = error_message + self.events = events + self.result_type = 'DatabaseLevelErrorOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py new file mode 100644 index 00000000000..6a678eab61d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py @@ -0,0 +1,119 @@ +# 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 .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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 + :ivar ended_on: Migration end time + :vartype ended_on: 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' + :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): + super(MigrateSqlServerSqlDbSyncTaskOutputDatabaseLevel, self).__init__() + 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 + self.result_type = 'DatabaseLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py new file mode 100644 index 00000000000..5abd29c3b76 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py @@ -0,0 +1,44 @@ +# 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 .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputError(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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): + super(MigrateSqlServerSqlDbSyncTaskOutputError, self).__init__() + self.error = None + self.result_type = 'ErrorOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py new file mode 100644 index 00000000000..fcafdb9a229 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py @@ -0,0 +1,76 @@ +# 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 .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: datetime + :ivar state: Current state of migration. Possible values include: + 'UNDEFINED', 'VALIDATING', 'PENDING', 'COMPLETE', 'ACTION_REQUIRED', + 'FAILED' + :vartype state: str or ~azure.mgmt.datamigration.models.SyncMigrationState + :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}, + 'state': {'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'}, + 'state': {'key': 'state', 'type': 'str'}, + '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): + super(MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel, self).__init__() + self.started_on = None + self.ended_on = None + self.state = None + self.source_server_version = None + self.source_server = None + self.target_server_version = None + self.target_server = None + self.result_type = 'MigrationLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py new file mode 100644 index 00000000000..cac7fe7505b --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py @@ -0,0 +1,112 @@ +# 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 .migrate_sql_server_sql_db_sync_task_output import MigrateSqlServerSqlDbSyncTaskOutput + + +class MigrateSqlServerSqlDbSyncTaskOutputTableLevel(MigrateSqlServerSqlDbSyncTaskOutput): + """MigrateSqlServerSqlDbSyncTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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 FullLoad + :vartype full_load_est_finish_time: datetime + :ivar full_load_started_on: Full load start time + :vartype full_load_started_on: datetime + :ivar full_load_ended_on: Full load end time + :vartype full_load_ended_on: datetime + :ivar full_load_total_volume_bytes: Total size of full load in bytes + :vartype full_load_total_volume_bytes: long + :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 + """ + + _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_volume_bytes': {'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_volume_bytes': {'key': 'fullLoadTotalVolumeBytes', 'type': 'long'}, + '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): + super(MigrateSqlServerSqlDbSyncTaskOutputTableLevel, self).__init__() + 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_volume_bytes = 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 + self.result_type = 'TableLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py new file mode 100644 index 00000000000..6decb7a953d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class MigrateSqlServerSqlDbSyncTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates on-prem SQL Server databases to Azure + SQL Database with continuous sync. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: 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 = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlDbSyncTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbSyncTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(MigrateSqlServerSqlDbSyncTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'Migrate.SqlServer.AzureSqlDb.Sync' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_input.py new file mode 100644 index 00000000000..b00e84e522c --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_input.py @@ -0,0 +1,59 @@ +# 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 .sql_migration_task_input import SqlMigrationTaskInput + + +class MigrateSqlServerSqlDbTaskInput(SqlMigrationTaskInput): + """Input for the task that migrates on-prem SQL Server databases to Azure SQL + Database. + + :param source_connection_info: Information for connecting to source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Information for connecting to target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: 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 + """ + + _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'}, + } + + def __init__(self, source_connection_info, target_connection_info, selected_databases, validation_options=None): + super(MigrateSqlServerSqlDbTaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info) + self.selected_databases = selected_databases + self.validation_options = validation_options diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output.py new file mode 100644 index 00000000000..5425b38d076 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class MigrateSqlServerSqlDbTaskOutput(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: MigrateSqlServerSqlDbTaskOutputError, + MigrateSqlServerSqlDbTaskOutputTableLevel, + MigrateSqlServerSqlDbTaskOutputDatabaseLevel, + MigrateSqlServerSqlDbTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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': {'ErrorOutput': 'MigrateSqlServerSqlDbTaskOutputError', 'TableLevelOutput': 'MigrateSqlServerSqlDbTaskOutputTableLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlDbTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlDbTaskOutputMigrationLevel'} + } + + def __init__(self): + super(MigrateSqlServerSqlDbTaskOutput, self).__init__() + self.id = None + self.result_type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py new file mode 100644 index 00000000000..ed3d14a2b95 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py @@ -0,0 +1,118 @@ +# 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 .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput + + +class MigrateSqlServerSqlDbTaskOutputDatabaseLevel(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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 + :ivar ended_on: Migration end time + :vartype ended_on: 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: dict[str, + ~azure.mgmt.datamigration.models.DataItemMigrationSummaryResult] + """ + + _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': '{DataItemMigrationSummaryResult}'}, + } + + def __init__(self): + super(MigrateSqlServerSqlDbTaskOutputDatabaseLevel, self).__init__() + 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 + self.result_type = 'DatabaseLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py new file mode 100644 index 00000000000..663cf4b0e2f --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py @@ -0,0 +1,44 @@ +# 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 .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput + + +class MigrateSqlServerSqlDbTaskOutputError(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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): + super(MigrateSqlServerSqlDbTaskOutputError, self).__init__() + self.error = None + self.result_type = 'ErrorOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py new file mode 100644 index 00000000000..f50a3295081 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.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 .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput + + +class MigrateSqlServerSqlDbTaskOutputMigrationLevel(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: 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: dict[str, str] + :ivar database_summary: Summary of database results in the migration + :vartype database_summary: dict[str, + ~azure.mgmt.datamigration.models.DatabaseSummaryResult] + :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': '{DatabaseSummaryResult}'}, + '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=None, migration_report_result=None): + super(MigrateSqlServerSqlDbTaskOutputMigrationLevel, self).__init__() + 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 + self.result_type = 'MigrationLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py new file mode 100644 index 00000000000..942f4b65ddb --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py @@ -0,0 +1,87 @@ +# 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 .migrate_sql_server_sql_db_task_output import MigrateSqlServerSqlDbTaskOutput + + +class MigrateSqlServerSqlDbTaskOutputTableLevel(MigrateSqlServerSqlDbTaskOutput): + """MigrateSqlServerSqlDbTaskOutputTableLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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 + :ivar ended_on: Migration end time + :vartype ended_on: 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): + super(MigrateSqlServerSqlDbTaskOutputTableLevel, self).__init__() + 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.result_type = 'TableLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py new file mode 100644 index 00000000000..d3df4d55005 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +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. + + :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 task_type: Constant filled by server. + :type task_type: 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] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlDbTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlDbTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(MigrateSqlServerSqlDbTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'Migrate.SqlServer.SqlDb' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py new file mode 100644 index 00000000000..fbd9ea429ea --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class MigrateSqlServerSqlMIDatabaseInput(Model): + """Database specific information for SQL to Azure SQL DB Managed Instance + 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_file_share: Backup file share information for backing up + this database. + :type backup_file_share: ~azure.mgmt.datamigration.models.FileShare + """ + + _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'}, + } + + def __init__(self, name, restore_database_name, backup_file_share=None): + super(MigrateSqlServerSqlMIDatabaseInput, self).__init__() + self.name = name + self.restore_database_name = restore_database_name + self.backup_file_share = backup_file_share diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py new file mode 100644 index 00000000000..22697197ad7 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py @@ -0,0 +1,63 @@ +# 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 .sql_migration_task_input import SqlMigrationTaskInput + + +class MigrateSqlServerSqlMITaskInput(SqlMigrationTaskInput): + """Input for task that migrates SQL Server databases to Azure SQL Database + Managed Instance. + + :param source_connection_info: Information for connecting to source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Information for connecting to target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlMIDatabaseInput] + :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: SAS URI of Azure Storage Account Container to be + used for storing backup files. + :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare + """ + + _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]'}, + 'selected_agent_jobs': {'key': 'selectedAgentJobs', 'type': '[str]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, + } + + def __init__(self, source_connection_info, target_connection_info, selected_databases, backup_blob_share, selected_logins=None, selected_agent_jobs=None, backup_file_share=None): + super(MigrateSqlServerSqlMITaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info) + self.selected_databases = selected_databases + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py new file mode 100644 index 00000000000..186c8080e37 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py @@ -0,0 +1,52 @@ +# 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 msrest.serialization import Model + + +class MigrateSqlServerSqlMITaskOutput(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: MigrateSqlServerSqlMITaskOutputError, + MigrateSqlServerSqlMITaskOutputLoginLevel, + MigrateSqlServerSqlMITaskOutputAgentJobLevel, + MigrateSqlServerSqlMITaskOutputDatabaseLevel, + MigrateSqlServerSqlMITaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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': {'ErrorOutput': 'MigrateSqlServerSqlMITaskOutputError', 'LoginLevelOutput': 'MigrateSqlServerSqlMITaskOutputLoginLevel', 'AgentJobLevelOutput': 'MigrateSqlServerSqlMITaskOutputAgentJobLevel', 'DatabaseLevelOutput': 'MigrateSqlServerSqlMITaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlMITaskOutputMigrationLevel'} + } + + def __init__(self): + super(MigrateSqlServerSqlMITaskOutput, self).__init__() + self.id = None + self.result_type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py new file mode 100644 index 00000000000..eadcf747c1d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py @@ -0,0 +1,76 @@ +# 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 .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputAgentJobLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputAgentJobLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Constant filled by server. + :type result_type: str + :ivar name: AgentJob name. + :vartype name: str + :ivar is_enabled: The state of the original AgentJob. + :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 + :ivar ended_on: Migration end time + :vartype ended_on: 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): + super(MigrateSqlServerSqlMITaskOutputAgentJobLevel, self).__init__() + 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 + self.result_type = 'AgentJobLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py new file mode 100644 index 00000000000..deb0eb4970e --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py @@ -0,0 +1,83 @@ +# 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 .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputDatabaseLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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 + :ivar ended_on: Migration end time + :vartype ended_on: 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): + super(MigrateSqlServerSqlMITaskOutputDatabaseLevel, self).__init__() + 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 + self.result_type = 'DatabaseLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py new file mode 100644 index 00000000000..cbe008f98f2 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py @@ -0,0 +1,44 @@ +# 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 .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputError(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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): + super(MigrateSqlServerSqlMITaskOutputError, self).__init__() + self.error = None + self.result_type = 'ErrorOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py new file mode 100644 index 00000000000..fc2ca422c32 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py @@ -0,0 +1,81 @@ +# 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 .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputLoginLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputLoginLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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 + :ivar ended_on: Login migration end time + :vartype ended_on: 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): + super(MigrateSqlServerSqlMITaskOutputLoginLevel, self).__init__() + 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 + self.result_type = 'LoginLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py new file mode 100644 index 00000000000..f3c7f2f47d4 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.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 .migrate_sql_server_sql_mi_task_output import MigrateSqlServerSqlMITaskOutput + + +class MigrateSqlServerSqlMITaskOutputMigrationLevel(MigrateSqlServerSqlMITaskOutput): + """MigrateSqlServerSqlMITaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: 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: dict[str, str] + :ivar logins: Selected logins as a map from name to id + :vartype logins: dict[str, str] + :ivar message: Migration progress message + :vartype message: str + :ivar server_role_results: Map of server role migration results. + :vartype server_role_results: dict[str, + ~azure.mgmt.datamigration.models.StartMigrationScenarioServerRoleResult] + :ivar orphaned_users: Map of users to database name of orphaned users. + :vartype orphaned_users: dict[str, str] + :ivar databases: Selected databases as a map from database name to + database id + :vartype databases: dict[str, 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': {'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': '{StartMigrationScenarioServerRoleResult}'}, + 'orphaned_users': {'key': 'orphanedUsers', 'type': '{str}'}, + '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): + super(MigrateSqlServerSqlMITaskOutputMigrationLevel, self).__init__() + 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 = 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 + self.result_type = 'MigrationLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py new file mode 100644 index 00000000000..c457023f700 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +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. + + :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 task_type: Constant filled by server. + :type task_type: 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] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlMITaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlMITaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(MigrateSqlServerSqlMITaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'Migrate.SqlServer.AzureSqlDbMI' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input.py new file mode 100644 index 00000000000..15c8fd272cf --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input.py @@ -0,0 +1,41 @@ +# 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 msrest.serialization import Model + + +class MigrateSqlServerSqlServerDatabaseInput(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=None, restore_database_name=None, backup_and_restore_folder=None, database_files=None): + super(MigrateSqlServerSqlServerDatabaseInput, self).__init__() + self.name = name + self.restore_database_name = restore_database_name + self.backup_and_restore_folder = backup_and_restore_folder + self.database_files = database_files diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_input.py new file mode 100644 index 00000000000..203d234ba4b --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_input.py @@ -0,0 +1,43 @@ +# 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 .sql_migration_task_input import SqlMigrationTaskInput + + +class MigrateSqlServerSqlServerTaskInput(SqlMigrationTaskInput): + """Input for the task that migrates on-prem SQL Server databases to SQL on VM. + + :param source_connection_info: Information for connecting to source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: Information for connecting to target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlServerDatabaseInput] + """ + + _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': '[MigrateSqlServerSqlServerDatabaseInput]'}, + } + + def __init__(self, source_connection_info, target_connection_info, selected_databases): + super(MigrateSqlServerSqlServerTaskInput, self).__init__(source_connection_info=source_connection_info, target_connection_info=target_connection_info) + self.selected_databases = selected_databases diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output.py new file mode 100644 index 00000000000..49122c36370 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output.py @@ -0,0 +1,50 @@ +# 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 msrest.serialization import Model + + +class MigrateSqlServerSqlServerTaskOutput(Model): + """Output for the task that migrates on-prem SQL Server databases to SQL on + VM. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: MigrateSqlServerSqlServerTaskOutputError, + MigrateSqlServerSqlServerTaskOutputDatabaseLevel, + MigrateSqlServerSqlServerTaskOutputMigrationLevel + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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': {'ErrorOutput': 'MigrateSqlServerSqlServerTaskOutputError', 'DatabaseLevelOutput': 'MigrateSqlServerSqlServerTaskOutputDatabaseLevel', 'MigrationLevelOutput': 'MigrateSqlServerSqlServerTaskOutputMigrationLevel'} + } + + def __init__(self): + super(MigrateSqlServerSqlServerTaskOutput, self).__init__() + self.id = None + self.result_type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_database_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_database_level.py new file mode 100644 index 00000000000..19e123f28dd --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_database_level.py @@ -0,0 +1,101 @@ +# 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 .migrate_sql_server_sql_server_task_output import MigrateSqlServerSqlServerTaskOutput + + +class MigrateSqlServerSqlServerTaskOutputDatabaseLevel(MigrateSqlServerSqlServerTaskOutput): + """MigrateSqlServerSqlServerTaskOutputDatabaseLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Constant filled by server. + :type result_type: str + :ivar database_name: Name of the database + :vartype database_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: 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 + :ivar ended_on: Migration end time + :vartype ended_on: 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] + :ivar number_of_objects_completed: Number of database artifacts/objects + completed + :vartype number_of_objects_completed: int + :ivar number_of_objects: Total number of database artifacts/objects + :vartype number_of_objects: int + :ivar error_count: Count of database/object errors + :vartype error_count: int + :ivar object_summary: Source databases as a map from database name to + database id + :vartype object_summary: dict[str, + ~azure.mgmt.datamigration.models.DataItemMigrationSummaryResult] + """ + + _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}, + 'message': {'readonly': True}, + 'exceptions_and_warnings': {'readonly': True}, + 'number_of_objects_completed': {'readonly': True}, + 'number_of_objects': {'readonly': True}, + 'error_count': {'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'}, + '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]'}, + 'number_of_objects_completed': {'key': 'numberOfObjectsCompleted', 'type': 'int'}, + 'number_of_objects': {'key': 'numberOfObjects', 'type': 'int'}, + 'error_count': {'key': 'errorCount', 'type': 'int'}, + 'object_summary': {'key': 'objectSummary', 'type': '{DataItemMigrationSummaryResult}'}, + } + + def __init__(self): + super(MigrateSqlServerSqlServerTaskOutputDatabaseLevel, self).__init__() + self.database_name = None + self.state = None + self.stage = None + self.started_on = None + self.ended_on = None + self.message = None + self.exceptions_and_warnings = None + self.number_of_objects_completed = None + self.number_of_objects = None + self.error_count = None + self.object_summary = None + self.result_type = 'DatabaseLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_error.py new file mode 100644 index 00000000000..57aaea639e9 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_error.py @@ -0,0 +1,44 @@ +# 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 .migrate_sql_server_sql_server_task_output import MigrateSqlServerSqlServerTaskOutput + + +class MigrateSqlServerSqlServerTaskOutputError(MigrateSqlServerSqlServerTaskOutput): + """MigrateSqlServerSqlServerTaskOutputError. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param 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): + super(MigrateSqlServerSqlServerTaskOutputError, self).__init__() + self.error = None + self.result_type = 'ErrorOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_migration_level.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_migration_level.py new file mode 100644 index 00000000000..05fa1b7e837 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_migration_level.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 .migrate_sql_server_sql_server_task_output import MigrateSqlServerSqlServerTaskOutput + + +class MigrateSqlServerSqlServerTaskOutputMigrationLevel(MigrateSqlServerSqlServerTaskOutput): + """MigrateSqlServerSqlServerTaskOutputMigrationLevel. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Result identifier + :vartype id: str + :param result_type: Constant filled by server. + :type result_type: str + :ivar started_on: Migration start time + :vartype started_on: datetime + :ivar ended_on: Migration end time + :vartype ended_on: 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 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: dict[str, str] + :ivar database_summary: Summary of database results in the migration + :vartype database_summary: dict[str, + ~azure.mgmt.datamigration.models.DataItemMigrationSummaryResult] + :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}, + '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'}, + 'status': {'key': 'status', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'databases': {'key': 'databases', 'type': '{str}'}, + 'database_summary': {'key': 'databaseSummary', 'type': '{DataItemMigrationSummaryResult}'}, + '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): + super(MigrateSqlServerSqlServerTaskOutputMigrationLevel, self).__init__() + self.started_on = None + self.ended_on = None + self.status = None + self.state = None + self.status_message = None + self.message = None + self.databases = None + self.database_summary = 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.result_type = 'MigrationLevelOutput' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_properties.py new file mode 100644 index 00000000000..b0b28c26cb8 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class MigrateSqlServerSqlServerTaskProperties(ProjectTaskProperties): + """Properties for the task that migrates on-prem SQL Server databases to SQL + on VM. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.MigrateSqlServerSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlServerTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSqlServerSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[MigrateSqlServerSqlServerTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(MigrateSqlServerSqlServerTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'Migrate.SqlServer.SqlServer' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_input.py new file mode 100644 index 00000000000..bc3570cc443 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_input.py @@ -0,0 +1,36 @@ +# 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 msrest.serialization import Model + + +class MigrateSyncCompleteCommandInput(Model): + """Input for command that completes sync migration for a database. + + :param database_name: Name of database + :type database_name: str + :param commit_time_stamp: Time stamp to complete + :type commit_time_stamp: 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, commit_time_stamp=None): + super(MigrateSyncCompleteCommandInput, self).__init__() + self.database_name = database_name + self.commit_time_stamp = commit_time_stamp diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_output.py new file mode 100644 index 00000000000..a5a55443692 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_output.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class MigrateSyncCompleteCommandOutput(Model): + """Output for command that completes sync migration for a database. + + :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=None): + super(MigrateSyncCompleteCommandOutput, self).__init__() + self.errors = errors diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_properties.py new file mode 100644 index 00000000000..0ba78b4953b --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_properties.py @@ -0,0 +1,56 @@ +# 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 .command_properties import CommandProperties + + +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. + + :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 command_type: Constant filled by server. + :type command_type: str + :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 = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'command_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'command_type': {'key': 'commandType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'MigrateSyncCompleteCommandInput'}, + 'output': {'key': 'output', 'type': 'MigrateSyncCompleteCommandOutput'}, + } + + def __init__(self, input=None): + super(MigrateSyncCompleteCommandProperties, self).__init__() + self.input = input + self.output = None + self.command_type = 'Migrate.Sync.Complete.Database' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_eligibility_info.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_eligibility_info.py new file mode 100644 index 00000000000..4fad8951f86 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_eligibility_info.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class MigrationEligibilityInfo(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_eligibile_for_migration: Whether object is eligible for migration + or not. + :vartype is_eligibile_for_migration: bool + :ivar validation_messages: Information about eligibility failure for the + server object. + :vartype validation_messages: list[str] + """ + + _validation = { + 'is_eligibile_for_migration': {'readonly': True}, + 'validation_messages': {'readonly': True}, + } + + _attribute_map = { + 'is_eligibile_for_migration': {'key': 'isEligibileForMigration', 'type': 'bool'}, + 'validation_messages': {'key': 'validationMessages', 'type': '[str]'}, + } + + def __init__(self): + super(MigrationEligibilityInfo, self).__init__() + self.is_eligibile_for_migration = None + self.validation_messages = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_report_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_report_result.py new file mode 100644 index 00000000000..46536a5b513 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_report_result.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 msrest.serialization import Model + + +class MigrationReportResult(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=None, report_url=None): + super(MigrationReportResult, self).__init__() + self.id = id + self.report_url = report_url diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_table_metadata.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_table_metadata.py new file mode 100644 index 00000000000..7b1feba4549 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_table_metadata.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class MigrationTableMetadata(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): + super(MigrationTableMetadata, self).__init__() + self.source_table_name = None + self.target_table_name = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_level_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_level_result.py new file mode 100644 index 00000000000..22b7f272fb8 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_level_result.py @@ -0,0 +1,88 @@ +# 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 msrest.serialization import Model + + +class MigrationValidationDatabaseLevelResult(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 + :ivar ended_on: Validation end time + :vartype ended_on: 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): + super(MigrationValidationDatabaseLevelResult, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_summary_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_summary_result.py new file mode 100644 index 00000000000..d44a6f44c89 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_summary_result.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 msrest.serialization import Model + + +class MigrationValidationDatabaseSummaryResult(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 + :ivar ended_on: Validation end time + :vartype ended_on: 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): + super(MigrationValidationDatabaseSummaryResult, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_options.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_options.py new file mode 100644 index 00000000000..7c4ab1a0543 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_options.py @@ -0,0 +1,42 @@ +# 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 msrest.serialization import Model + + +class MigrationValidationOptions(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=None, enable_data_integrity_validation=None, enable_query_analysis_validation=None): + super(MigrationValidationOptions, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_result.py new file mode 100644 index 00000000000..964d356c547 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_result.py @@ -0,0 +1,53 @@ +# 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 msrest.serialization import Model + + +class MigrationValidationResult(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=None): + super(MigrationValidationResult, self).__init__() + self.id = None + self.migration_id = None + self.summary_results = summary_results + self.status = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_connection_info.py b/src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_connection_info.py new file mode 100644 index 00000000000..4b2ae4da2fc --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_connection_info.py @@ -0,0 +1,48 @@ +# 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 .connection_info import ConnectionInfo + + +class MySqlConnectionInfo(ConnectionInfo): + """Information for connecting to MySQL source. + + :param user_name: User name + :type user_name: str + :param password: Password credential. + :type password: str + :param type: Constant filled by server. + :type type: str + :param server_name: Name of the server + :type server_name: str + :param port: Port for Server + :type port: int + """ + + _validation = { + 'type': {'required': True}, + 'server_name': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, server_name, port, user_name=None, password=None): + super(MySqlConnectionInfo, self).__init__(user_name=user_name, password=password) + self.server_name = server_name + self.port = port + self.type = 'MySqlConnectionInfo' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_data_migration_project_metadata.py b/src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_data_migration_project_metadata.py new file mode 100644 index 00000000000..b6b240ce575 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_data_migration_project_metadata.py @@ -0,0 +1,53 @@ +# 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_project_metadata import DataMigrationProjectMetadata + + +class MySqlDataMigrationProjectMetadata(DataMigrationProjectMetadata): + """Metadata for MySQL project. + + 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}, + } + + def __init__(self): + super(MySqlDataMigrationProjectMetadata, self).__init__() diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_request.py b/src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_request.py new file mode 100644 index 00000000000..795c6c4a827 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_request.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class NameAvailabilityRequest(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=None, type=None): + super(NameAvailabilityRequest, self).__init__() + self.name = name + self.type = type diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_response.py b/src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_response.py new file mode 100644 index 00000000000..85b39586983 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_response.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class NameAvailabilityResponse(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=None, reason=None, message=None): + super(NameAvailabilityResponse, self).__init__() + self.name_available = name_available + self.reason = reason + self.message = message diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table.py b/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table.py new file mode 100644 index 00000000000..0b3dfd88df0 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table.py @@ -0,0 +1,28 @@ +# 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 msrest.serialization import Model + + +class NonSqlDataMigrationTable(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=None): + super(NonSqlDataMigrationTable, self).__init__() + self.source_name = source_name diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table_result.py new file mode 100644 index 00000000000..bef337e4eac --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table_result.py @@ -0,0 +1,68 @@ +# 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 msrest.serialization import Model + + +class NonSqlDataMigrationTableResult(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): + super(NonSqlDataMigrationTableResult, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_input.py new file mode 100644 index 00000000000..06b4d891d9f --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_input.py @@ -0,0 +1,55 @@ +# 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 msrest.serialization import Model + + +class NonSqlMigrationTaskInput(Model): + """Base class for non sql migration task input. + + :param target_connection_info: Information for connecting to target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_database_name: Target database name + :type target_database_name: str + :param project_name: Name of the migration project + :type project_name: str + :param project_location: An URL that points to the drop location to access + project artifacts + :type project_location: str + :param selected_tables: 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, target_database_name, project_name, project_location, selected_tables): + super(NonSqlMigrationTaskInput, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_output.py new file mode 100644 index 00000000000..ddea3d0bd90 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_output.py @@ -0,0 +1,75 @@ +# 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 msrest.serialization import Model + + +class NonSqlMigrationTaskOutput(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 + :ivar ended_on: Migration end time + :vartype ended_on: 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: dict[str, + ~azure.mgmt.datamigration.models.NonSqlDataMigrationTableResult] + :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': '{NonSqlDataMigrationTableResult}'}, + 'progress_message': {'key': 'progressMessage', 'type': 'str'}, + 'source_server_name': {'key': 'sourceServerName', 'type': 'str'}, + 'target_server_name': {'key': 'targetServerName', 'type': 'str'}, + } + + def __init__(self): + super(NonSqlMigrationTaskOutput, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/odata_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/odata_error.py new file mode 100644 index 00000000000..df8a46d6a46 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/odata_error.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class ODataError(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=None, message=None, details=None): + super(ODataError, self).__init__() + self.code = code + self.message = message + self.details = details diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/oracle_connection_info.py b/src/datamigration/azext_dms/mgmt/datamigration/models/oracle_connection_info.py new file mode 100644 index 00000000000..aed02fe5f53 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/oracle_connection_info.py @@ -0,0 +1,61 @@ +# 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 .connection_info import ConnectionInfo + + +class OracleConnectionInfo(ConnectionInfo): + """Information for connecting to Oracle source. + + :param user_name: User name + :type user_name: str + :param password: Password credential. + :type password: str + :param type: Constant filled by server. + :type type: str + :param server_name: Name of the server + :type server_name: str + :param port: Port for Server + :type port: int + :param connection_mode: Connection mode to be used. If ConnectionString + mode is used, then customConnectionString should be provided, else it + should not be set. Possible values include: 'ConnectionString', 'Standard' + :type connection_mode: str or + ~azure.mgmt.datamigration.models.OracleConnectionMode + :param instance: Instance name (SID) + :type instance: str + :param custom_connection_string: Connection string + :type custom_connection_string: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'connection_mode': {'key': 'connectionMode', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'str'}, + 'custom_connection_string': {'key': 'customConnectionString', 'type': 'str'}, + } + + def __init__(self, user_name=None, password=None, server_name=None, port=None, connection_mode=None, instance=None, custom_connection_string=None): + super(OracleConnectionInfo, self).__init__(user_name=user_name, password=password) + self.server_name = server_name + self.port = port + self.connection_mode = connection_mode + self.instance = instance + self.custom_connection_string = custom_connection_string + self.type = 'OracleConnectionInfo' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/oracle_data_migration_project_metadata.py b/src/datamigration/azext_dms/mgmt/datamigration/models/oracle_data_migration_project_metadata.py new file mode 100644 index 00000000000..aa3341b73a5 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/oracle_data_migration_project_metadata.py @@ -0,0 +1,69 @@ +# 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_project_metadata import DataMigrationProjectMetadata + + +class OracleDataMigrationProjectMetadata(DataMigrationProjectMetadata): + """Metadata for Oracle project artifacts. + + 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] + :ivar source_sid: Oracle server SID + :vartype source_sid: str + """ + + _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}, + 'source_sid': {'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]'}, + 'source_sid': {'key': 'sourceSID', 'type': 'str'}, + } + + def __init__(self): + super(OracleDataMigrationProjectMetadata, self).__init__() + self.source_sid = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/postgre_sql_connection_info.py b/src/datamigration/azext_dms/mgmt/datamigration/models/postgre_sql_connection_info.py new file mode 100644 index 00000000000..78a4ab358b9 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/postgre_sql_connection_info.py @@ -0,0 +1,52 @@ +# 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 .connection_info import ConnectionInfo + + +class PostgreSqlConnectionInfo(ConnectionInfo): + """Information for connecting to PostgreSQL server. + + :param user_name: User name + :type user_name: str + :param password: Password credential. + :type password: str + :param type: Constant filled by server. + :type type: str + :param server_name: Name of the server + :type server_name: str + :param database_name: Name of the database + :type database_name: str + :param port: Port for Server + :type port: int + """ + + _validation = { + 'type': {'required': True}, + 'server_name': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'server_name': {'key': 'serverName', 'type': 'str'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, server_name, port, user_name=None, password=None, database_name=None): + super(PostgreSqlConnectionInfo, self).__init__(user_name=user_name, password=password) + self.server_name = server_name + self.database_name = database_name + self.port = port + self.type = 'PostgreSqlConnectionInfo' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project.py b/src/datamigration/azext_dms/mgmt/datamigration/models/project.py new file mode 100644 index 00000000000..44504a69e6d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/project.py @@ -0,0 +1,96 @@ +# 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 .tracked_resource import TrackedResource + + +class Project(TrackedResource): + """A project 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: Resource location. + :type location: str + :param source_platform: Source platform for the project. Possible values + include: 'SQL', 'Access', 'DB2', 'MySQL', 'Oracle', 'Sybase', + 'PostgreSql', 'Unknown' + :type source_platform: str or + ~azure.mgmt.datamigration.models.ProjectSourcePlatform + :param target_platform: Target platform for the project. Possible values + include: 'SQL10', 'SQL11', 'SQL12', 'SQL13', 'SQL14', 'SQLDB', 'SQLDW', + 'SQLMI', 'SQLVM', 'AzureDbForMySql', 'AzureDbForPostgreSql', '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 + :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 + :param data_movement: Type of data movement. Possible values include: + 'OneTimeMigration', 'Continuous'. Default value: "OneTimeMigration" . + :type data_movement: str or ~azure.mgmt.datamigration.models.DataMovement + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'source_platform': {'required': True}, + 'target_platform': {'required': True}, + 'creation_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'source_platform': {'key': 'properties.sourcePlatform', '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'}, + 'data_movement': {'key': 'properties.dataMovement', 'type': 'str'}, + } + + def __init__(self, location, source_platform, target_platform, tags=None, source_connection_info=None, target_connection_info=None, databases_info=None, data_movement="OneTimeMigration"): + super(Project, self).__init__(tags=tags, location=location) + self.source_platform = source_platform + 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 + self.data_movement = data_movement diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project_artifacts_response.py b/src/datamigration/azext_dms/mgmt/datamigration/models/project_artifacts_response.py new file mode 100644 index 00000000000..d644d28a5b7 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/project_artifacts_response.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 msrest.serialization import Model + + +class ProjectArtifactsResponse(Model): + """Project artifacts properties. + + :param artifacts_location: An URL that points to the drop location to + access project artifacts. When accessing this URL, requestor should + provide an Authorization header with the Bearer authorization scheme, + followed by his ARM JWT signature. Typical JWT will look like three + dot-separated base64 encoded strings. We use last string as a shared + secret between client and our artifacts service. + :type artifacts_location: str + """ + + _attribute_map = { + 'artifacts_location': {'key': 'artifactsLocation', 'type': 'str'}, + } + + def __init__(self, artifacts_location=None): + super(ProjectArtifactsResponse, self).__init__() + self.artifacts_location = artifacts_location diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project_paged.py b/src/datamigration/azext_dms/mgmt/datamigration/models/project_paged.py new file mode 100644 index 00000000000..4b7bbb6b5dd --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/project_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class ProjectPaged(Paged): + """ + A paging container for iterating over a list of :class:`Project ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Project]'} + } + + def __init__(self, *args, **kwargs): + + super(ProjectPaged, self).__init__(*args, **kwargs) diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project_task.py b/src/datamigration/azext_dms/mgmt/datamigration/models/project_task.py new file mode 100644 index 00000000000..27d49f6eee3 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/project_task.py @@ -0,0 +1,50 @@ +# 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 .resource import Resource + + +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 + """ + + _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'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ProjectTaskProperties'}, + } + + def __init__(self, etag=None, properties=None): + super(ProjectTask, self).__init__() + self.etag = etag + self.properties = properties diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project_task_paged.py b/src/datamigration/azext_dms/mgmt/datamigration/models/project_task_paged.py new file mode 100644 index 00000000000..c55903ccf8a --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/project_task_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class ProjectTaskPaged(Paged): + """ + A paging container for iterating over a list of :class:`ProjectTask ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ProjectTask]'} + } + + def __init__(self, *args, **kwargs): + + super(ProjectTaskPaged, self).__init__(*args, **kwargs) diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/project_task_properties.py new file mode 100644 index 00000000000..4866a80bf94 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/project_task_properties.py @@ -0,0 +1,80 @@ +# 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 msrest.serialization import Model + + +class ProjectTaskProperties(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: ValidateMigrationInputSqlServerSqlServerTaskProperties, + ValidateMigrationInputSqlServerSqlMITaskProperties, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, + MigrateMySqlAzureDbForMySqlSyncTaskProperties, + MigrateSqlServerSqlDbSyncTaskProperties, + MigrateSqlServerSqlServerTaskProperties, + MigrateSqlServerSqlDbTaskProperties, MigrateSqlServerSqlMITaskProperties, + GetProjectDetailsOracleSqlTaskProperties, + GetProjectDetailsMySqlSqlTaskProperties, + ConnectToTargetAzureDbForMySqlTaskProperties, + ConnectToTargetSqlServerTaskProperties, ConnectToTargetSqlMITaskProperties, + GetUserTablesSqlTaskProperties, ConnectToTargetSqlDbTaskProperties, + ConnectToSourceSqlServerTaskProperties, ConnectToSourceMySqlTaskProperties, + ConnectToSourceOracleTaskProperties, MigrateMySqlSqlTaskProperties, + MigrateOracleSqlTaskProperties + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: str + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + } + + _subtype_map = { + 'task_type': {'ValidateMigrationInput.SqlServer.SqlServer': 'ValidateMigrationInputSqlServerSqlServerTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.SqlServer': 'MigrateSqlServerSqlServerTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'GetProjectDetails.Oracle.Sql': 'GetProjectDetailsOracleSqlTaskProperties', 'GetProjectDetails.MySql.Sql': 'GetProjectDetailsMySqlSqlTaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.SqlServer': 'ConnectToTargetSqlServerTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'ConnectToSource.Oracle': 'ConnectToSourceOracleTaskProperties', 'Migrate.MySql.Sql': 'MigrateMySqlSqlTaskProperties', 'Migrate.Oracle.Sql': 'MigrateOracleSqlTaskProperties'} + } + + def __init__(self, client_data=None): + super(ProjectTaskProperties, self).__init__() + self.errors = None + self.state = None + self.commands = None + self.client_data = client_data + self.task_type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/query_analysis_validation_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/query_analysis_validation_result.py new file mode 100644 index 00000000000..b3adaf68183 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/query_analysis_validation_result.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 msrest.serialization import Model + + +class QueryAnalysisValidationResult(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=None, validation_errors=None): + super(QueryAnalysisValidationResult, self).__init__() + self.query_results = query_results + self.validation_errors = validation_errors diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/query_execution_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/query_execution_result.py new file mode 100644 index 00000000000..7341c78ec70 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/query_execution_result.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class QueryExecutionResult(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=None, statements_in_batch=None, source_result=None, target_result=None): + super(QueryExecutionResult, self).__init__() + self.query_text = query_text + self.statements_in_batch = statements_in_batch + self.source_result = source_result + self.target_result = target_result diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/quota.py b/src/datamigration/azext_dms/mgmt/datamigration/models/quota.py new file mode 100644 index 00000000000..de4eb5ff65f --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/quota.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class Quota(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=None, id=None, limit=None, name=None, unit=None): + super(Quota, self).__init__() + self.current_value = current_value + self.id = id + self.limit = limit + self.name = name + self.unit = unit diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/quota_name.py b/src/datamigration/azext_dms/mgmt/datamigration/models/quota_name.py new file mode 100644 index 00000000000..a32622e91e6 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/quota_name.py @@ -0,0 +1,32 @@ +# 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 msrest.serialization import Model + + +class QuotaName(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=None, value=None): + super(QuotaName, self).__init__() + self.localized_value = localized_value + self.value = value diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/quota_paged.py b/src/datamigration/azext_dms/mgmt/datamigration/models/quota_paged.py new file mode 100644 index 00000000000..804619b8773 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/quota_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class QuotaPaged(Paged): + """ + A paging container for iterating over a list of :class:`Quota ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Quota]'} + } + + def __init__(self, *args, **kwargs): + + super(QuotaPaged, self).__init__(*args, **kwargs) diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/reportable_exception.py b/src/datamigration/azext_dms/mgmt/datamigration/models/reportable_exception.py new file mode 100644 index 00000000000..44237ae5f19 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/reportable_exception.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class ReportableException(Model): + """Exception object for all custom exceptions. + + :param message: Error message + :type 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'}, + '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=None, file_path=None, line_number=None, h_result=None, stack_trace=None): + super(ReportableException, self).__init__() + self.message = message + self.file_path = file_path + self.line_number = line_number + self.h_result = h_result + self.stack_trace = stack_trace diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource.py b/src/datamigration/azext_dms/mgmt/datamigration/models/resource.py new file mode 100644 index 00000000000..a2ddd410be1 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/resource.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class Resource(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): + super(Resource, self).__init__() + self.id = None + self.name = None + self.type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku.py b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku.py new file mode 100644 index 00000000000..afce3c7b4d8 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku.py @@ -0,0 +1,93 @@ +# 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 msrest.serialization import Model + + +class ResourceSku(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): + super(ResourceSku, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capabilities.py b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capabilities.py new file mode 100644 index 00000000000..278f55789e9 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capabilities.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ResourceSkuCapabilities(Model): + """Describes The SKU capabilites 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): + super(ResourceSkuCapabilities, self).__init__() + self.name = None + self.value = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capacity.py b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capacity.py new file mode 100644 index 00000000000..bd987ed738d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capacity.py @@ -0,0 +1,52 @@ +# 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 msrest.serialization import Model + + +class ResourceSkuCapacity(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): + super(ResourceSkuCapacity, self).__init__() + self.minimum = None + self.maximum = None + self.default = None + self.scale_type = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_costs.py b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_costs.py new file mode 100644 index 00000000000..103f21eb642 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_costs.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class ResourceSkuCosts(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): + super(ResourceSkuCosts, self).__init__() + self.meter_id = None + self.quantity = None + self.extended_unit = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_paged.py b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_paged.py new file mode 100644 index 00000000000..2c654d80d65 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class ResourceSkuPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceSku ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceSku]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceSkuPaged, self).__init__(*args, **kwargs) diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_restrictions.py b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_restrictions.py new file mode 100644 index 00000000000..41ec71e2378 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_restrictions.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class ResourceSkuRestrictions(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): + super(ResourceSkuRestrictions, self).__init__() + self.type = None + self.values = None + self.reason_code = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result.py new file mode 100644 index 00000000000..48c955b62d4 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result.py @@ -0,0 +1,43 @@ +# 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 msrest.serialization import Model + + +class SchemaComparisonValidationResult(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=None, validation_errors=None, source_database_object_count=None, target_database_object_count=None): + super(SchemaComparisonValidationResult, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result_type.py b/src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result_type.py new file mode 100644 index 00000000000..1e8a07c092d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result_type.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class SchemaComparisonValidationResultType(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=None, object_type=None, update_action=None): + super(SchemaComparisonValidationResultType, self).__init__() + self.object_name = object_name + self.object_type = object_type + self.update_action = update_action diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/server_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/server_properties.py new file mode 100644 index 00000000000..25b6bdf0d79 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/server_properties.py @@ -0,0 +1,60 @@ +# 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 msrest.serialization import Model + + +class ServerProperties(Model): + """Server properties for Oracle, 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): + super(ServerProperties, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation.py b/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation.py new file mode 100644 index 00000000000..2c5599d0beb --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation.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 msrest.serialization import Model + + +class ServiceOperation(Model): + """Description of an action supported by the Data 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=None, display=None): + super(ServiceOperation, self).__init__() + self.name = name + self.display = display diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_display.py b/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_display.py new file mode 100644 index 00000000000..49c68d1c944 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_display.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ServiceOperationDisplay(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=None, resource=None, operation=None, description=None): + super(ServiceOperationDisplay, self).__init__() + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_paged.py b/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_paged.py new file mode 100644 index 00000000000..955dcd65458 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_paged.py @@ -0,0 +1,27 @@ +# 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 msrest.paging import Paged + + +class ServiceOperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`ServiceOperation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ServiceOperation]'} + } + + def __init__(self, *args, **kwargs): + + super(ServiceOperationPaged, self).__init__(*args, **kwargs) diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/service_sku.py b/src/datamigration/azext_dms/mgmt/datamigration/models/service_sku.py new file mode 100644 index 00000000000..3a77e8efabd --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/service_sku.py @@ -0,0 +1,49 @@ +# 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 msrest.serialization import Model + + +class ServiceSku(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 'Free', 'Basic', 'Standard', or + 'Premium' + :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=None, tier=None, family=None, size=None, capacity=None): + super(ServiceSku, self).__init__() + self.name = name + self.tier = tier + self.family = family + self.size = size + self.capacity = capacity diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/sql_connection_info.py b/src/datamigration/azext_dms/mgmt/datamigration/models/sql_connection_info.py new file mode 100644 index 00000000000..80f01ef6839 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/sql_connection_info.py @@ -0,0 +1,65 @@ +# 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 .connection_info import ConnectionInfo + + +class SqlConnectionInfo(ConnectionInfo): + """Information for connecting to SQL database server. + + :param user_name: User name + :type user_name: str + :param password: Password credential. + :type password: str + :param type: Constant filled by server. + :type type: str + :param data_source: Data source in the format + Protocol:MachineName\\SQLServerInstanceName,PortNumber + :type data_source: 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. Default + value: True . + :type encrypt_connection: bool + :param additional_settings: Additional connection settings + :type additional_settings: str + :param trust_server_certificate: Whether to trust the server certificate. + Default value: False . + :type trust_server_certificate: bool + """ + + _validation = { + 'type': {'required': True}, + 'data_source': {'required': True}, + } + + _attribute_map = { + 'user_name': {'key': 'userName', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', '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'}, + } + + def __init__(self, data_source, user_name=None, password=None, authentication=None, encrypt_connection=True, additional_settings=None, trust_server_certificate=False): + super(SqlConnectionInfo, self).__init__(user_name=user_name, password=password) + self.data_source = data_source + self.authentication = authentication + self.encrypt_connection = encrypt_connection + self.additional_settings = additional_settings + self.trust_server_certificate = trust_server_certificate + self.type = 'SqlConnectionInfo' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/sql_migration_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/sql_migration_task_input.py new file mode 100644 index 00000000000..77b0562eb6f --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/sql_migration_task_input.py @@ -0,0 +1,39 @@ +# 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 msrest.serialization import Model + + +class SqlMigrationTaskInput(Model): + """Base class for migration task input. + + :param source_connection_info: Information for connecting to source + :type source_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param target_connection_info: 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, target_connection_info): + super(SqlMigrationTaskInput, self).__init__() + self.source_connection_info = source_connection_info + self.target_connection_info = target_connection_info diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/start_migration_scenario_server_role_result.py b/src/datamigration/azext_dms/mgmt/datamigration/models/start_migration_scenario_server_role_result.py new file mode 100644 index 00000000000..ef4a03dc701 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/start_migration_scenario_server_role_result.py @@ -0,0 +1,47 @@ +# 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 msrest.serialization import Model + + +class StartMigrationScenarioServerRoleResult(Model): + """StartMigrationScenarioServerRoleResult. + + 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): + super(StartMigrationScenarioServerRoleResult, self).__init__() + self.name = None + self.state = None + self.exceptions_and_warnings = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/sync_migration_database_error_event.py b/src/datamigration/azext_dms/mgmt/datamigration/models/sync_migration_database_error_event.py new file mode 100644 index 00000000000..43464a17ccc --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/sync_migration_database_error_event.py @@ -0,0 +1,45 @@ +# 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 msrest.serialization import Model + + +class SyncMigrationDatabaseErrorEvent(Model): + """Database migration errors. + + 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: Error 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): + super(SyncMigrationDatabaseErrorEvent, self).__init__() + self.timestamp_string = None + self.event_type_string = None + self.event_text = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/tracked_resource.py b/src/datamigration/azext_dms/mgmt/datamigration/models/tracked_resource.py new file mode 100644 index 00000000000..b60f8ddede5 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/tracked_resource.py @@ -0,0 +1,51 @@ +# 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 .resource import Resource + + +class TrackedResource(Resource): + """ARM tracked top level 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 tags: Resource tags. + :type tags: dict[str, str] + :param location: Resource location. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__(self, location, tags=None): + super(TrackedResource, self).__init__() + self.tags = tags + self.location = location diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py new file mode 100644 index 00000000000..e0d2003a3f3 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py @@ -0,0 +1,51 @@ +# 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 msrest.serialization import Model + + +class ValidateMigrationInputSqlServerSqlMITaskInput(Model): + """Input for task that validates migration input for SQL to Azure SQL Managed + Instance. + + :param target_connection_info: Information for connecting to target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: 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 backup_blob_share: SAS URI of Azure Storage Account Container to be + used for storing backup files. + :type backup_blob_share: ~azure.mgmt.datamigration.models.BlobShare + """ + + _validation = { + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + 'backup_blob_share': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlMIDatabaseInput]'}, + 'backup_file_share': {'key': 'backupFileShare', 'type': 'FileShare'}, + 'backup_blob_share': {'key': 'backupBlobShare', 'type': 'BlobShare'}, + } + + def __init__(self, target_connection_info, selected_databases, backup_blob_share, backup_file_share=None): + super(ValidateMigrationInputSqlServerSqlMITaskInput, self).__init__() + self.target_connection_info = target_connection_info + self.selected_databases = selected_databases + self.backup_file_share = backup_file_share + self.backup_blob_share = backup_blob_share diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py new file mode 100644 index 00000000000..99755828cad --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py @@ -0,0 +1,68 @@ +# 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 msrest.serialization import Model + + +class ValidateMigrationInputSqlServerSqlMITaskOutput(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] + """ + + _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}, + } + + _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]'}, + } + + def __init__(self): + super(ValidateMigrationInputSqlServerSqlMITaskOutput, self).__init__() + 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 diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py new file mode 100644 index 00000000000..6822928c310 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +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. + + :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 task_type: Constant filled by server. + :type task_type: 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 = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ValidateMigrationInputSqlServerSqlMITaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlMITaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(ValidateMigrationInputSqlServerSqlMITaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'ValidateMigrationInput.SqlServer.AzureSqlDbMI' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_input.py b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_input.py new file mode 100644 index 00000000000..a0571152216 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_input.py @@ -0,0 +1,40 @@ +# 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 msrest.serialization import Model + + +class ValidateMigrationInputSqlServerSqlServerTaskInput(Model): + """Input for task that validates migration input for SQL to SQL on VM + migrations. + + :param target_connection_info: Information for connecting to target + :type target_connection_info: + ~azure.mgmt.datamigration.models.SqlConnectionInfo + :param selected_databases: Databases to migrate + :type selected_databases: + list[~azure.mgmt.datamigration.models.MigrateSqlServerSqlServerDatabaseInput] + """ + + _validation = { + 'target_connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'SqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateSqlServerSqlServerDatabaseInput]'}, + } + + def __init__(self, target_connection_info, selected_databases): + super(ValidateMigrationInputSqlServerSqlServerTaskInput, self).__init__() + self.target_connection_info = target_connection_info + self.selected_databases = selected_databases diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_output.py b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_output.py new file mode 100644 index 00000000000..1dad7a8c456 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_output.py @@ -0,0 +1,61 @@ +# 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 msrest.serialization import Model + + +class ValidateMigrationInputSqlServerSqlServerTaskOutput(Model): + """Output for task that validates migration input for SQL to SQL on VM + 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_and_restore_folder_errors: Errors associated with the + BackupAndRestoreFolder path + :vartype backup_and_restore_folder_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + :ivar database_files_errors: Errors associated with the database files + :vartype database_files_errors: dict[str, + list[~azure.mgmt.datamigration.models.ReportableException]] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'restore_database_name_errors': {'readonly': True}, + 'backup_and_restore_folder_errors': {'readonly': True}, + 'database_files_errors': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'restore_database_name_errors': {'key': 'restoreDatabaseNameErrors', 'type': '[ReportableException]'}, + 'backup_and_restore_folder_errors': {'key': 'backupAndRestoreFolderErrors', 'type': '[ReportableException]'}, + 'database_files_errors': {'key': 'databaseFilesErrors', 'type': '{[ReportableException]}'}, + } + + def __init__(self): + super(ValidateMigrationInputSqlServerSqlServerTaskOutput, self).__init__() + self.id = None + self.name = None + self.restore_database_name_errors = None + self.backup_and_restore_folder_errors = None + self.database_files_errors = None diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_properties.py b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_properties.py new file mode 100644 index 00000000000..c8e1626af2e --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_properties.py @@ -0,0 +1,66 @@ +# 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 .project_task_properties import ProjectTaskProperties + + +class ValidateMigrationInputSqlServerSqlServerTaskProperties(ProjectTaskProperties): + """Properties for task that validates migration input for SQL to SQL on VM + migrations. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :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 task_type: Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlServerTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.ValidateMigrationInputSqlServerSqlServerTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'ValidateMigrationInputSqlServerSqlServerTaskInput'}, + 'output': {'key': 'output', 'type': '[ValidateMigrationInputSqlServerSqlServerTaskOutput]'}, + } + + def __init__(self, client_data=None, input=None): + super(ValidateMigrationInputSqlServerSqlServerTaskProperties, self).__init__(client_data=client_data) + self.input = input + self.output = None + self.task_type = 'ValidateMigrationInput.SqlServer.SqlServer' diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validation_error.py b/src/datamigration/azext_dms/mgmt/datamigration/models/validation_error.py new file mode 100644 index 00000000000..6ca3d30505d --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/validation_error.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 msrest.serialization import Model + + +class ValidationError(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=None, severity=None): + super(ValidationError, self).__init__() + self.text = text + self.severity = severity diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/wait_statistics.py b/src/datamigration/azext_dms/mgmt/datamigration/models/wait_statistics.py new file mode 100644 index 00000000000..cdad32c6a8b --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/models/wait_statistics.py @@ -0,0 +1,37 @@ +# 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 msrest.serialization import Model + + +class WaitStatistics(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) . Default value: 0 + . + :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=None, wait_time_ms=0, wait_count=None): + super(WaitStatistics, self).__init__() + self.wait_type = wait_type + self.wait_time_ms = wait_time_ms + self.wait_count = wait_count diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/__init__.py b/src/datamigration/azext_dms/mgmt/datamigration/operations/__init__.py new file mode 100644 index 00000000000..dae6a312066 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/operations/__init__.py @@ -0,0 +1,26 @@ +# 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 .resource_skus_operations import ResourceSkusOperations +from .services_operations import ServicesOperations +from .tasks_operations import TasksOperations +from .projects_operations import ProjectsOperations +from .usages_operations import UsagesOperations +from .operations import Operations + +__all__ = [ + 'ResourceSkusOperations', + 'ServicesOperations', + 'TasksOperations', + 'ProjectsOperations', + 'UsagesOperations', + 'Operations', +] diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/operations.py b/src/datamigration/azext_dms/mgmt/datamigration/operations/operations.py new file mode 100644 index 00000000000..1ace09a6f01 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/operations/operations.py @@ -0,0 +1,100 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API. Constant value: "2017-11-15-privatepreview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-15-privatepreview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get available resource provider actions (operations). + + Lists all available actions exposed by the Data Migration Service + resource provider. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ServiceOperation + :rtype: + ~azure.mgmt.datamigration.models.ServiceOperationPaged[~azure.mgmt.datamigration.models.ServiceOperation] + :raises: + :class:`ApiErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ServiceOperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ServiceOperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.DataMigration/operations'} diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/projects_operations.py b/src/datamigration/azext_dms/mgmt/datamigration/operations/projects_operations.py new file mode 100644 index 00000000000..88db5273531 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/operations/projects_operations.py @@ -0,0 +1,462 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ProjectsOperations(object): + """ProjectsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API. Constant value: "2017-11-15-privatepreview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-15-privatepreview" + + self.config = config + + def list( + self, group_name, service_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Project + :rtype: + ~azure.mgmt.datamigration.models.ProjectPaged[~azure.mgmt.datamigration.models.Project] + :raises: + :class:`ApiErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ProjectPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ProjectPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects'} + + def create_or_update( + self, parameters, group_name, service_name, project_name, custom_headers=None, raw=False, **operation_config): + """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 parameters: Information about the project + :type parameters: ~azure.mgmt.datamigration.models.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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Project or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.Project or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Project') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Project', response) + if response.status_code == 201: + deserialized = self._deserialize('Project', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} + + def get( + self, group_name, service_name, project_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Project or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.Project or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Project', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} + + def delete( + self, group_name, service_name, project_name, delete_running_tasks=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} + + def update( + self, parameters, group_name, service_name, project_name, custom_headers=None, raw=False, **operation_config): + """Update project. + + The project resource is a nested resource representing a stored + migration project. The PATCH method updates an existing project. + + :param parameters: Information about the project + :type parameters: ~azure.mgmt.datamigration.models.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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Project or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.Project or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Project') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Project', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}'} + + def access_artifacts( + self, group_name, service_name, project_name, custom_headers=None, raw=False, **operation_config): + """Generates a URL to access project artifacts. + + The project resource is a nested resource representing a stored + migration project. This method generates a URL that provides an access + to project-related artifacts required to work with the project in the + custom tool. User will be able to use the provided URL for a limited + time to upload or download project artifacts. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProjectArtifactsResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.ProjectArtifactsResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.access_artifacts.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ProjectArtifactsResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + access_artifacts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/accessArtifacts'} diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/resource_skus_operations.py b/src/datamigration/azext_dms/mgmt/datamigration/operations/resource_skus_operations.py new file mode 100644 index 00000000000..34f2d7072f7 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/operations/resource_skus_operations.py @@ -0,0 +1,103 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ResourceSkusOperations(object): + """ResourceSkusOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API. Constant value: "2017-11-15-privatepreview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-15-privatepreview" + + self.config = config + + def list_skus( + self, custom_headers=None, raw=False, **operation_config): + """Get supported SKUs. + + The skus action returns the list of SKUs that DMS supports. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceSku + :rtype: + ~azure.mgmt.datamigration.models.ResourceSkuPaged[~azure.mgmt.datamigration.models.ResourceSku] + :raises: + :class:`ApiErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ResourceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/skus'} diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/services_operations.py b/src/datamigration/azext_dms/mgmt/datamigration/operations/services_operations.py new file mode 100644 index 00000000000..721bd10a088 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/operations/services_operations.py @@ -0,0 +1,1087 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse +from msrest.exceptions import DeserializationError +from msrestazure.azure_operation import AzureOperationPoller + +from .. import models + + +class ServicesOperations(object): + """ServicesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API. Constant value: "2017-11-15-privatepreview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-15-privatepreview" + + self.config = config + + + def _create_or_update_initial( + self, parameters, group_name, service_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DataMigrationService') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201, 202]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DataMigrationService', response) + if response.status_code == 201: + deserialized = self._deserialize('DataMigrationService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, parameters, group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Create or update DMS Instance. + + The services resource is the top-level resource that represents the + Data 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 parameters: Information about the service + :type parameters: + ~azure.mgmt.datamigration.models.DataMigrationService + :param group_name: Name of the resource group + :type group_name: str + :param service_name: Name of the service + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + DataMigrationService or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datamigration.models.DataMigrationService] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + raw_result = self._create_or_update_initial( + parameters=parameters, + group_name=group_name, + service_name=service_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 201, 202]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = self._deserialize('DataMigrationService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} + + def get( + self, group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Get DMS Service Instance. + + The services resource is the top-level resource that represents the + Data 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DataMigrationService or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.DataMigrationService or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DataMigrationService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} + + + def _delete_initial( + self, group_name, service_name, delete_running_tasks=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, group_name, service_name, delete_running_tasks=None, custom_headers=None, raw=False, **operation_config): + """Delete DMS Service Instance. + + The services resource is the top-level resource that represents the + Data 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + raw_result = self._delete_initial( + group_name=group_name, + service_name=service_name, + delete_running_tasks=delete_running_tasks, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202, 204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} + + + def _update_initial( + self, parameters, group_name, service_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'DataMigrationService') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DataMigrationService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, parameters, group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Create or update DMS Service Instance. + + The services resource is the top-level resource that represents the + Data 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 parameters: Information about the service + :type parameters: + ~azure.mgmt.datamigration.models.DataMigrationService + :param group_name: Name of the resource group + :type group_name: str + :param service_name: Name of the service + :type service_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + DataMigrationService or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.datamigration.models.DataMigrationService] + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + raw_result = self._update_initial( + parameters=parameters, + group_name=group_name, + service_name=service_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = self._deserialize('DataMigrationService', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}'} + + def check_status( + self, group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Check service health status. + + The services resource is the top-level resource that represents the + Data 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DataMigrationServiceStatusResponse or ClientRawResponse if + raw=true + :rtype: + ~azure.mgmt.datamigration.models.DataMigrationServiceStatusResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.check_status.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('DataMigrationServiceStatusResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkStatus'} + + + def _start_initial( + self, group_name, service_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def start( + self, group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Start service. + + The services resource is the top-level resource that represents the + Data 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + raw_result = self._start_initial( + group_name=group_name, + service_name=service_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/start'} + + + def _stop_initial( + self, group_name, service_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.stop.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def stop( + self, group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Stop service. + + The services resource is the top-level resource that represents the + Data 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + raw_result = self._stop_initial( + group_name=group_name, + service_name=service_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/stop'} + + def list_skus( + self, group_name, service_name, custom_headers=None, raw=False, **operation_config): + """Get compatible SKUs. + + The services resource is the top-level resource that represents the + Data 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AvailableServiceSku + :rtype: + ~azure.mgmt.datamigration.models.AvailableServiceSkuPaged[~azure.mgmt.datamigration.models.AvailableServiceSku] + :raises: + :class:`ApiErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.AvailableServiceSkuPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AvailableServiceSkuPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/skus'} + + def check_children_name_availability( + self, group_name, service_name, name=None, type=None, custom_headers=None, raw=False, **operation_config): + """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 name: The proposed resource name + :type name: str + :param type: The resource type chain (e.g. virtualMachines/extensions) + :type type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NameAvailabilityResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.NameAvailabilityResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + parameters = models.NameAvailabilityRequest(name=name, type=type) + + # Construct URL + url = self.check_children_name_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('NameAvailabilityResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_children_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/checkNameAvailability'} + + def list_by_resource_group( + self, group_name, custom_headers=None, raw=False, **operation_config): + """Get services in resource group. + + The Services resource is the top-level resource that represents the + Data 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DataMigrationService + :rtype: + ~azure.mgmt.datamigration.models.DataMigrationServicePaged[~azure.mgmt.datamigration.models.DataMigrationService] + :raises: + :class:`ApiErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.DataMigrationServicePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DataMigrationServicePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Get services in subscription. + + The services resource is the top-level resource that represents the + Data Migration Service. This method returns a list of service resources + in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DataMigrationService + :rtype: + ~azure.mgmt.datamigration.models.DataMigrationServicePaged[~azure.mgmt.datamigration.models.DataMigrationService] + :raises: + :class:`ApiErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.DataMigrationServicePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DataMigrationServicePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/services'} + + def check_name_availability( + self, location, name=None, type=None, custom_headers=None, raw=False, **operation_config): + """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 name: The proposed resource name + :type name: str + :param type: The resource type chain (e.g. virtualMachines/extensions) + :type type: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: NameAvailabilityResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.NameAvailabilityResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + parameters = models.NameAvailabilityRequest(name=name, type=type) + + # Construct URL + url = self.check_name_availability.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'NameAvailabilityRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('NameAvailabilityResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability'} diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/tasks_operations.py b/src/datamigration/azext_dms/mgmt/datamigration/operations/tasks_operations.py new file mode 100644 index 00000000000..0815ce26c00 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/operations/tasks_operations.py @@ -0,0 +1,581 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class TasksOperations(object): + """TasksOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API. Constant value: "2017-11-15-privatepreview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-15-privatepreview" + + self.config = config + + def list( + self, group_name, service_name, project_name, task_type=None, custom_headers=None, raw=False, **operation_config): + """Get tasks in a service. + + The services resource is the top-level resource that represents the + Data 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProjectTask + :rtype: + ~azure.mgmt.datamigration.models.ProjectTaskPaged[~azure.mgmt.datamigration.models.ProjectTask] + :raises: + :class:`ApiErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if task_type is not None: + query_parameters['taskType'] = self._serialize.query("task_type", task_type, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ProjectTaskPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ProjectTaskPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks'} + + def create_or_update( + self, group_name, service_name, project_name, task_name, etag=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 exising 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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProjectTask or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.ProjectTask or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + parameters = models.ProjectTask(etag=etag, properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProjectTask') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ProjectTask', response) + if response.status_code == 201: + deserialized = self._deserialize('ProjectTask', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} + + def get( + self, group_name, service_name, project_name, task_name, expand=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProjectTask or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.ProjectTask or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + 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 = {} + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ProjectTask', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} + + def delete( + self, group_name, service_name, project_name, task_name, delete_running_tasks=None, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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 = {} + if delete_running_tasks is not None: + query_parameters['deleteRunningTasks'] = self._serialize.query("delete_running_tasks", delete_running_tasks, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} + + def update( + self, group_name, service_name, project_name, task_name, etag=None, properties=None, custom_headers=None, raw=False, **operation_config): + """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 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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProjectTask or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.ProjectTask or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + parameters = models.ProjectTask(etag=etag, properties=properties) + + # Construct URL + url = self.update.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ProjectTask') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ProjectTask', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}'} + + def cancel( + self, group_name, service_name, project_name, task_name, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProjectTask or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.ProjectTask or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.cancel.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ProjectTask', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/cancel'} + + def command( + self, group_name, service_name, project_name, task_name, parameters, custom_headers=None, raw=False, **operation_config): + """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 + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: CommandProperties or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.datamigration.models.CommandProperties or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.command.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'CommandProperties') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('CommandProperties', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/tasks/{taskName}/command'} diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/usages_operations.py b/src/datamigration/azext_dms/mgmt/datamigration/operations/usages_operations.py new file mode 100644 index 00000000000..162574bf102 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/operations/usages_operations.py @@ -0,0 +1,107 @@ +# 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 uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class UsagesOperations(object): + """UsagesOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of the API. Constant value: "2017-11-15-privatepreview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2017-11-15-privatepreview" + + self.config = config + + def list( + self, location, custom_headers=None, raw=False, **operation_config): + """Get resource quotas and usage information. + + This method returns region-specific quotas and resource usage + information for the Data Migration Service. + + :param location: The Azure region of the operation + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Quota + :rtype: + ~azure.mgmt.datamigration.models.QuotaPaged[~azure.mgmt.datamigration.models.Quota] + :raises: + :class:`ApiErrorException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + 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 = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.QuotaPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.QuotaPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/usages'} diff --git a/src/datamigration/azext_dms/mgmt/datamigration/version.py b/src/datamigration/azext_dms/mgmt/datamigration/version.py new file mode 100644 index 00000000000..4ee95242ce6 --- /dev/null +++ b/src/datamigration/azext_dms/mgmt/datamigration/version.py @@ -0,0 +1,13 @@ +# 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 = "2017-11-15-privatepreview" + diff --git a/src/datamigration/azext_dms/scenarios.py b/src/datamigration/azext_dms/scenarios.py new file mode 100644 index 00000000000..130751fad3f --- /dev/null +++ b/src/datamigration/azext_dms/scenarios.py @@ -0,0 +1,68 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from azext_dms.mgmt.datamigration.models import (MigrationValidationOptions, + MigrateSqlServerSqlDbDatabaseInput, + MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, + MigrateMySqlAzureDbForMySqlSyncDatabaseInput, + MigrateSqlServerSqlDbTaskInput, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, + MigrateMySqlAzureDbForMySqlSyncTaskInput) + +def get_migrate_sql_server_to_sqldb_input(database_options_json, + source_connection_info, + target_connection_info, + enable_schema_validation, + enable_data_integrity_validation, + enable_query_analysis_validation): + validation_options = MigrationValidationOptions(enable_schema_validation=enable_schema_validation, + enable_data_integrity_validation=enable_data_integrity_validation, + enable_query_analysis_validation=enable_query_analysis_validation) + + database_options = [] + + for d in database_options_json: + database_options.append(MigrateSqlServerSqlDbDatabaseInput( + name=d.get('name', None), + target_database_name=d.get('target_database_name', None), + make_source_db_read_only=d.get('make_source_db_read_only', None), + table_map=d.get('table_map', None))) + + return MigrateSqlServerSqlDbTaskInput(source_connection_info=source_connection_info, + target_connection_info=target_connection_info, + selected_databases=database_options, + validation_options=validation_options) + +def get_migrate_postgresql_to_azuredbforpostgresql_sync_input(database_options_json, + source_connection_info, + target_connection_info): + database_options = [] + + for d in database_options_json: + database_options.append(MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput( + name=d.get('name', None), + target_database_name=d.get('target_database_name', None), + make_source_db_read_only=None, + table_map=None)) + + return MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput(source_connection_info=source_connection_info, + target_connection_info=target_connection_info, + selected_databases=database_options) + +def get_migrate_mysql_to_azuredbformysql_sync_input(database_options_json, + source_connection_info, + target_connection_info): + database_options = [] + + for d in database_options_json: + database_options.append(MigrateMySqlAzureDbForMySqlSyncDatabaseInput( + name=d.get('name', None), + target_database_name=d.get('target_database_name', None), + make_source_db_read_only=None, + table_map=None)) + + return MigrateMySqlAzureDbForMySqlSyncTaskInput(source_connection_info=source_connection_info, + target_connection_info=target_connection_info, + selected_databases=database_options) diff --git a/src/datamigration/setup.py b/src/datamigration/setup.py new file mode 100644 index 00000000000..5f5e2f390be --- /dev/null +++ b/src/datamigration/setup.py @@ -0,0 +1,40 @@ +#!/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 + +VERSION = "0.2.0" + +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +setup( + name='dms', + version=VERSION, + description='Microsoft Azure Command-Line Tools for the Data Migration Service (DMS) Command Module', + license='MIT', + author='Artyom Pavlichenko', + author_email='arpavlic@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions', + classifiers=CLASSIFIERS, + packages = find_packages(exclude=["test"]), + install_requires=DEPENDENCIES +) From 4eca0d04f575f746a69d4897703c09e890b99b5f Mon Sep 17 00:00:00 2001 From: temandr Date: Mon, 18 Jun 2018 11:51:31 -0700 Subject: [PATCH 02/11] Renamed extension --- src/datamigration/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datamigration/setup.py b/src/datamigration/setup.py index 5f5e2f390be..096012abb41 100644 --- a/src/datamigration/setup.py +++ b/src/datamigration/setup.py @@ -27,7 +27,7 @@ DEPENDENCIES = [] setup( - name='dms', + name='dms-pg-mysql', version=VERSION, description='Microsoft Azure Command-Line Tools for the Data Migration Service (DMS) Command Module', license='MIT', From 173bb718486b6520bb6577b3c9bf7fcb1022802b Mon Sep 17 00:00:00 2001 From: temandr Date: Mon, 18 Jun 2018 16:46:42 -0700 Subject: [PATCH 03/11] Updated the default database for PG --- src/datamigration/azext_dms/_help.py | 2 +- src/datamigration/azext_dms/custom.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/datamigration/azext_dms/_help.py b/src/datamigration/azext_dms/_help.py index e711c454d0c..55f8524b106 100644 --- a/src/datamigration/azext_dms/_help.py +++ b/src/datamigration/azext_dms/_help.py @@ -124,7 +124,7 @@ "userName": "user name", // if this is missing or null, you will be prompted "password": null, // if this is missing or null (highly recommended) you will be prompted "serverName": "server name", - "databaseName": "database name", // if this is missing, it will default to the 'postgre' server + "databaseName": "database name", // if this is missing, it will default to the 'postgres' database "port": 5432 // if this is missing, it will default to 5432 } """ diff --git a/src/datamigration/azext_dms/custom.py b/src/datamigration/azext_dms/custom.py index 461efc785e8..6838909e560 100644 --- a/src/datamigration/azext_dms/custom.py +++ b/src/datamigration/azext_dms/custom.py @@ -167,7 +167,7 @@ def create_connection(connection_info_json, prompt_prefix, typeOfInfo): server_name=server_name, port=port) elif "postgre" in typeOfInfo: - database_name = connection_info_json.get('databaseName', "postgre") + database_name = connection_info_json.get('databaseName', "postgres") port = connection_info_json.get('port', 5432) return PostgreSqlConnectionInfo(user_name=user_name, password=password, From 92c8df74da59db3e960262a5f77693fa15a106f1 Mon Sep 17 00:00:00 2001 From: temandr Date: Mon, 18 Jun 2018 16:47:55 -0700 Subject: [PATCH 04/11] Updated the extension description to remove any CLI references --- src/datamigration/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datamigration/setup.py b/src/datamigration/setup.py index 096012abb41..411da0df07a 100644 --- a/src/datamigration/setup.py +++ b/src/datamigration/setup.py @@ -29,7 +29,7 @@ setup( name='dms-pg-mysql', version=VERSION, - description='Microsoft Azure Command-Line Tools for the Data Migration Service (DMS) Command Module', + description='Support for continuous migrations for MySql and PostgreSql instances.', license='MIT', author='Artyom Pavlichenko', author_email='arpavlic@microsoft.com', From e0735f66559585d822b6d2034901264897288c62 Mon Sep 17 00:00:00 2001 From: temandr Date: Tue, 19 Jun 2018 09:18:22 -0700 Subject: [PATCH 05/11] Renamed 'mgmt' to 'vendored_sdks' --- src/datamigration/azext_dms/_client_factory.py | 2 +- src/datamigration/azext_dms/commands.py | 4 ++-- src/datamigration/azext_dms/custom.py | 2 +- src/datamigration/azext_dms/scenarios.py | 2 +- .../azext_dms/{mgmt => vendored_sdks}/__init__.py | 0 .../{mgmt => vendored_sdks}/datamigration/__init__.py | 0 .../datamigration/data_migration_service_client.py | 0 .../{mgmt => vendored_sdks}/datamigration/models/__init__.py | 0 .../{mgmt => vendored_sdks}/datamigration/models/api_error.py | 0 .../datamigration/models/available_service_sku.py | 0 .../datamigration/models/available_service_sku_capacity.py | 0 .../datamigration/models/available_service_sku_paged.py | 0 .../datamigration/models/available_service_sku_sku.py | 0 .../datamigration/models/blob_share.py | 0 .../datamigration/models/command_properties.py | 0 .../models/connect_to_source_my_sql_task_input.py | 0 .../models/connect_to_source_my_sql_task_properties.py | 0 .../models/connect_to_source_non_sql_task_output.py | 0 .../models/connect_to_source_oracle_task_input.py | 0 .../models/connect_to_source_oracle_task_properties.py | 0 .../models/connect_to_source_sql_server_task_input.py | 0 .../models/connect_to_source_sql_server_task_output.py | 0 ...onnect_to_source_sql_server_task_output_agent_job_level.py | 0 ...connect_to_source_sql_server_task_output_database_level.py | 0 .../connect_to_source_sql_server_task_output_login_level.py | 0 .../connect_to_source_sql_server_task_output_task_level.py | 0 .../models/connect_to_source_sql_server_task_properties.py | 0 .../connect_to_target_azure_db_for_my_sql_task_input.py | 0 .../connect_to_target_azure_db_for_my_sql_task_output.py | 0 .../connect_to_target_azure_db_for_my_sql_task_properties.py | 0 .../models/connect_to_target_sql_db_task_input.py | 0 .../models/connect_to_target_sql_db_task_output.py | 0 .../models/connect_to_target_sql_db_task_properties.py | 0 .../models/connect_to_target_sql_mi_task_input.py | 0 .../models/connect_to_target_sql_mi_task_output.py | 0 .../models/connect_to_target_sql_mi_task_properties.py | 0 .../models/connect_to_target_sql_server_task_input.py | 0 .../models/connect_to_target_sql_server_task_output.py | 0 .../models/connect_to_target_sql_server_task_properties.py | 0 .../datamigration/models/connection_info.py | 0 .../datamigration/models/data_integrity_validation_result.py | 0 .../models/data_item_migration_summary_result.py | 0 .../datamigration/models/data_migration_error.py | 0 .../datamigration/models/data_migration_project_metadata.py | 0 .../datamigration/models/data_migration_service.py | 0 .../models/data_migration_service_client_enums.py | 0 .../datamigration/models/data_migration_service_paged.py | 0 .../models/data_migration_service_status_response.py | 0 .../{mgmt => vendored_sdks}/datamigration/models/database.py | 0 .../datamigration/models/database_file_info.py | 0 .../datamigration/models/database_file_input.py | 0 .../datamigration/models/database_info.py | 0 .../datamigration/models/database_object_name.py | 0 .../datamigration/models/database_summary_result.py | 0 .../datamigration/models/database_table.py | 0 .../datamigration/models/execution_statistics.py | 0 .../datamigration/models/file_share.py | 0 .../models/get_project_details_my_sql_sql_task_output.py | 0 .../models/get_project_details_my_sql_sql_task_properties.py | 0 .../models/get_project_details_non_sql_task_input.py | 0 .../models/get_project_details_oracle_sql_task_output.py | 0 .../models/get_project_details_oracle_sql_task_properties.py | 0 .../datamigration/models/get_user_tables_sql_task_input.py | 0 .../datamigration/models/get_user_tables_sql_task_output.py | 0 .../models/get_user_tables_sql_task_properties.py | 0 .../migrate_my_sql_azure_db_for_my_sql_sync_database_input.py | 0 .../migrate_my_sql_azure_db_for_my_sql_sync_task_input.py | 0 .../migrate_my_sql_azure_db_for_my_sql_sync_task_output.py | 0 ...sql_azure_db_for_my_sql_sync_task_output_database_error.py | 0 ...sql_azure_db_for_my_sql_sync_task_output_database_level.py | 0 ...grate_my_sql_azure_db_for_my_sql_sync_task_output_error.py | 0 ...ql_azure_db_for_my_sql_sync_task_output_migration_level.py | 0 ...my_sql_azure_db_for_my_sql_sync_task_output_table_level.py | 0 ...migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py | 0 .../datamigration/models/migrate_my_sql_sql_task_input.py | 0 .../datamigration/models/migrate_my_sql_sql_task_output.py | 0 .../models/migrate_my_sql_sql_task_properties.py | 0 .../datamigration/models/migrate_oracle_sql_task_input.py | 0 .../datamigration/models/migrate_oracle_sql_task_output.py | 0 .../models/migrate_oracle_sql_task_properties.py | 0 ...ostgre_sql_azure_db_for_postgre_sql_sync_database_input.py | 0 ...te_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py | 0 ...e_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py | 0 ...zure_db_for_postgre_sql_sync_task_output_database_error.py | 0 ...zure_db_for_postgre_sql_sync_task_output_database_level.py | 0 ...gre_sql_azure_db_for_postgre_sql_sync_task_output_error.py | 0 ...ure_db_for_postgre_sql_sync_task_output_migration_level.py | 0 ...l_azure_db_for_postgre_sql_sync_task_output_table_level.py | 0 ...stgre_sql_azure_db_for_postgre_sql_sync_task_properties.py | 0 .../models/migrate_sql_server_sql_db_database_input.py | 0 .../models/migrate_sql_server_sql_db_sync_task_input.py | 0 .../models/migrate_sql_server_sql_db_sync_task_output.py | 0 ...grate_sql_server_sql_db_sync_task_output_database_error.py | 0 ...grate_sql_server_sql_db_sync_task_output_database_level.py | 0 .../migrate_sql_server_sql_db_sync_task_output_error.py | 0 ...rate_sql_server_sql_db_sync_task_output_migration_level.py | 0 .../migrate_sql_server_sql_db_sync_task_output_table_level.py | 0 .../models/migrate_sql_server_sql_db_sync_task_properties.py | 0 .../models/migrate_sql_server_sql_db_task_input.py | 0 .../models/migrate_sql_server_sql_db_task_output.py | 0 .../migrate_sql_server_sql_db_task_output_database_level.py | 0 .../models/migrate_sql_server_sql_db_task_output_error.py | 0 .../migrate_sql_server_sql_db_task_output_migration_level.py | 0 .../migrate_sql_server_sql_db_task_output_table_level.py | 0 .../models/migrate_sql_server_sql_db_task_properties.py | 0 .../models/migrate_sql_server_sql_mi_database_input.py | 0 .../models/migrate_sql_server_sql_mi_task_input.py | 0 .../models/migrate_sql_server_sql_mi_task_output.py | 0 .../migrate_sql_server_sql_mi_task_output_agent_job_level.py | 0 .../migrate_sql_server_sql_mi_task_output_database_level.py | 0 .../models/migrate_sql_server_sql_mi_task_output_error.py | 0 .../migrate_sql_server_sql_mi_task_output_login_level.py | 0 .../migrate_sql_server_sql_mi_task_output_migration_level.py | 0 .../models/migrate_sql_server_sql_mi_task_properties.py | 0 .../models/migrate_sql_server_sql_server_database_input.py | 0 .../models/migrate_sql_server_sql_server_task_input.py | 0 .../models/migrate_sql_server_sql_server_task_output.py | 0 ...igrate_sql_server_sql_server_task_output_database_level.py | 0 .../models/migrate_sql_server_sql_server_task_output_error.py | 0 ...grate_sql_server_sql_server_task_output_migration_level.py | 0 .../models/migrate_sql_server_sql_server_task_properties.py | 0 .../models/migrate_sync_complete_command_input.py | 0 .../models/migrate_sync_complete_command_output.py | 0 .../models/migrate_sync_complete_command_properties.py | 0 .../datamigration/models/migration_eligibility_info.py | 0 .../datamigration/models/migration_report_result.py | 0 .../datamigration/models/migration_table_metadata.py | 0 .../models/migration_validation_database_level_result.py | 0 .../models/migration_validation_database_summary_result.py | 0 .../datamigration/models/migration_validation_options.py | 0 .../datamigration/models/migration_validation_result.py | 0 .../datamigration/models/my_sql_connection_info.py | 0 .../models/my_sql_data_migration_project_metadata.py | 0 .../datamigration/models/name_availability_request.py | 0 .../datamigration/models/name_availability_response.py | 0 .../datamigration/models/non_sql_data_migration_table.py | 0 .../models/non_sql_data_migration_table_result.py | 0 .../datamigration/models/non_sql_migration_task_input.py | 0 .../datamigration/models/non_sql_migration_task_output.py | 0 .../datamigration/models/odata_error.py | 0 .../datamigration/models/oracle_connection_info.py | 0 .../models/oracle_data_migration_project_metadata.py | 0 .../datamigration/models/postgre_sql_connection_info.py | 0 .../{mgmt => vendored_sdks}/datamigration/models/project.py | 0 .../datamigration/models/project_artifacts_response.py | 0 .../datamigration/models/project_paged.py | 0 .../datamigration/models/project_task.py | 0 .../datamigration/models/project_task_paged.py | 0 .../datamigration/models/project_task_properties.py | 0 .../datamigration/models/query_analysis_validation_result.py | 0 .../datamigration/models/query_execution_result.py | 0 .../{mgmt => vendored_sdks}/datamigration/models/quota.py | 0 .../datamigration/models/quota_name.py | 0 .../datamigration/models/quota_paged.py | 0 .../datamigration/models/reportable_exception.py | 0 .../{mgmt => vendored_sdks}/datamigration/models/resource.py | 0 .../datamigration/models/resource_sku.py | 0 .../datamigration/models/resource_sku_capabilities.py | 0 .../datamigration/models/resource_sku_capacity.py | 0 .../datamigration/models/resource_sku_costs.py | 0 .../datamigration/models/resource_sku_paged.py | 0 .../datamigration/models/resource_sku_restrictions.py | 0 .../models/schema_comparison_validation_result.py | 0 .../models/schema_comparison_validation_result_type.py | 0 .../datamigration/models/server_properties.py | 0 .../datamigration/models/service_operation.py | 0 .../datamigration/models/service_operation_display.py | 0 .../datamigration/models/service_operation_paged.py | 0 .../datamigration/models/service_sku.py | 0 .../datamigration/models/sql_connection_info.py | 0 .../datamigration/models/sql_migration_task_input.py | 0 .../models/start_migration_scenario_server_role_result.py | 0 .../models/sync_migration_database_error_event.py | 0 .../datamigration/models/tracked_resource.py | 0 .../validate_migration_input_sql_server_sql_mi_task_input.py | 0 .../validate_migration_input_sql_server_sql_mi_task_output.py | 0 ...idate_migration_input_sql_server_sql_mi_task_properties.py | 0 ...lidate_migration_input_sql_server_sql_server_task_input.py | 0 ...idate_migration_input_sql_server_sql_server_task_output.py | 0 ...e_migration_input_sql_server_sql_server_task_properties.py | 0 .../datamigration/models/validation_error.py | 0 .../datamigration/models/wait_statistics.py | 0 .../datamigration/operations/__init__.py | 0 .../datamigration/operations/operations.py | 0 .../datamigration/operations/projects_operations.py | 0 .../datamigration/operations/resource_skus_operations.py | 0 .../datamigration/operations/services_operations.py | 0 .../datamigration/operations/tasks_operations.py | 0 .../datamigration/operations/usages_operations.py | 0 .../{mgmt => vendored_sdks}/datamigration/version.py | 0 190 files changed, 5 insertions(+), 5 deletions(-) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/__init__.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/__init__.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/data_migration_service_client.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/__init__.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/api_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/available_service_sku.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/available_service_sku_capacity.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/available_service_sku_paged.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/available_service_sku_sku.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/blob_share.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/command_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_my_sql_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_my_sql_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_non_sql_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_oracle_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_oracle_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_sql_server_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_sql_server_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_sql_server_task_output_database_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_sql_server_task_output_login_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_sql_server_task_output_task_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_source_sql_server_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_sql_db_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_sql_db_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_sql_db_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_sql_mi_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_sql_mi_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_sql_mi_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_sql_server_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_sql_server_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connect_to_target_sql_server_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/connection_info.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/data_integrity_validation_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/data_item_migration_summary_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/data_migration_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/data_migration_project_metadata.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/data_migration_service.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/data_migration_service_client_enums.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/data_migration_service_paged.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/data_migration_service_status_response.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/database.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/database_file_info.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/database_file_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/database_info.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/database_object_name.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/database_summary_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/database_table.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/execution_statistics.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/file_share.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/get_project_details_my_sql_sql_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/get_project_details_my_sql_sql_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/get_project_details_non_sql_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/get_project_details_oracle_sql_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/get_project_details_oracle_sql_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/get_user_tables_sql_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/get_user_tables_sql_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/get_user_tables_sql_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_sql_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_sql_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_my_sql_sql_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_oracle_sql_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_oracle_sql_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_oracle_sql_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_database_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_task_output_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_db_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_mi_database_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_mi_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_mi_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_mi_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_server_database_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_server_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_server_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_server_task_output_database_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_server_task_output_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_server_task_output_migration_level.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sql_server_sql_server_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sync_complete_command_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sync_complete_command_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migrate_sync_complete_command_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migration_eligibility_info.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migration_report_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migration_table_metadata.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migration_validation_database_level_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migration_validation_database_summary_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migration_validation_options.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/migration_validation_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/my_sql_connection_info.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/my_sql_data_migration_project_metadata.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/name_availability_request.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/name_availability_response.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/non_sql_data_migration_table.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/non_sql_data_migration_table_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/non_sql_migration_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/non_sql_migration_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/odata_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/oracle_connection_info.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/oracle_data_migration_project_metadata.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/postgre_sql_connection_info.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/project.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/project_artifacts_response.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/project_paged.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/project_task.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/project_task_paged.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/project_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/query_analysis_validation_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/query_execution_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/quota.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/quota_name.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/quota_paged.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/reportable_exception.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/resource.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/resource_sku.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/resource_sku_capabilities.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/resource_sku_capacity.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/resource_sku_costs.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/resource_sku_paged.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/resource_sku_restrictions.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/schema_comparison_validation_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/schema_comparison_validation_result_type.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/server_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/service_operation.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/service_operation_display.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/service_operation_paged.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/service_sku.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/sql_connection_info.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/sql_migration_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/start_migration_scenario_server_role_result.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/sync_migration_database_error_event.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/tracked_resource.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/validate_migration_input_sql_server_sql_server_task_input.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/validate_migration_input_sql_server_sql_server_task_output.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/validate_migration_input_sql_server_sql_server_task_properties.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/validation_error.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/models/wait_statistics.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/operations/__init__.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/operations/operations.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/operations/projects_operations.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/operations/resource_skus_operations.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/operations/services_operations.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/operations/tasks_operations.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/operations/usages_operations.py (100%) rename src/datamigration/azext_dms/{mgmt => vendored_sdks}/datamigration/version.py (100%) diff --git a/src/datamigration/azext_dms/_client_factory.py b/src/datamigration/azext_dms/_client_factory.py index c3f2e0a6f1a..1fcb241c815 100644 --- a/src/datamigration/azext_dms/_client_factory.py +++ b/src/datamigration/azext_dms/_client_factory.py @@ -5,7 +5,7 @@ def dms_client_factory(cli_ctx, **_): from azure.cli.core.commands.client_factory import get_mgmt_service_client - from azext_dms.mgmt.datamigration import DataMigrationServiceClient + from azext_dms.vendored_sdks.datamigration import DataMigrationServiceClient return get_mgmt_service_client(cli_ctx, DataMigrationServiceClient) def dms_cf_projects(cli_ctx, *_): diff --git a/src/datamigration/azext_dms/commands.py b/src/datamigration/azext_dms/commands.py index 855189519c6..46de06e3e7f 100644 --- a/src/datamigration/azext_dms/commands.py +++ b/src/datamigration/azext_dms/commands.py @@ -11,12 +11,12 @@ def load_command_table(self, _): dms_projects_sdk = CliCommandType( - operations_tmpl='azext_dms.mgmt.datamigration.operations.projects_operations#ProjectsOperations.{}', + operations_tmpl='azext_dms.vendored_sdks.datamigration.operations.projects_operations#ProjectsOperations.{}', client_factory=dms_client_factory ) dms_tasks_sdk = CliCommandType( - operations_tmpl='azext_dms.mgmt.datamigration.operations.tasks_operations#TasksOperations.{}', + operations_tmpl='azext_dms.vendored_sdks.datamigration.operations.tasks_operations#TasksOperations.{}', client_factory=dms_client_factory ) diff --git a/src/datamigration/azext_dms/custom.py b/src/datamigration/azext_dms/custom.py index 6838909e560..b6ad7c72845 100644 --- a/src/datamigration/azext_dms/custom.py +++ b/src/datamigration/azext_dms/custom.py @@ -7,7 +7,7 @@ from azure.cli.core.util import get_file_json, shell_safe_json_parse from knack.prompting import prompt, prompt_pass -from azext_dms.mgmt.datamigration.models import (Project, +from azext_dms.vendored_sdks.datamigration.models import (Project, SqlConnectionInfo, MySqlConnectionInfo, PostgreSqlConnectionInfo, diff --git a/src/datamigration/azext_dms/scenarios.py b/src/datamigration/azext_dms/scenarios.py index 130751fad3f..ab61f9d5995 100644 --- a/src/datamigration/azext_dms/scenarios.py +++ b/src/datamigration/azext_dms/scenarios.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -from azext_dms.mgmt.datamigration.models import (MigrationValidationOptions, +from azext_dms.vendored_sdks.datamigration.models import (MigrationValidationOptions, MigrateSqlServerSqlDbDatabaseInput, MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, MigrateMySqlAzureDbForMySqlSyncDatabaseInput, diff --git a/src/datamigration/azext_dms/mgmt/__init__.py b/src/datamigration/azext_dms/vendored_sdks/__init__.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/__init__.py rename to src/datamigration/azext_dms/vendored_sdks/__init__.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/__init__.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/__init__.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/__init__.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/__init__.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/data_migration_service_client.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/data_migration_service_client.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/data_migration_service_client.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/data_migration_service_client.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/__init__.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/__init__.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/__init__.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/__init__.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/api_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/api_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/api_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/api_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/available_service_sku.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/available_service_sku.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_capacity.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/available_service_sku_capacity.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_capacity.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/available_service_sku_capacity.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_paged.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/available_service_sku_paged.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_paged.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/available_service_sku_paged.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_sku.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/available_service_sku_sku.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/available_service_sku_sku.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/available_service_sku_sku.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/blob_share.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/blob_share.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/blob_share.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/blob_share.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/command_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/command_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/command_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/command_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_my_sql_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_my_sql_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_my_sql_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_my_sql_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_my_sql_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_non_sql_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_non_sql_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_non_sql_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_non_sql_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_oracle_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_oracle_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_oracle_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_oracle_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_oracle_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_output_agent_job_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_database_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_output_database_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_database_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_output_database_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_output_login_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_login_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_output_login_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_output_task_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_output_task_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_output_task_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_source_sql_server_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_source_sql_server_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_azure_db_for_my_sql_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_azure_db_for_my_sql_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_azure_db_for_my_sql_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_db_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_db_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_db_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_db_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_db_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_db_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_db_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_mi_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_mi_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_mi_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_mi_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_mi_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_mi_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_mi_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_server_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_server_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_server_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_server_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_server_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connect_to_target_sql_server_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connect_to_target_sql_server_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/connection_info.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/connection_info.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/connection_info.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/connection_info.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_integrity_validation_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_integrity_validation_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/data_integrity_validation_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_integrity_validation_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_item_migration_summary_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_item_migration_summary_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/data_item_migration_summary_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_item_migration_summary_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_project_metadata.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_project_metadata.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_project_metadata.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_project_metadata.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_service.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_service.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_client_enums.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_service_client_enums.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_client_enums.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_service_client_enums.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_paged.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_service_paged.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_paged.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_service_paged.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_status_response.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_service_status_response.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/data_migration_service_status_response.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/data_migration_service_status_response.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/database.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/database.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/database.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_file_info.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_file_info.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/database_file_info.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_file_info.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_file_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_file_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/database_file_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_file_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_info.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_info.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/database_info.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_info.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_object_name.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_object_name.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/database_object_name.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_object_name.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_summary_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_summary_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/database_summary_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_summary_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/database_table.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_table.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/database_table.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/database_table.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/execution_statistics.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/execution_statistics.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/execution_statistics.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/execution_statistics.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/file_share.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/file_share.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/file_share.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/file_share.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_project_details_my_sql_sql_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_project_details_my_sql_sql_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_project_details_my_sql_sql_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_my_sql_sql_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_project_details_my_sql_sql_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_non_sql_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_project_details_non_sql_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_non_sql_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_project_details_non_sql_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_project_details_oracle_sql_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_project_details_oracle_sql_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_project_details_oracle_sql_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/get_project_details_oracle_sql_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_project_details_oracle_sql_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_user_tables_sql_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_user_tables_sql_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_user_tables_sql_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_user_tables_sql_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_user_tables_sql_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/get_user_tables_sql_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/get_user_tables_sql_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_database_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_database_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_migration_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_output_table_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_azure_db_for_my_sql_sync_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_sql_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_sql_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_sql_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_sql_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_sql_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_my_sql_sql_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_my_sql_sql_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_oracle_sql_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_oracle_sql_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_oracle_sql_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_oracle_sql_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_oracle_sql_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_oracle_sql_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_oracle_sql_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_database_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_database_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_migration_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output_table_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_database_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_database_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_database_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_database_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output_database_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output_migration_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_output_table_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_sync_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_output_database_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_output_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_output_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_output_migration_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_output_table_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_db_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_db_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_database_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_database_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_database_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output_agent_job_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output_database_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output_login_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_output_migration_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_mi_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_mi_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_database_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_database_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_database_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_database_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_output_database_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_database_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_output_database_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_output_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_output_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_migration_level.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_output_migration_level.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_output_migration_level.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_output_migration_level.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sql_server_sql_server_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sql_server_sql_server_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sync_complete_command_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sync_complete_command_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sync_complete_command_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sync_complete_command_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sync_complete_command_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migrate_sync_complete_command_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migrate_sync_complete_command_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_eligibility_info.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_eligibility_info.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migration_eligibility_info.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_eligibility_info.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_report_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_report_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migration_report_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_report_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_table_metadata.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_table_metadata.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migration_table_metadata.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_table_metadata.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_level_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_validation_database_level_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_level_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_validation_database_level_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_summary_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_validation_database_summary_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_database_summary_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_validation_database_summary_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_options.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_validation_options.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_options.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_validation_options.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_validation_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/migration_validation_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/migration_validation_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_connection_info.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/my_sql_connection_info.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_connection_info.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/my_sql_connection_info.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_data_migration_project_metadata.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/my_sql_data_migration_project_metadata.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/my_sql_data_migration_project_metadata.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/my_sql_data_migration_project_metadata.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_request.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/name_availability_request.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_request.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/name_availability_request.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_response.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/name_availability_response.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/name_availability_response.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/name_availability_response.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/non_sql_data_migration_table.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/non_sql_data_migration_table.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/non_sql_data_migration_table_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_data_migration_table_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/non_sql_data_migration_table_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/non_sql_migration_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/non_sql_migration_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/non_sql_migration_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/non_sql_migration_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/non_sql_migration_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/odata_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/odata_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/odata_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/odata_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/oracle_connection_info.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/oracle_connection_info.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/oracle_connection_info.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/oracle_connection_info.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/oracle_data_migration_project_metadata.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/oracle_data_migration_project_metadata.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/oracle_data_migration_project_metadata.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/oracle_data_migration_project_metadata.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/postgre_sql_connection_info.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/postgre_sql_connection_info.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/postgre_sql_connection_info.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/postgre_sql_connection_info.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/project.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/project.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/project.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project_artifacts_response.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/project_artifacts_response.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/project_artifacts_response.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/project_artifacts_response.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project_paged.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/project_paged.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/project_paged.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/project_paged.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project_task.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/project_task.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/project_task.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/project_task.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project_task_paged.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/project_task_paged.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/project_task_paged.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/project_task_paged.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/project_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/project_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/project_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/project_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/query_analysis_validation_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/query_analysis_validation_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/query_analysis_validation_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/query_analysis_validation_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/query_execution_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/query_execution_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/query_execution_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/query_execution_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/quota.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/quota.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/quota.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/quota.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/quota_name.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/quota_name.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/quota_name.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/quota_name.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/quota_paged.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/quota_paged.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/quota_paged.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/quota_paged.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/reportable_exception.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/reportable_exception.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/reportable_exception.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/reportable_exception.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/resource.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capabilities.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku_capabilities.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capabilities.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku_capabilities.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capacity.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku_capacity.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_capacity.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku_capacity.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_costs.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku_costs.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_costs.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku_costs.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_paged.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku_paged.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_paged.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku_paged.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_restrictions.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku_restrictions.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/resource_sku_restrictions.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/resource_sku_restrictions.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/schema_comparison_validation_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/schema_comparison_validation_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result_type.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/schema_comparison_validation_result_type.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/schema_comparison_validation_result_type.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/schema_comparison_validation_result_type.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/server_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/server_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/server_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/server_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/service_operation.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/service_operation.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/service_operation.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_display.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/service_operation_display.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_display.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/service_operation_display.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_paged.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/service_operation_paged.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/service_operation_paged.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/service_operation_paged.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/service_sku.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/service_sku.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/service_sku.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/service_sku.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/sql_connection_info.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/sql_connection_info.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/sql_connection_info.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/sql_connection_info.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/sql_migration_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/sql_migration_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/sql_migration_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/sql_migration_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/start_migration_scenario_server_role_result.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/start_migration_scenario_server_role_result.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/start_migration_scenario_server_role_result.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/start_migration_scenario_server_role_result.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/sync_migration_database_error_event.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/sync_migration_database_error_event.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/sync_migration_database_error_event.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/sync_migration_database_error_event.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/tracked_resource.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/tracked_resource.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/tracked_resource.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/tracked_resource.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_mi_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_mi_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_mi_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_input.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_server_task_input.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_input.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_server_task_input.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_output.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_server_task_output.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_output.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_server_task_output.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_properties.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_server_task_properties.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/validate_migration_input_sql_server_sql_server_task_properties.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/validate_migration_input_sql_server_sql_server_task_properties.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/validation_error.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/validation_error.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/validation_error.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/validation_error.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/models/wait_statistics.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/models/wait_statistics.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/models/wait_statistics.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/models/wait_statistics.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/__init__.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/operations/__init__.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/operations/__init__.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/operations/__init__.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/operations.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/operations/operations.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/operations/operations.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/operations/operations.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/projects_operations.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/operations/projects_operations.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/operations/projects_operations.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/operations/projects_operations.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/resource_skus_operations.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/operations/resource_skus_operations.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/operations/resource_skus_operations.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/operations/resource_skus_operations.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/services_operations.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/operations/services_operations.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/operations/services_operations.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/operations/services_operations.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/tasks_operations.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/operations/tasks_operations.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/operations/tasks_operations.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/operations/tasks_operations.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/operations/usages_operations.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/operations/usages_operations.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/operations/usages_operations.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/operations/usages_operations.py diff --git a/src/datamigration/azext_dms/mgmt/datamigration/version.py b/src/datamigration/azext_dms/vendored_sdks/datamigration/version.py similarity index 100% rename from src/datamigration/azext_dms/mgmt/datamigration/version.py rename to src/datamigration/azext_dms/vendored_sdks/datamigration/version.py From c471a6fc836461ee5522c378880a067b5caa8b47 Mon Sep 17 00:00:00 2001 From: temandr Date: Tue, 19 Jun 2018 09:36:01 -0700 Subject: [PATCH 06/11] Fixed pylint issues --- src/datamigration/azext_dms/custom.py | 16 ++++++++-------- src/datamigration/azext_dms/scenarios.py | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/datamigration/azext_dms/custom.py b/src/datamigration/azext_dms/custom.py index b6ad7c72845..6d83c6c6f10 100644 --- a/src/datamigration/azext_dms/custom.py +++ b/src/datamigration/azext_dms/custom.py @@ -8,14 +8,14 @@ from azure.cli.core.util import get_file_json, shell_safe_json_parse from knack.prompting import prompt, prompt_pass from azext_dms.vendored_sdks.datamigration.models import (Project, - SqlConnectionInfo, - MySqlConnectionInfo, - PostgreSqlConnectionInfo, - MigrateSyncCompleteCommandInput, - MigrateSqlServerSqlDbTaskProperties, - MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, - MigrateMySqlAzureDbForMySqlSyncTaskProperties, - MigrateSyncCompleteCommandProperties) + SqlConnectionInfo, + MySqlConnectionInfo, + PostgreSqlConnectionInfo, + MigrateSyncCompleteCommandInput, + MigrateSqlServerSqlDbTaskProperties, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, + MigrateMySqlAzureDbForMySqlSyncTaskProperties, + MigrateSyncCompleteCommandProperties) from azext_dms.scenarios import (get_migrate_sql_server_to_sqldb_input, get_migrate_postgresql_to_azuredbforpostgresql_sync_input, get_migrate_mysql_to_azuredbformysql_sync_input) diff --git a/src/datamigration/azext_dms/scenarios.py b/src/datamigration/azext_dms/scenarios.py index ab61f9d5995..f1e5c135d8d 100644 --- a/src/datamigration/azext_dms/scenarios.py +++ b/src/datamigration/azext_dms/scenarios.py @@ -4,12 +4,12 @@ # -------------------------------------------------------------------------------------------- from azext_dms.vendored_sdks.datamigration.models import (MigrationValidationOptions, - MigrateSqlServerSqlDbDatabaseInput, - MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, - MigrateMySqlAzureDbForMySqlSyncDatabaseInput, - MigrateSqlServerSqlDbTaskInput, - MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, - MigrateMySqlAzureDbForMySqlSyncTaskInput) + MigrateSqlServerSqlDbDatabaseInput, + MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, + MigrateMySqlAzureDbForMySqlSyncDatabaseInput, + MigrateSqlServerSqlDbTaskInput, + MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, + MigrateMySqlAzureDbForMySqlSyncTaskInput) def get_migrate_sql_server_to_sqldb_input(database_options_json, source_connection_info, From f02c6470e913261e921f18a800fc43b2987365ec Mon Sep 17 00:00:00 2001 From: williexu Date: Tue, 19 Jun 2018 11:34:43 -0700 Subject: [PATCH 07/11] extend alotted time for script in travis --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d90668cb446..24242b0c630 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,11 +9,11 @@ jobs: include: - stage: verify env: PURPOSE='SourceStatic' - script: ./scripts/ci/test_static.sh + script: travis_wait ./scripts/ci/test_static.sh python: 2.7 - stage: verify env: PURPOSE='SourceStatic' - script: ./scripts/ci/test_static.sh + script: travis_wait ./scripts/ci/test_static.sh python: 3.6 - stage: verify env: PURPOSE='SourceTests' From 8a613d7340588dc76849224f6fe31e9f3b969eaf Mon Sep 17 00:00:00 2001 From: temandr Date: Tue, 19 Jun 2018 12:44:33 -0700 Subject: [PATCH 08/11] Fixed flake8 test results --- src/datamigration/azext_dms/__init__.py | 3 ++- src/datamigration/azext_dms/_client_factory.py | 3 +++ src/datamigration/azext_dms/_help.py | 2 +- src/datamigration/azext_dms/_params.py | 1 + src/datamigration/azext_dms/commands.py | 1 + src/datamigration/azext_dms/custom.py | 11 +++++++++-- src/datamigration/azext_dms/scenarios.py | 3 +++ 7 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/datamigration/azext_dms/__init__.py b/src/datamigration/azext_dms/__init__.py index 182d8afc963..89e9ef98420 100644 --- a/src/datamigration/azext_dms/__init__.py +++ b/src/datamigration/azext_dms/__init__.py @@ -5,7 +5,8 @@ from azure.cli.core import AzCommandsLoader -import azext_dms._help # pylint: disable=unused-import +import azext_dms._help # pylint: disable=unused-import + class DmsCommandsLoader(AzCommandsLoader): diff --git a/src/datamigration/azext_dms/_client_factory.py b/src/datamigration/azext_dms/_client_factory.py index 1fcb241c815..f823802e8b4 100644 --- a/src/datamigration/azext_dms/_client_factory.py +++ b/src/datamigration/azext_dms/_client_factory.py @@ -3,13 +3,16 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- + def dms_client_factory(cli_ctx, **_): from azure.cli.core.commands.client_factory import get_mgmt_service_client from azext_dms.vendored_sdks.datamigration import DataMigrationServiceClient return get_mgmt_service_client(cli_ctx, DataMigrationServiceClient) + def dms_cf_projects(cli_ctx, *_): return dms_client_factory(cli_ctx).projects + def dms_cf_tasks(cli_ctx, *_): return dms_client_factory(cli_ctx).tasks diff --git a/src/datamigration/azext_dms/_help.py b/src/datamigration/azext_dms/_help.py index 55f8524b106..8fed678b8e1 100644 --- a/src/datamigration/azext_dms/_help.py +++ b/src/datamigration/azext_dms/_help.py @@ -91,7 +91,7 @@ }, ...n ] - - name: For PostgreSQL and MySQL, the format of the database options JSON object. + - name: For PostgreSQL and MySQL, the format of the database options JSON object. text: > [ { diff --git a/src/datamigration/azext_dms/_params.py b/src/datamigration/azext_dms/_params.py index ffa85881155..7e70c3ed007 100644 --- a/src/datamigration/azext_dms/_params.py +++ b/src/datamigration/azext_dms/_params.py @@ -7,6 +7,7 @@ from azure.cli.core.commands.parameters import tags_type + def load_arguments(self, _): name_arg_type = CLIArgumentType(options_list=['--name', '-n'], metavar='NAME') diff --git a/src/datamigration/azext_dms/commands.py b/src/datamigration/azext_dms/commands.py index 46de06e3e7f..206b479b981 100644 --- a/src/datamigration/azext_dms/commands.py +++ b/src/datamigration/azext_dms/commands.py @@ -9,6 +9,7 @@ dms_cf_projects, dms_cf_tasks) + def load_command_table(self, _): dms_projects_sdk = CliCommandType( operations_tmpl='azext_dms.vendored_sdks.datamigration.operations.projects_operations#ProjectsOperations.{}', diff --git a/src/datamigration/azext_dms/custom.py b/src/datamigration/azext_dms/custom.py index 6d83c6c6f10..04430694e88 100644 --- a/src/datamigration/azext_dms/custom.py +++ b/src/datamigration/azext_dms/custom.py @@ -20,6 +20,7 @@ get_migrate_postgresql_to_azuredbforpostgresql_sync_input, get_migrate_mysql_to_azuredbformysql_sync_input) + # region Project def create_or_update_project( client, @@ -54,6 +55,7 @@ def create_or_update_project( project_name=project_name) # endregion + # region Task def create_task( client, @@ -110,6 +112,7 @@ def create_task( task_name=task_name, properties=task_properties) + def cutover_sync_task( client, resource_group_name, @@ -132,14 +135,16 @@ def cutover_sync_task( # endregion + # region Helper Methods def determine_scenario_eligibility(source_raw, target_raw): source_type = source_raw.lower() target_type = target_raw.lower() return (source_type == "sql" and target_type == "sqldb") or \ - (source_type == "postgresql" and target_type == "azuredbforpostgresql") or \ - (source_type == "mysql" and target_type == "azuredbformysql") + (source_type == "postgresql" and target_type == "azuredbforpostgresql") or \ + (source_type == "mysql" and target_type == "azuredbformysql") + # As of now, we dont expose Sql continuous migrations. # So we'll hard code the data movement type to simplify user interaction. @@ -154,6 +159,7 @@ def get_data_movement_type(source_type, target_type): return oneTime return cont + def create_connection(connection_info_json, prompt_prefix, typeOfInfo): typeOfInfo = typeOfInfo.lower() @@ -187,6 +193,7 @@ def create_connection(connection_info_json, prompt_prefix, typeOfInfo): trust_server_certificate=trust_server_certificate, additional_settings=additional_settings) + def get_task_migration_properties( database_options_json, source_raw, diff --git a/src/datamigration/azext_dms/scenarios.py b/src/datamigration/azext_dms/scenarios.py index f1e5c135d8d..0dc60aaee80 100644 --- a/src/datamigration/azext_dms/scenarios.py +++ b/src/datamigration/azext_dms/scenarios.py @@ -11,6 +11,7 @@ MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput, MigrateMySqlAzureDbForMySqlSyncTaskInput) + def get_migrate_sql_server_to_sqldb_input(database_options_json, source_connection_info, target_connection_info, @@ -35,6 +36,7 @@ def get_migrate_sql_server_to_sqldb_input(database_options_json, selected_databases=database_options, validation_options=validation_options) + def get_migrate_postgresql_to_azuredbforpostgresql_sync_input(database_options_json, source_connection_info, target_connection_info): @@ -51,6 +53,7 @@ def get_migrate_postgresql_to_azuredbforpostgresql_sync_input(database_options_j target_connection_info=target_connection_info, selected_databases=database_options) + def get_migrate_mysql_to_azuredbformysql_sync_input(database_options_json, source_connection_info, target_connection_info): From 715d5175de6ab55d5f27f5a9b0769f30c6d23953 Mon Sep 17 00:00:00 2001 From: temandr Date: Tue, 19 Jun 2018 13:02:47 -0700 Subject: [PATCH 09/11] Updated code owners --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e84af531884..d8476d2e0d8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -30,3 +30,4 @@ /src/dev-spaces-preview/ @saurabsa +/src/datamigration/ @temandr From 58b83ed1a77673b57ff7f207ff5cba4aefebc313 Mon Sep 17 00:00:00 2001 From: temandr Date: Tue, 19 Jun 2018 14:01:05 -0700 Subject: [PATCH 10/11] Added metadata --- src/datamigration/azext_dms/azext_metadata.json | 3 +++ src/datamigration/setup.py | 1 + 2 files changed, 4 insertions(+) create mode 100644 src/datamigration/azext_dms/azext_metadata.json diff --git a/src/datamigration/azext_dms/azext_metadata.json b/src/datamigration/azext_dms/azext_metadata.json new file mode 100644 index 00000000000..7441f421b63 --- /dev/null +++ b/src/datamigration/azext_dms/azext_metadata.json @@ -0,0 +1,3 @@ +{ + "azext.isPreview": true +} diff --git a/src/datamigration/setup.py b/src/datamigration/setup.py index 411da0df07a..d830233f50b 100644 --- a/src/datamigration/setup.py +++ b/src/datamigration/setup.py @@ -36,5 +36,6 @@ url='https://github.com/Azure/azure-cli-extensions', classifiers=CLASSIFIERS, packages = find_packages(exclude=["test"]), + package_data={'azext_bot': ['azext_metadata.json']}, install_requires=DEPENDENCIES ) From d4f73b7529447b7b897dc74ac7f66d4be58d1e22 Mon Sep 17 00:00:00 2001 From: temandr Date: Tue, 19 Jun 2018 14:28:01 -0700 Subject: [PATCH 11/11] Added license headers --- src/datamigration/azext_dms/vendored_sdks/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/datamigration/azext_dms/vendored_sdks/__init__.py b/src/datamigration/azext_dms/vendored_sdks/__init__.py index de40ea7ca05..a5b81f3bde4 100644 --- a/src/datamigration/azext_dms/vendored_sdks/__init__.py +++ b/src/datamigration/azext_dms/vendored_sdks/__init__.py @@ -1 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + __import__('pkg_resources').declare_namespace(__name__)