Added PG and leveraged core CLI for SQL migrations (#269)

* Added PG and leveraged core CLI for SQL migrations

* fixed pylint errors

* Updated texts to show properly

* fixed flake8 issues

* renamed scenarios to more appropriate scenario inputs

* added headers

* Updated _help with project types
This commit is contained in:
Artyom Pavlichenko 2018-08-23 13:11:25 -07:00 коммит произвёл GitHub
Родитель 20bdd50671
Коммит 3a2ca20677
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
58 изменённых файлов: 903 добавлений и 690 удалений

Просмотреть файл

@ -9,20 +9,21 @@ 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) MySQL -> AzureDbForMySql :: Continuous
The following project configurations are supported:
-) source -> target
1) SQL -> SQLDB
2) MySQL -> AzureDbForMySql
3) PostgreSQL -> AzureDbForPostgreSQL
parameters:
- name: --source-platform
type: string
short-summary: >
The type of server for the source database. The supported types are: SQL, MySQL.
The type of server for the source database. The supported types are: SQL, MySQL, PostgreSQL.
- name: --target-platform
type: string
short-summary: >
The type of service for the target database. The supported types are: SQLDB, AzureDbForMySql.
The type of service for the target database. The supported types are: SQLDB, AzureDbForMySql, AzureDbForPostgreSQL.
examples:
- name: Create a SQL Project for a DMS instance.
text: >
@ -32,15 +33,26 @@ helps['dms project create'] = """
helps['dms project task create'] = """
type: command
short-summary: Create and start a migration Task.
long-summary: |
The following task configurations are supported:
-) source -> target :: task type
1) SQL -> SQLDB :: OfflineMigration
2) MySQL -> AzureDbForMySql :: OnlineMigration
3) PostgreSQL -> AzureDbForPostgreSQL :: OnlineMigration
parameters:
- name: --task-type
type: string
short-summary: >
The type of data movement the task will support. The supported types are: OnlineMigration, OfflineMigration.
- name: --source-platform
type: string
short-summary: >
The type of server for the source database. The supported types are: SQL, MySQL.
The type of server for the source database. The supported types are: SQL, MySQL, PostgreSQL.
- name: --target-platform
type: string
short-summary: >
The type of server for the target database. The supported types are: SQLDB, AzureDbForMySql.
The type of server for the target database. The supported types are: SQLDB, AzureDbForMySql, AzureDbForPostgreSQL.
- name: --database-options-json
type: string
short-summary: >
@ -68,10 +80,10 @@ helps['dms project task create'] = """
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
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 --source-platform sql --target-platform sqldb --task-type offlinemigration
- 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
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 --source-platform sql --target-platform sqldb --task-type offlinemigration
- 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.
@ -90,7 +102,7 @@ helps['dms project task create'] = """
},
...n
]
- name: For MySQL, the format of the database options JSON object.
- name: For MySQL and PostgreSQL, the format of the database options JSON object.
text: >
[
{
@ -117,11 +129,20 @@ helps['dms project task create'] = """
"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 'postgres' database
"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.
short-summary: For an online migration task, complete the migration by performing a cutover.
long-summary: |
To see the result of the request, please use the 'task show' command:
az dms project task show ... --expand command

Просмотреть файл

@ -12,11 +12,16 @@ 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('service_name', options_list=['--service-name'],
help="The name of the Service. DMS Service is an Azure instance that performs database migrations.")
c.argument('project_name', name_arg_type,
help='The name of the Project. DMS Project is a logical grouping that encompasses \
source database connection, target database connection and a list of databases to migrate.')
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('service_name', options_list=['--service-name'])
c.argument('project_name', options_list=['--project-name'])
c.argument('task_name', name_arg_type, help='The name of the Task.')
c.argument('task_name', name_arg_type,
help='The name of the Task. DMS Task is the activity that performs a migration \
related task. There could be multiple Tasks associated to a Project. ')

Просмотреть файл

@ -4,18 +4,19 @@
# --------------------------------------------------------------------------------------------
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.vendored_sdks.datamigration.models import (Project,
SqlConnectionInfo,
MySqlConnectionInfo,
PostgreSqlConnectionInfo,
MigrateSyncCompleteCommandInput,
MigrateSqlServerSqlDbTaskProperties,
MigrateMySqlAzureDbForMySqlSyncTaskProperties,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties,
MigrateSyncCompleteCommandProperties)
from azext_dms.scenarios import (get_migrate_sql_server_to_sqldb_input,
get_migrate_mysql_to_azuredbformysql_sync_input)
from azext_dms.scenario_inputs import (get_migrate_mysql_to_azuredbformysql_sync_input,
get_migrate_postgresql_to_azuredbforpostgresql_sync_input)
from azure.cli.core.util import get_file_json, shell_safe_json_parse
from azure.cli.command_modules.dms.custom import (create_or_update_project as core_create_or_update_project,
create_task as core_create_task)
# region Project
@ -29,21 +30,40 @@ def create_or_update_project(
target_platform,
tags=None):
# Set inputs to lowercase
source_platform = source_platform.lower()
target_platform = target_platform.lower()
# 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) MySql -> AzureDbForMySql')
if not determine_source_target_eligibility(source_platform, target_platform):
# If not an extension scenario, run CLI core method
# TODO: We currently don't have any CLI core code to perform any validations
# because of this we need to raise the error here.
try:
# TODO: Remove this check after validations are added to core
if source_platform != "sql" or target_platform != "sqldb":
raise ValueError
# Get the data movement type
data_movement_type = get_data_movement_type(source_platform, target_platform)
core_res = core_create_or_update_project(
client,
project_name,
service_name,
resource_group_name,
location,
source_platform,
target_platform,
tags)
except:
raise ValueError("The provided source-platform, target-platform combination is not appropriate. \n\
Please refer to the help file 'az dms project create -h' for the supported scenarios.")
else:
return core_res
# Run extension scenario
parameters = Project(location=location,
source_platform=source_platform,
target_platform=target_platform,
tags=tags,
data_movement=data_movement_type)
tags=tags)
return client.create_or_update(parameters=parameters,
group_name=resource_group_name,
@ -61,6 +81,7 @@ def create_task(
task_name,
source_platform,
target_platform,
task_type,
source_connection_json,
target_connection_json,
database_options_json,
@ -68,38 +89,70 @@ def create_task(
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) MySql -> AzureDbForMySql')
# Set inputs to lowercase
task_type = task_type.lower()
source_platform = source_platform.lower()
target_platform = target_platform.lower()
# Validation: Test scenario eligibility
if not determine_scenario_eligibility(source_platform, target_platform, task_type):
# If not an extension scenario, run CLI core method
# TODO: We currently don't have any CLI core code to perform any validations
# because of this we need to raise the error here.
try:
# CLI core doesnt currently support task types - it only supports offline migrations.
# TODO: Remove this check after task types are supported
if source_platform != "sql" or target_platform != "sqldb" or task_type != "offlinemigration":
raise ValueError
core_res = core_create_task(
client,
resource_group_name,
service_name,
project_name,
task_name,
source_connection_json,
target_connection_json,
database_options_json,
enable_schema_validation,
enable_data_integrity_validation,
enable_query_analysis_validation)
except:
raise ValueError("The provided source-platform, target-platform, and task-type \
combination is not appropriate. \n\
Please refer to the help file 'az dms project task create -h' for the supported scenarios.")
else:
return core_res
# Run extension scenario
# Source connection info
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)
# Target connection info
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)
# Database options
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)
# Get the task properties
task_properties = get_task_migration_properties(database_options_json,
source_platform,
target_platform,
task_type,
source_connection_info,
target_connection_info,
enable_schema_validation,
enable_data_integrity_validation,
enable_query_analysis_validation)
target_connection_info)
return client.create_or_update(group_name=resource_group_name,
service_name=service_name,
@ -132,31 +185,22 @@ def cutover_sync_task(
# 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 == "mysql" and target_type == "azuredbformysql")
def determine_scenario_eligibility(
source_type,
target_type,
task_type):
return (source_type == "mysql" and target_type == "azuredbformysql" and task_type == "onlinemigration") or \
(source_type == "postgresql" and target_type == "azuredbforpostgresql" and task_type == "onlinemigration")
# 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 determine_source_target_eligibility(
source_type,
target_type):
return (source_type == "mysql" and target_type == "azuredbformysql") or \
(source_type == "postgresql" and target_type == "azuredbforpostgresql")
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)
@ -166,47 +210,35 @@ def create_connection(connection_info_json, prompt_prefix, typeOfInfo):
password=password,
server_name=server_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)
database_name = connection_info_json.get('databaseName', "postgres")
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)
def get_task_migration_properties(
database_options_json,
source_raw,
target_raw,
source_type,
target_type,
task_type,
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 == 'mysql' and target_type == 'azuredbformysql':
target_connection_info):
if source_type == 'mysql' and target_type == 'azuredbformysql' and task_type == "onlinemigration":
TaskProperties = MigrateMySqlAzureDbForMySqlSyncTaskProperties
task_input = get_migrate_mysql_to_azuredbformysql_sync_input(
database_options_json,
source_connection_info,
target_connection_info)
GetInput = get_migrate_mysql_to_azuredbformysql_sync_input
elif source_type == 'postgresql' and target_type == 'azuredbforpostgresql' and task_type == "onlinemigration":
TaskProperties = MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties
GetInput = get_migrate_postgresql_to_azuredbforpostgresql_sync_input
return TaskProperties(input=task_input)
task_input = GetInput(
database_options_json,
source_connection_info,
target_connection_info)
task_properties_params = {'input': task_input}
return TaskProperties(**task_properties_params)
# endregion

Просмотреть файл

@ -3,36 +3,10 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from azext_dms.vendored_sdks.datamigration.models import (MigrationValidationOptions,
MigrateSqlServerSqlDbDatabaseInput,
MigrateMySqlAzureDbForMySqlSyncDatabaseInput,
MigrateSqlServerSqlDbTaskInput,
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)
from azext_dms.vendored_sdks.datamigration.models import (MigrateMySqlAzureDbForMySqlSyncDatabaseInput,
MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput,
MigrateMySqlAzureDbForMySqlSyncTaskInput,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput)
def get_migrate_mysql_to_azuredbformysql_sync_input(database_options_json,
@ -48,3 +22,18 @@ def get_migrate_mysql_to_azuredbformysql_sync_input(database_options_json,
return MigrateMySqlAzureDbForMySqlSyncTaskInput(source_connection_info=source_connection_info,
target_connection_info=target_connection_info,
selected_databases=database_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)))
return MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput(source_connection_info=source_connection_info,
target_connection_info=target_connection_info,
selected_databases=database_options)

Просмотреть файл

@ -47,7 +47,7 @@ class DataMigrationServiceClientConfiguration(AzureConfiguration):
super(DataMigrationServiceClientConfiguration, self).__init__(base_url)
self.add_user_agent('datamigrationserviceclient/{}'.format(VERSION))
self.add_user_agent('azure-mgmt-datamigration/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')
self.credentials = credentials
@ -88,7 +88,6 @@ class DataMigrationServiceClient(object):
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 = '2018-07-15-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Просмотреть файл

@ -20,6 +20,7 @@ from .resource import Resource
from .get_tde_certificates_sql_task_output import GetTdeCertificatesSqlTaskOutput
from .selected_certificate_input import SelectedCertificateInput
from .file_share import FileShare
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
@ -36,6 +37,15 @@ from .migrate_sql_server_sql_db_sync_database_input import MigrateSqlServerSqlDb
from .validate_sync_migration_input_sql_server_task_input import ValidateSyncMigrationInputSqlServerTaskInput
from .validate_migration_input_sql_server_sql_db_sync_task_properties import ValidateMigrationInputSqlServerSqlDbSyncTaskProperties
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
@ -86,12 +96,6 @@ from .migrate_sql_server_sql_mi_task_output_migration_level import MigrateSqlSer
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 .my_sql_data_migration_project_metadata import MySqlDataMigrationProjectMetadata
from .get_project_details_my_sql_sql_task_output import GetProjectDetailsMySqlSqlTaskOutput
from .get_project_details_non_sql_task_input import GetProjectDetailsNonSqlTaskInput
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
@ -133,7 +137,6 @@ 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
@ -147,16 +150,16 @@ 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 .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 .database import Database
from .database_object_name import DatabaseObjectName
from .migration_table_metadata import MigrationTableMetadata
from .data_migration_project_metadata import DataMigrationProjectMetadata
from .get_project_details_non_sql_task_input import GetProjectDetailsNonSqlTaskInput
from .non_sql_data_migration_table import NonSqlDataMigrationTable
from .non_sql_migration_task_input import NonSqlMigrationTaskInput
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 .database import Database
from .database_object_name import DatabaseObjectName
from .database_file_input import DatabaseFileInput
from .migrate_sql_server_sql_server_database_input import MigrateSqlServerSqlServerDatabaseInput
from .resource_sku_paged import ResourceSkuPaged
@ -174,7 +177,6 @@ from .data_migration_service_client_enums import (
BackupMode,
SyncTableMigrationState,
SyncDatabaseMigrationReportingState,
SyncMigrationState,
ValidationStatus,
Severity,
UpdateActionType,
@ -193,15 +195,14 @@ from .data_migration_service_client_enums import (
ProjectTargetPlatform,
ProjectSourcePlatform,
ProjectProvisioningState,
DataMovement,
NameCheckFailureReason,
ServiceScalability,
ResourceSkuRestrictionsType,
ResourceSkuRestrictionsReasonCode,
ResourceSkuCapacityScaleType,
MySqlTargetPlatformType,
ErrorType,
DataMigrationResultCode,
ErrorType,
)
__all__ = [
@ -216,6 +217,7 @@ __all__ = [
'GetTdeCertificatesSqlTaskOutput',
'SelectedCertificateInput',
'FileShare',
'PostgreSqlConnectionInfo',
'MySqlConnectionInfo',
'ConnectionInfo',
'SqlConnectionInfo',
@ -232,6 +234,15 @@ __all__ = [
'ValidateSyncMigrationInputSqlServerTaskInput',
'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties',
'SyncMigrationDatabaseErrorEvent',
'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError',
'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError',
'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel',
'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel',
'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel',
'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput',
'MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput',
'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput',
'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties',
'MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError',
'MigrateMySqlAzureDbForMySqlSyncTaskOutputError',
'MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel',
@ -282,12 +293,6 @@ __all__ = [
'MigrateSqlServerSqlMITaskOutput',
'MigrateSqlServerSqlMITaskInput',
'MigrateSqlServerSqlMITaskProperties',
'MigrationTableMetadata',
'DataMigrationProjectMetadata',
'MySqlDataMigrationProjectMetadata',
'GetProjectDetailsMySqlSqlTaskOutput',
'GetProjectDetailsNonSqlTaskInput',
'GetProjectDetailsMySqlSqlTaskProperties',
'ConnectToTargetAzureDbForMySqlTaskOutput',
'ConnectToTargetAzureDbForMySqlTaskInput',
'ConnectToTargetAzureDbForMySqlTaskProperties',
@ -329,7 +334,6 @@ __all__ = [
'QuotaName',
'Quota',
'NameAvailabilityResponse',
'ProjectArtifactsResponse',
'AvailableServiceSkuSku',
'AvailableServiceSkuCapacity',
'AvailableServiceSku',
@ -343,16 +347,16 @@ __all__ = [
'ServerProperties',
'ConnectToSourceNonSqlTaskOutput',
'ConnectToSourceMySqlTaskProperties',
'MigrateMySqlSqlTaskInput',
'MigrateMySqlSqlTaskOutput',
'MigrateMySqlSqlTaskProperties',
'Database',
'DatabaseObjectName',
'MigrationTableMetadata',
'DataMigrationProjectMetadata',
'GetProjectDetailsNonSqlTaskInput',
'NonSqlDataMigrationTable',
'NonSqlMigrationTaskInput',
'DataMigrationError',
'NonSqlDataMigrationTableResult',
'NonSqlMigrationTaskOutput',
'NonSqlDataMigrationTable',
'NonSqlMigrationTaskInput',
'Database',
'DatabaseObjectName',
'DatabaseFileInput',
'MigrateSqlServerSqlServerDatabaseInput',
'ResourceSkuPaged',
@ -369,7 +373,6 @@ __all__ = [
'BackupMode',
'SyncTableMigrationState',
'SyncDatabaseMigrationReportingState',
'SyncMigrationState',
'ValidationStatus',
'Severity',
'UpdateActionType',
@ -388,13 +391,12 @@ __all__ = [
'ProjectTargetPlatform',
'ProjectSourcePlatform',
'ProjectProvisioningState',
'DataMovement',
'NameCheckFailureReason',
'ServiceScalability',
'ResourceSkuRestrictionsType',
'ResourceSkuRestrictionsReasonCode',
'ResourceSkuCapacityScaleType',
'MySqlTargetPlatformType',
'ErrorType',
'DataMigrationResultCode',
'ErrorType',
]

Просмотреть файл

@ -19,13 +19,12 @@ class ConnectToSourceMySqlTaskInput(Model):
:type source_connection_info:
~azure.mgmt.datamigration.models.MySqlConnectionInfo
:param target_platform: Target Platform for the migration. Possible values
include: 'SqlServer', 'AzureDbForMySQL'
include: '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', 'MigrationFromMySQLToSQL',
'MigrationFromMySQLToAzureDB', 'MigrationFromMySQLToAzureDBForMySQL'
'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL'
:type check_permissions_group: str or
~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup
"""

Просмотреть файл

@ -13,8 +13,8 @@ from .project_task_properties import ProjectTaskProperties
class ConnectToSourceSqlServerSyncTaskProperties(ProjectTaskProperties):
"""Properties for the task that validates connection to SQL Server and also
validates source server requirements.
"""Properties for the task that validates connection to SQL Server and source
server requirements for online migration.
Variables are only populated by the server, and will be ignored when
sending a request.

Просмотреть файл

@ -22,8 +22,7 @@ class ConnectToSourceSqlServerTaskInput(Model):
~azure.mgmt.datamigration.models.SqlConnectionInfo
:param check_permissions_group: Permission group for validations. Possible
values include: 'Default', 'MigrationFromSqlServerToAzureDB',
'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToSQL',
'MigrationFromMySQLToAzureDB', 'MigrationFromMySQLToAzureDBForMySQL'
'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL'
:type check_permissions_group: str or
~azure.mgmt.datamigration.models.ServerLevelPermissionsGroup
:param collect_logins: Flag for whether to collect logins from source

Просмотреть файл

@ -13,7 +13,7 @@ from .connect_to_source_sql_server_task_output import ConnectToSourceSqlServerTa
class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTaskOutput):
"""AgentJob level output for the task that validates connection to SQL Server
"""Agent Job level output for the task that validates connection to SQL Server
and also validates source server requirements.
Variables are only populated by the server, and will be ignored when
@ -23,15 +23,15 @@ class ConnectToSourceSqlServerTaskOutputAgentJobLevel(ConnectToSourceSqlServerTa
:vartype id: str
:param result_type: Constant filled by server.
:type result_type: str
:ivar name: AgentJob name
:ivar name: Agent Job name
:vartype name: str
:ivar job_category: The type of AgentJob.
:ivar job_category: The type of Agent Job.
:vartype job_category: str
:ivar is_enabled: The state of the original AgentJob.
:ivar is_enabled: The state of the original Agent Job.
:vartype is_enabled: bool
:ivar job_owner: The owner of the AgentJob
:ivar job_owner: The owner of the Agent Job
:vartype job_owner: str
:ivar last_executed_on: UTC Date and time when the AgentJob was last
:ivar last_executed_on: UTC Date and time when the Agent Job was last
executed.
:vartype last_executed_on: datetime
:ivar validation_errors: Validation errors

Просмотреть файл

@ -13,10 +13,10 @@ from msrest.serialization import Model
class ConnectToTargetSqlSqlDbSyncTaskInput(Model):
"""Input for the task that validates connection to SQL DB and target server
requirements.
"""Input for the task that validates connection to Azure SQL DB and target
server requirements.
:param source_connection_info: Connection information for Source SQL
:param source_connection_info: Connection information for source SQL
Server
:type source_connection_info:
~azure.mgmt.datamigration.models.SqlConnectionInfo

Просмотреть файл

@ -14,7 +14,7 @@ from .project_task_properties import ProjectTaskProperties
class ConnectToTargetSqlSqlDbSyncTaskProperties(ProjectTaskProperties):
"""Properties for the task that validates connection to SQL DB and target
server requirements for sync scenario.
server requirements for online migration.
Variables are only populated by the server, and will be ignored when
sending a request.

Просмотреть файл

@ -16,7 +16,8 @@ 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: MySqlConnectionInfo, SqlConnectionInfo
sub-classes are: PostgreSqlConnectionInfo, MySqlConnectionInfo,
SqlConnectionInfo
:param user_name: User name
:type user_name: str
@ -37,7 +38,7 @@ class ConnectionInfo(Model):
}
_subtype_map = {
'type': {'MySqlConnectionInfo': 'MySqlConnectionInfo', 'SqlConnectionInfo': 'SqlConnectionInfo'}
'type': {'PostgreSqlConnectionInfo': 'PostgreSqlConnectionInfo', 'MySqlConnectionInfo': 'MySqlConnectionInfo', 'SqlConnectionInfo': 'SqlConnectionInfo'}
}
def __init__(self, user_name=None, password=None):

Просмотреть файл

@ -13,7 +13,7 @@ from .tracked_resource import TrackedResource
class DataMigrationService(TrackedResource):
"""A Data Migration Service resource.
"""A Database Migration Service resource.
Variables are only populated by the server, and will be ignored when
sending a request.

Просмотреть файл

@ -77,16 +77,6 @@ class SyncDatabaseMigrationReportingState(Enum):
failed = "FAILED"
class SyncMigrationState(Enum):
undefined = "UNDEFINED"
validating = "VALIDATING"
pending = "PENDING"
complete = "COMPLETE"
action_required = "ACTION_REQUIRED"
failed = "FAILED"
class ValidationStatus(Enum):
default = "Default"
@ -219,8 +209,6 @@ class ServerLevelPermissionsGroup(Enum):
default = "Default"
migration_from_sql_server_to_azure_db = "MigrationFromSqlServerToAzureDB"
migration_from_sql_server_to_azure_mi = "MigrationFromSqlServerToAzureMI"
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"
@ -255,6 +243,7 @@ class ProjectTargetPlatform(Enum):
sqldb = "SQLDB"
sqlmi = "SQLMI"
azure_db_for_my_sql = "AzureDbForMySql"
azure_db_for_postgre_sql = "AzureDbForPostgreSql"
unknown = "Unknown"
@ -262,6 +251,7 @@ class ProjectSourcePlatform(Enum):
sql = "SQL"
my_sql = "MySQL"
postgre_sql = "PostgreSql"
unknown = "Unknown"
@ -271,12 +261,6 @@ class ProjectProvisioningState(Enum):
succeeded = "Succeeded"
class DataMovement(Enum):
one_time_migration = "OneTimeMigration"
continuous = "Continuous"
class NameCheckFailureReason(Enum):
already_exists = "AlreadyExists"
@ -310,17 +294,9 @@ class ResourceSkuCapacityScaleType(Enum):
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"
@ -329,3 +305,10 @@ class DataMigrationResultCode(Enum):
object_not_exists_in_target = "ObjectNotExistsInTarget"
target_object_is_inaccessible = "TargetObjectIsInaccessible"
fatal_error = "FatalError"
class ErrorType(Enum):
default = "Default"
warning = "Warning"
error = "Error"

Просмотреть файл

@ -1,42 +0,0 @@
# 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

Просмотреть файл

@ -19,7 +19,7 @@ class GetUserTablesSqlSyncTaskInput(Model):
:param source_connection_info: Connection information for SQL Server
:type source_connection_info:
~azure.mgmt.datamigration.models.SqlConnectionInfo
:param target_connection_info: Connection information for SQL Server
:param target_connection_info: Connection information for SQL DB
:type target_connection_info:
~azure.mgmt.datamigration.models.SqlConnectionInfo
:param selected_source_databases: List of source database names to collect

Просмотреть файл

@ -14,34 +14,34 @@ from msrest.serialization import Model
class MigrateMySqlAzureDbForMySqlSyncTaskInput(Model):
"""Input for the task that migrates MySQL databases to Azure Database for
MySQL with continuous sync.
MySQL for online migrations.
:param selected_databases: Databases to migrate
:type selected_databases:
list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncDatabaseInput]
:param source_connection_info: Connection information for source MySQL
:type source_connection_info:
~azure.mgmt.datamigration.models.MySqlConnectionInfo
: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
:param selected_databases: Databases to migrate
:type selected_databases:
list[~azure.mgmt.datamigration.models.MigrateMySqlAzureDbForMySqlSyncDatabaseInput]
"""
_validation = {
'selected_databases': {'required': True},
'target_connection_info': {'required': True},
'source_connection_info': {'required': True},
'target_connection_info': {'required': True},
'selected_databases': {'required': True},
}
_attribute_map = {
'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateMySqlAzureDbForMySqlSyncDatabaseInput]'},
'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'},
'source_connection_info': {'key': 'sourceConnectionInfo', 'type': 'MySqlConnectionInfo'},
'target_connection_info': {'key': 'targetConnectionInfo', 'type': 'MySqlConnectionInfo'},
'selected_databases': {'key': 'selectedDatabases', 'type': '[MigrateMySqlAzureDbForMySqlSyncDatabaseInput]'},
}
def __init__(self, selected_databases, target_connection_info, source_connection_info):
def __init__(self, source_connection_info, target_connection_info, selected_databases):
super(MigrateMySqlAzureDbForMySqlSyncTaskInput, self).__init__()
self.selected_databases = selected_databases
self.target_connection_info = target_connection_info
self.source_connection_info = source_connection_info
self.target_connection_info = target_connection_info
self.selected_databases = selected_databases

Просмотреть файл

@ -14,7 +14,7 @@ from msrest.serialization import Model
class MigrateMySqlAzureDbForMySqlSyncTaskOutput(Model):
"""Output for the task that migrates MySQL databases to Azure Database for
MySQL with continuous sync.
MySQL for online migrations.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: MigrateMySqlAzureDbForMySqlSyncTaskOutputDatabaseError,

Просмотреть файл

@ -26,10 +26,6 @@ class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel(MigrateMySqlAzureD
: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
@ -45,7 +41,6 @@ class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel(MigrateMySqlAzureD
'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},
@ -57,7 +52,6 @@ class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel(MigrateMySqlAzureD
'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'},
@ -68,7 +62,6 @@ class MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel(MigrateMySqlAzureD
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

Просмотреть файл

@ -32,7 +32,7 @@ class MigrateMySqlAzureDbForMySqlSyncTaskOutputTableLevel(MigrateMySqlAzureDbFor
: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
:ivar full_load_est_finish_time: Estimate to finish full load
:vartype full_load_est_finish_time: datetime
:ivar full_load_started_on: Full load start time
:vartype full_load_started_on: datetime

Просмотреть файл

@ -14,7 +14,7 @@ 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.
MySQL for online migrations.
Variables are only populated by the server, and will be ignored when
sending a request.

Просмотреть файл

@ -1,57 +0,0 @@
# 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

Просмотреть файл

@ -1,57 +0,0 @@
# 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__()

Просмотреть файл

@ -1,61 +0,0 @@
# 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 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]'},
'task_type': {'key': 'taskType', 'type': 'str'},
'input': {'key': 'input', 'type': 'MigrateMySqlSqlTaskInput'},
'output': {'key': 'output', 'type': '[MigrateMySqlSqlTaskOutput]'},
}
def __init__(self, input=None):
super(MigrateMySqlSqlTaskProperties, self).__init__()
self.input = input
self.output = None
self.task_type = 'Migrate.MySql.Sql'

Просмотреть файл

@ -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 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
"""
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'},
}
def __init__(self, name=None, target_database_name=None):
super(MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput, self).__init__()
self.name = name
self.target_database_name = target_database_name

Просмотреть файл

@ -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 for online migrations.
: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

Просмотреть файл

@ -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 for online migrations.
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

Просмотреть файл

@ -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):
"""MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError.
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'

Просмотреть файл

@ -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):
"""MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseLevel.
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'

Просмотреть файл

@ -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):
"""MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputError.
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'

Просмотреть файл

@ -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 .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput
class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput):
"""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
:ivar started_on: Migration start time
:vartype started_on: datetime
:ivar ended_on: Migration end time
:vartype ended_on: datetime
:ivar source_server_version: Source server version
:vartype source_server_version: str
:ivar source_server: Source server name
:vartype source_server: str
:ivar target_server_version: Target server version
:vartype target_server_version: str
:ivar target_server: Target server name
:vartype target_server: str
"""
_validation = {
'id': {'readonly': True},
'result_type': {'required': True},
'started_on': {'readonly': True},
'ended_on': {'readonly': True},
'source_server_version': {'readonly': True},
'source_server': {'readonly': True},
'target_server_version': {'readonly': True},
'target_server': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'result_type': {'key': 'resultType', 'type': 'str'},
'started_on': {'key': 'startedOn', 'type': 'iso-8601'},
'ended_on': {'key': 'endedOn', 'type': 'iso-8601'},
'source_server_version': {'key': 'sourceServerVersion', 'type': 'str'},
'source_server': {'key': 'sourceServer', 'type': 'str'},
'target_server_version': {'key': 'targetServerVersion', 'type': 'str'},
'target_server': {'key': 'targetServer', 'type': 'str'},
}
def __init__(self):
super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel, self).__init__()
self.started_on = None
self.ended_on = None
self.source_server_version = None
self.source_server = None
self.target_server_version = None
self.target_server = None
self.result_type = 'MigrationLevelOutput'

Просмотреть файл

@ -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.
# --------------------------------------------------------------------------
from .migrate_postgre_sql_azure_db_for_postgre_sql_sync_task_output import MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput
class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput):
"""MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputTableLevel.
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: long
:ivar cdc_update_counter: Number of applied updates
:vartype cdc_update_counter: long
:ivar cdc_delete_counter: Number of applied deletes
:vartype cdc_delete_counter: long
:ivar full_load_est_finish_time: Estimate to finish full load
:vartype full_load_est_finish_time: datetime
: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_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_rows': {'readonly': True},
'state': {'readonly': True},
'total_changes_applied': {'readonly': True},
'data_errors_counter': {'readonly': True},
'last_modified_time': {'readonly': True},
}
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'result_type': {'key': 'resultType', 'type': 'str'},
'table_name': {'key': 'tableName', 'type': 'str'},
'database_name': {'key': 'databaseName', 'type': 'str'},
'cdc_insert_counter': {'key': 'cdcInsertCounter', 'type': 'long'},
'cdc_update_counter': {'key': 'cdcUpdateCounter', 'type': 'long'},
'cdc_delete_counter': {'key': 'cdcDeleteCounter', 'type': 'long'},
'full_load_est_finish_time': {'key': 'fullLoadEstFinishTime', 'type': 'iso-8601'},
'full_load_started_on': {'key': 'fullLoadStartedOn', 'type': 'iso-8601'},
'full_load_ended_on': {'key': 'fullLoadEndedOn', 'type': 'iso-8601'},
'full_load_total_rows': {'key': 'fullLoadTotalRows', 'type': 'long'},
'state': {'key': 'state', 'type': 'str'},
'total_changes_applied': {'key': 'totalChangesApplied', 'type': 'long'},
'data_errors_counter': {'key': 'dataErrorsCounter', 'type': 'long'},
'last_modified_time': {'key': 'lastModifiedTime', 'type': 'iso-8601'},
}
def __init__(self):
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_rows = None
self.state = None
self.total_changes_applied = None
self.data_errors_counter = None
self.last_modified_time = None
self.result_type = 'TableLevelOutput'

Просмотреть файл

@ -12,9 +12,9 @@
from .project_task_properties import ProjectTaskProperties
class GetProjectDetailsMySqlSqlTaskProperties(ProjectTaskProperties):
"""Properties for task that reads information from project artifacts for MySQL
as source.
class MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties):
"""Properties for the task that migrates PostgreSQL databases to Azure
Database for PostgreSQL for online migrations.
Variables are only populated by the server, and will be ignored when
sending a request.
@ -32,10 +32,10 @@ class GetProjectDetailsMySqlSqlTaskProperties(ProjectTaskProperties):
:type task_type: str
:param input: Task input
:type input:
~azure.mgmt.datamigration.models.GetProjectDetailsNonSqlTaskInput
~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput
:ivar output: Task output. This is ignored if submitted.
:vartype output:
list[~azure.mgmt.datamigration.models.GetProjectDetailsMySqlSqlTaskOutput]
list[~azure.mgmt.datamigration.models.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput]
"""
_validation = {
@ -51,12 +51,12 @@ class GetProjectDetailsMySqlSqlTaskProperties(ProjectTaskProperties):
'state': {'key': 'state', 'type': 'str'},
'commands': {'key': 'commands', 'type': '[CommandProperties]'},
'task_type': {'key': 'taskType', 'type': 'str'},
'input': {'key': 'input', 'type': 'GetProjectDetailsNonSqlTaskInput'},
'output': {'key': 'output', 'type': '[GetProjectDetailsMySqlSqlTaskOutput]'},
'input': {'key': 'input', 'type': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskInput'},
'output': {'key': 'output', 'type': '[MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput]'},
}
def __init__(self, input=None):
super(GetProjectDetailsMySqlSqlTaskProperties, self).__init__()
super(MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties, self).__init__()
self.input = input
self.output = None
self.task_type = 'GetProjectDetails.MySql.Sql'
self.task_type = 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync'

Просмотреть файл

@ -16,6 +16,10 @@ class MigrateSqlServerSqlDbSyncDatabaseInput(Model):
"""Database specific information for SQL to Azure SQL DB sync migration task
inputs.
:param id: Unique identifier for database
:type id: str
:param name: Name of database
:type name: str
:param target_database_name: Target database name
:type target_database_name: str
:param schema_name: Schema name to be migrated
@ -31,30 +35,26 @@ class MigrateSqlServerSqlDbSyncDatabaseInput(Model):
:param target_setting: Target settings to tune target endpoint migration
behavior
:type target_setting: dict[str, str]
:param id: Unique identifier for database
:type id: str
:param name: Name of database
:type name: str
"""
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'target_database_name': {'key': 'targetDatabaseName', 'type': 'str'},
'schema_name': {'key': 'schemaName', 'type': 'str'},
'table_map': {'key': 'tableMap', 'type': '{str}'},
'migration_setting': {'key': 'migrationSetting', 'type': '{str}'},
'source_setting': {'key': 'sourceSetting', 'type': '{str}'},
'target_setting': {'key': 'targetSetting', 'type': '{str}'},
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
}
def __init__(self, target_database_name=None, schema_name=None, table_map=None, migration_setting=None, source_setting=None, target_setting=None, id=None, name=None):
def __init__(self, id=None, name=None, target_database_name=None, schema_name=None, table_map=None, migration_setting=None, source_setting=None, target_setting=None):
super(MigrateSqlServerSqlDbSyncDatabaseInput, self).__init__()
self.id = id
self.name = name
self.target_database_name = target_database_name
self.schema_name = schema_name
self.table_map = table_map
self.migration_setting = migration_setting
self.source_setting = source_setting
self.target_setting = target_setting
self.id = id
self.name = name

Просмотреть файл

@ -14,7 +14,7 @@ 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.
Database for online migrations.
:param source_connection_info: Information for connecting to source
:type source_connection_info:

Просмотреть файл

@ -14,7 +14,7 @@ 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.
Database for online migrations.
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: MigrateSqlServerSqlDbSyncTaskOutputDatabaseError,

Просмотреть файл

@ -26,10 +26,6 @@ class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel(MigrateSqlServerSqlDbSyn
: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
@ -47,7 +43,6 @@ class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel(MigrateSqlServerSqlDbSyn
'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},
@ -60,7 +55,6 @@ class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel(MigrateSqlServerSqlDbSyn
'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'},
@ -72,7 +66,6 @@ class MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel(MigrateSqlServerSqlDbSyn
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

Просмотреть файл

@ -32,7 +32,7 @@ class MigrateSqlServerSqlDbSyncTaskOutputTableLevel(MigrateSqlServerSqlDbSyncTas
:vartype cdc_update_counter: long
:ivar cdc_delete_counter: Number of applied deletes
:vartype cdc_delete_counter: long
:ivar full_load_est_finish_time: Estimate to finish FullLoad
:ivar full_load_est_finish_time: Estimate to finish full load
:vartype full_load_est_finish_time: datetime
:ivar full_load_started_on: Full load start time
:vartype full_load_started_on: datetime

Просмотреть файл

@ -14,7 +14,7 @@ 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.
SQL Database for online migrations.
Variables are only populated by the server, and will be ignored when
sending a request.

Просмотреть файл

@ -22,9 +22,9 @@ class MigrateSqlServerSqlMITaskOutputAgentJobLevel(MigrateSqlServerSqlMITaskOutp
:vartype id: str
:param result_type: Constant filled by server.
:type result_type: str
:ivar name: AgentJob name.
:ivar name: Agent Job name.
:vartype name: str
:ivar is_enabled: The state of the original AgentJob.
:ivar is_enabled: The state of the original Agent Job.
:vartype is_enabled: bool
:ivar state: Current state of migration. Possible values include: 'None',
'InProgress', 'Failed', 'Warning', 'Completed', 'Skipped', 'Stopped'

Просмотреть файл

@ -13,7 +13,7 @@ from .connection_info import ConnectionInfo
class MySqlConnectionInfo(ConnectionInfo):
"""Information for connecting to MySQL source.
"""Information for connecting to MySQL server.
:param user_name: User name
:type user_name: str

Просмотреть файл

@ -1,53 +0,0 @@
# 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__()

Просмотреть файл

@ -22,7 +22,7 @@ class NonSqlMigrationTaskInput(Model):
: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
:param project_location: A 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

Просмотреть файл

@ -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'

Просмотреть файл

@ -29,11 +29,12 @@ class Project(TrackedResource):
:param location: Resource location.
:type location: str
:param source_platform: Source platform for the project. Possible values
include: 'SQL', 'MySQL', 'Unknown'
include: 'SQL', 'MySQL', 'PostgreSql', 'Unknown'
:type source_platform: str or
~azure.mgmt.datamigration.models.ProjectSourcePlatform
:param target_platform: Target platform for the project. Possible values
include: 'SQLDB', 'SQLMI', 'AzureDbForMySql', 'Unknown'
include: 'SQLDB', 'SQLMI', 'AzureDbForMySql', 'AzureDbForPostgreSql',
'Unknown'
:type target_platform: str or
~azure.mgmt.datamigration.models.ProjectTargetPlatform
:ivar creation_time: UTC Date and time when project was created
@ -50,9 +51,6 @@ class Project(TrackedResource):
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 = {
@ -79,10 +77,9 @@ class Project(TrackedResource):
'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"):
def __init__(self, location, source_platform, target_platform, tags=None, source_connection_info=None, target_connection_info=None, databases_info=None):
super(Project, self).__init__(tags=tags, location=location)
self.source_platform = source_platform
self.target_platform = target_platform
@ -91,4 +88,3 @@ class Project(TrackedResource):
self.target_connection_info = target_connection_info
self.databases_info = databases_info
self.provisioning_state = None
self.data_movement = data_movement

Просмотреть файл

@ -1,33 +0,0 @@
# 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

Просмотреть файл

@ -20,17 +20,16 @@ class ProjectTaskProperties(Model):
sub-classes are: GetTdeCertificatesSqlTaskProperties,
ValidateMigrationInputSqlServerSqlMITaskProperties,
ValidateMigrationInputSqlServerSqlDbSyncTaskProperties,
MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties,
MigrateMySqlAzureDbForMySqlSyncTaskProperties,
MigrateSqlServerSqlDbSyncTaskProperties,
MigrateSqlServerSqlDbTaskProperties, MigrateSqlServerSqlMITaskProperties,
GetProjectDetailsMySqlSqlTaskProperties,
ConnectToTargetAzureDbForMySqlTaskProperties,
ConnectToTargetSqlMITaskProperties, GetUserTablesSqlSyncTaskProperties,
GetUserTablesSqlTaskProperties, ConnectToTargetSqlSqlDbSyncTaskProperties,
ConnectToTargetSqlDbTaskProperties,
ConnectToSourceSqlServerSyncTaskProperties,
ConnectToSourceSqlServerTaskProperties, ConnectToSourceMySqlTaskProperties,
MigrateMySqlSqlTaskProperties
ConnectToSourceSqlServerTaskProperties, ConnectToSourceMySqlTaskProperties
Variables are only populated by the server, and will be ignored when
sending a request.
@ -63,7 +62,7 @@ class ProjectTaskProperties(Model):
}
_subtype_map = {
'task_type': {'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'GetProjectDetails.MySql.Sql': 'GetProjectDetailsMySqlSqlTaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlSqlDbSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'Migrate.MySql.Sql': 'MigrateMySqlSqlTaskProperties'}
'task_type': {'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlSqlDbSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties'}
}
def __init__(self):

Просмотреть файл

@ -13,7 +13,7 @@ from msrest.serialization import Model
class ServiceOperation(Model):
"""Description of an action supported by the Data Migration Service.
"""Description of an action supported by the Database Migration Service.
:param name: The fully qualified action name, e.g.
Microsoft.DataMigration/services/read

Просмотреть файл

@ -13,7 +13,7 @@ from msrest.serialization import Model
class StartMigrationScenarioServerRoleResult(Model):
"""StartMigrationScenarioServerRoleResult.
"""Server role migration result.
Variables are only populated by the server, and will be ignored when
sending a request.

Просмотреть файл

@ -22,7 +22,7 @@ class SyncMigrationDatabaseErrorEvent(Model):
:vartype timestamp_string: str
:ivar event_type_string: Event type.
:vartype event_type_string: str
:ivar event_text: Error text.
:ivar event_text: Event text.
:vartype event_text: str
"""

Просмотреть файл

@ -40,7 +40,7 @@ class Operations(object):
self, custom_headers=None, raw=False, **operation_config):
"""Get available resource provider actions (operations).
Lists all available actions exposed by the Data Migration Service
Lists all available actions exposed by the Database Migration Service
resource provider.
:param dict custom_headers: headers that will be added to the request

Просмотреть файл

@ -390,73 +390,3 @@ class ProjectsOperations(object):
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<msrest:optionsforoperations>`.
:return: ProjectArtifactsResponse or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.datamigration.models.ProjectArtifactsResponse or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`ApiErrorException<azure.mgmt.datamigration.models.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'}

Просмотреть файл

@ -93,15 +93,16 @@ class ServicesOperations(object):
"""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.
Database Migration Service. The PUT method creates a new service or
updates an existing one. When a service is updated, existing child
resources (i.e. tasks) are unaffected. Services currently support a
single kind, "vm", which refers to a VM-based service, although other
kinds may be added in the future. This method can change the kind, SKU,
and network of the service, but if tasks are currently running (i.e.
the service is busy), this will fail with 400 Bad Request
("ServiceIsBusy"). The provider will reply when successful with 200 OK
or 201 Created. Long-running operations use the provisioningState
property.
:param parameters: Information about the service
:type parameters:
@ -172,8 +173,8 @@ class ServicesOperations(object):
"""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.
Database Migration Service. The GET method retrieves information about
a service instance.
:param group_name: Name of the resource group
:type group_name: str
@ -276,7 +277,7 @@ class ServicesOperations(object):
"""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
Database Migration Service. The DELETE method deletes a service. Any
running tasks will be canceled.
:param group_name: Name of the resource group
@ -391,10 +392,10 @@ class ServicesOperations(object):
"""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").
Database Migration Service. The PATCH method updates an existing
service. This method can change the kind, SKU, and network of the
service, but if tasks are currently running (i.e. the service is busy),
this will fail with 400 Bad Request ("ServiceIsBusy").
:param parameters: Information about the service
:type parameters:
@ -465,8 +466,8 @@ class ServicesOperations(object):
"""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.
Database Migration Service. This action performs a health check and
returns the status of the service and virtual machine size.
:param group_name: Name of the resource group
:type group_name: str
@ -569,8 +570,8 @@ class ServicesOperations(object):
"""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.
Database Migration Service. This action starts the service and the
service can be used for data migration.
:param group_name: Name of the resource group
:type group_name: str
@ -669,9 +670,9 @@ class ServicesOperations(object):
"""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.
Database Migration Service. This action stops the service and the
service cannot be used for data migration. The service owner won't be
billed when the service is stopped.
:param group_name: Name of the resource group
:type group_name: str
@ -733,8 +734,8 @@ class ServicesOperations(object):
"""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.
Database Migration Service. The skus action returns the list of SKUs
that a service resource can be updated to.
:param group_name: Name of the resource group
:type group_name: str
@ -881,8 +882,8 @@ class ServicesOperations(object):
"""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.
Database Migration Service. This method returns a list of service
resources in a resource group.
:param group_name: Name of the resource group
:type group_name: str
@ -952,8 +953,8 @@ class ServicesOperations(object):
"""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.
Database 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

Просмотреть файл

@ -41,8 +41,8 @@ class TasksOperations(object):
"""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
Database Migration Service. This method returns a list of tasks owned
by a service resource. Some tasks may have a status of Unknown, which
indicates that an error occurred while querying the status of that
task.

Просмотреть файл

@ -41,7 +41,7 @@ class UsagesOperations(object):
"""Get resource quotas and usage information.
This method returns region-specific quotas and resource usage
information for the Data Migration Service.
information for the Database Migration Service.
:param location: The Azure region of the operation
:type location: str

Просмотреть файл

@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------
VERSION = "2018-07-15-preview"
VERSION = "0.1.0"

Просмотреть файл

@ -8,7 +8,7 @@
from codecs import open
from setuptools import setup, find_packages
VERSION = "0.2.0"
VERSION = "0.3.0"
CLASSIFIERS = [
'Development Status :: 4 - Beta',