diff --git a/sdk/datamigration/azure-mgmt-datamigration/README.rst b/sdk/datamigration/azure-mgmt-datamigration/README.rst index 1bdbd770f51b..950750f2f897 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/README.rst +++ b/sdk/datamigration/azure-mgmt-datamigration/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Data Migration Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. +This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py index 6989ad3d3754..d91a847735ef 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/__init__.py @@ -49,6 +49,7 @@ from ._models_py3 import ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput + from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem from ._models_py3 import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties from ._models_py3 import ConnectToTargetSqlDbTaskInput from ._models_py3 import ConnectToTargetSqlDbTaskOutput @@ -82,6 +83,12 @@ from ._models_py3 import GetTdeCertificatesSqlTaskInput from ._models_py3 import GetTdeCertificatesSqlTaskOutput from ._models_py3 import GetTdeCertificatesSqlTaskProperties + from ._models_py3 import GetUserTablesOracleTaskInput + from ._models_py3 import GetUserTablesOracleTaskOutput + from ._models_py3 import GetUserTablesOracleTaskProperties + from ._models_py3 import GetUserTablesPostgreSqlTaskInput + from ._models_py3 import GetUserTablesPostgreSqlTaskOutput + from ._models_py3 import GetUserTablesPostgreSqlTaskProperties from ._models_py3 import GetUserTablesSqlSyncTaskInput from ._models_py3 import GetUserTablesSqlSyncTaskOutput from ._models_py3 import GetUserTablesSqlSyncTaskProperties @@ -295,6 +302,7 @@ from ._models import ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput + from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem from ._models import ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties from ._models import ConnectToTargetSqlDbTaskInput from ._models import ConnectToTargetSqlDbTaskOutput @@ -328,6 +336,12 @@ from ._models import GetTdeCertificatesSqlTaskInput from ._models import GetTdeCertificatesSqlTaskOutput from ._models import GetTdeCertificatesSqlTaskProperties + from ._models import GetUserTablesOracleTaskInput + from ._models import GetUserTablesOracleTaskOutput + from ._models import GetUserTablesOracleTaskProperties + from ._models import GetUserTablesPostgreSqlTaskInput + from ._models import GetUserTablesPostgreSqlTaskOutput + from ._models import GetUserTablesPostgreSqlTaskProperties from ._models import GetUserTablesSqlSyncTaskInput from ._models import GetUserTablesSqlSyncTaskOutput from ._models import GetUserTablesSqlSyncTaskProperties @@ -594,6 +608,7 @@ 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskInput', 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput', + 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem', 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTargetSqlDbTaskInput', 'ConnectToTargetSqlDbTaskOutput', @@ -627,6 +642,12 @@ 'GetTdeCertificatesSqlTaskInput', 'GetTdeCertificatesSqlTaskOutput', 'GetTdeCertificatesSqlTaskProperties', + 'GetUserTablesOracleTaskInput', + 'GetUserTablesOracleTaskOutput', + 'GetUserTablesOracleTaskProperties', + 'GetUserTablesPostgreSqlTaskInput', + 'GetUserTablesPostgreSqlTaskOutput', + 'GetUserTablesPostgreSqlTaskProperties', 'GetUserTablesSqlSyncTaskInput', 'GetUserTablesSqlSyncTaskOutput', 'GetUserTablesSqlSyncTaskProperties', diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models.py index add66ed8d652..363a8a070eed 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models.py @@ -333,6 +333,7 @@ class ProjectTaskProperties(Model): MigrateSqlServerSqlMITaskProperties, MigrateMongoDbTaskProperties, ConnectToTargetAzureDbForMySqlTaskProperties, ConnectToTargetSqlMISyncTaskProperties, ConnectToTargetSqlMITaskProperties, + GetUserTablesPostgreSqlTaskProperties, GetUserTablesOracleTaskProperties, GetUserTablesSqlSyncTaskProperties, GetUserTablesSqlTaskProperties, ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties, ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties, @@ -383,7 +384,7 @@ class ProjectTaskProperties(Model): } _subtype_map = { - 'task_type': {'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'Validate.Oracle.AzureDbPostgreSql.Sync': 'ValidateOracleAzureDbForPostgreSqlSyncTaskProperties', 'Validate.MongoDb': 'ValidateMongoDbTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS': 'ValidateMigrationInputSqlServerSqlMISyncTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', 'Migrate.Oracle.Sql.Sync': 'MigrateOracleAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI.Sync.LRS': 'MigrateSqlServerSqlMISyncTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'Migrate.MongoDb': 'MigrateMongoDbTaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureSqlDbMI.Sync.LRS': 'ConnectToTargetSqlMISyncTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync': 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.AzureDbForPostgreSql.Sync': 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlSqlDbSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.Oracle.Sync': 'ConnectToSourceOracleSyncTaskProperties', 'ConnectToSource.PostgreSql.Sync': 'ConnectToSourcePostgreSqlSyncTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'Connect.MongoDb': 'ConnectToMongoDbTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'MigrateSchemaSqlServerSqlDb': 'MigrateSchemaSqlServerSqlDbTaskProperties', 'Service.Check.OCI': 'CheckOCIDriverTaskProperties', 'Service.Upload.OCI': 'UploadOCIDriverTaskProperties', 'Service.Install.OCI': 'InstallOCIDriverTaskProperties'} + 'task_type': {'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'Validate.Oracle.AzureDbPostgreSql.Sync': 'ValidateOracleAzureDbForPostgreSqlSyncTaskProperties', 'Validate.MongoDb': 'ValidateMongoDbTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS': 'ValidateMigrationInputSqlServerSqlMISyncTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', 'Migrate.Oracle.Sql.Sync': 'MigrateOracleAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI.Sync.LRS': 'MigrateSqlServerSqlMISyncTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'Migrate.MongoDb': 'MigrateMongoDbTaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureSqlDbMI.Sync.LRS': 'ConnectToTargetSqlMISyncTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'GetUserTablesPostgreSql': 'GetUserTablesPostgreSqlTaskProperties', 'GetUserTablesOracle': 'GetUserTablesOracleTaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync': 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.AzureDbForPostgreSql.Sync': 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlSqlDbSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.Oracle.Sync': 'ConnectToSourceOracleSyncTaskProperties', 'ConnectToSource.PostgreSql.Sync': 'ConnectToSourcePostgreSqlSyncTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'Connect.MongoDb': 'ConnectToMongoDbTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'MigrateSchemaSqlServerSqlDb': 'MigrateSchemaSqlServerSqlDbTaskProperties', 'Service.Check.OCI': 'CheckOCIDriverTaskProperties', 'Service.Upload.OCI': 'UploadOCIDriverTaskProperties', 'Service.Install.OCI': 'InstallOCIDriverTaskProperties'} } def __init__(self, **kwargs): @@ -1744,6 +1745,9 @@ class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput(Model): :ivar validation_errors: Validation errors associated with the task :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + :param database_schema_map: Mapping of schemas per database + :type database_schema_map: + list[~azure.mgmt.datamigration.models.ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem] """ _validation = { @@ -1758,6 +1762,7 @@ class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput(Model): 'databases': {'key': 'databases', 'type': '[str]'}, 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + 'database_schema_map': {'key': 'databaseSchemaMap', 'type': '[ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem]'}, } def __init__(self, **kwargs): @@ -1766,6 +1771,27 @@ def __init__(self, **kwargs): self.databases = None self.target_server_brand_version = None self.validation_errors = None + self.database_schema_map = kwargs.get('database_schema_map', None) + + +class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem(Model): + """ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem. + + :param database: + :type database: str + :param schemas: + :type schemas: list[str] + """ + + _attribute_map = { + 'database': {'key': 'database', 'type': 'str'}, + 'schemas': {'key': 'schemas', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem, self).__init__(**kwargs) + self.database = kwargs.get('database', None) + self.schemas = kwargs.get('schemas', None) class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): @@ -3254,6 +3280,249 @@ def __init__(self, **kwargs): self.task_type = 'GetTDECertificates.Sql' +class GetUserTablesOracleTaskInput(Model): + """Input for the task that gets the list of tables contained within a provided + list of Oracle schemas. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Information for connecting to Oracle + source + :type connection_info: + ~azure.mgmt.datamigration.models.OracleConnectionInfo + :param selected_schemas: Required. List of Oracle schemas for which to + collect tables + :type selected_schemas: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_schemas': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'OracleConnectionInfo'}, + 'selected_schemas': {'key': 'selectedSchemas', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(GetUserTablesOracleTaskInput, self).__init__(**kwargs) + self.connection_info = kwargs.get('connection_info', None) + self.selected_schemas = kwargs.get('selected_schemas', None) + + +class GetUserTablesOracleTaskOutput(Model): + """Output for the task that gets the list of tables contained within a + provided list of Oracle schemas. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar schema_name: The schema this result is for + :vartype schema_name: str + :ivar tables: List of valid tables found for this schema + :vartype tables: list[~azure.mgmt.datamigration.models.DatabaseTable] + :ivar validation_errors: Validation errors associated with the task + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'schema_name': {'readonly': True}, + 'tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'tables': {'key': 'tables', 'type': '[DatabaseTable]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(GetUserTablesOracleTaskOutput, self).__init__(**kwargs) + self.schema_name = None + self.tables = None + self.validation_errors = None + + +class GetUserTablesOracleTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of + Oracle schemas. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data + information to task + :type client_data: dict[str, str] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: ~azure.mgmt.datamigration.models.GetUserTablesOracleTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.GetUserTablesOracleTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetUserTablesOracleTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesOracleTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(GetUserTablesOracleTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'GetUserTablesOracle' + + +class GetUserTablesPostgreSqlTaskInput(Model): + """Input for the task that gets the list of tables for a provided list of + PostgreSQL databases. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Information for connecting to PostgreSQL + source + :type connection_info: + ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param selected_databases: Required. List of PostgreSQL databases for + which to collect tables + :type selected_databases: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(GetUserTablesPostgreSqlTaskInput, self).__init__(**kwargs) + self.connection_info = kwargs.get('connection_info', None) + self.selected_databases = kwargs.get('selected_databases', None) + + +class GetUserTablesPostgreSqlTaskOutput(Model): + """Output for the task that gets the list of tables for a provided list of + PostgreSQL databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar database_name: The database this result is for + :vartype database_name: str + :ivar tables: List of valid tables found for this database + :vartype tables: list[~azure.mgmt.datamigration.models.DatabaseTable] + :ivar validation_errors: Validation errors associated with the task + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'database_name': {'readonly': True}, + 'tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'tables': {'key': 'tables', 'type': '[DatabaseTable]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs): + super(GetUserTablesPostgreSqlTaskOutput, self).__init__(**kwargs) + self.database_name = None + self.tables = None + self.validation_errors = None + + +class GetUserTablesPostgreSqlTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data + information to task + :type client_data: dict[str, str] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.GetUserTablesPostgreSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.GetUserTablesPostgreSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetUserTablesPostgreSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesPostgreSqlTaskOutput]'}, + } + + def __init__(self, **kwargs): + super(GetUserTablesPostgreSqlTaskProperties, self).__init__(**kwargs) + self.input = kwargs.get('input', None) + self.output = None + self.task_type = 'GetUserTablesPostgreSql' + + class GetUserTablesSqlSyncTaskInput(Model): """Input for the task that collects user tables for the given list of databases. diff --git a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models_py3.py b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models_py3.py index 2113f8e5b3f7..ff64cc07545c 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models_py3.py +++ b/sdk/datamigration/azure-mgmt-datamigration/azure/mgmt/datamigration/models/_models_py3.py @@ -333,6 +333,7 @@ class ProjectTaskProperties(Model): MigrateSqlServerSqlMITaskProperties, MigrateMongoDbTaskProperties, ConnectToTargetAzureDbForMySqlTaskProperties, ConnectToTargetSqlMISyncTaskProperties, ConnectToTargetSqlMITaskProperties, + GetUserTablesPostgreSqlTaskProperties, GetUserTablesOracleTaskProperties, GetUserTablesSqlSyncTaskProperties, GetUserTablesSqlTaskProperties, ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties, ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties, @@ -383,7 +384,7 @@ class ProjectTaskProperties(Model): } _subtype_map = { - 'task_type': {'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'Validate.Oracle.AzureDbPostgreSql.Sync': 'ValidateOracleAzureDbForPostgreSqlSyncTaskProperties', 'Validate.MongoDb': 'ValidateMongoDbTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS': 'ValidateMigrationInputSqlServerSqlMISyncTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', 'Migrate.Oracle.Sql.Sync': 'MigrateOracleAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI.Sync.LRS': 'MigrateSqlServerSqlMISyncTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'Migrate.MongoDb': 'MigrateMongoDbTaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureSqlDbMI.Sync.LRS': 'ConnectToTargetSqlMISyncTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync': 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.AzureDbForPostgreSql.Sync': 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlSqlDbSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.Oracle.Sync': 'ConnectToSourceOracleSyncTaskProperties', 'ConnectToSource.PostgreSql.Sync': 'ConnectToSourcePostgreSqlSyncTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'Connect.MongoDb': 'ConnectToMongoDbTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'MigrateSchemaSqlServerSqlDb': 'MigrateSchemaSqlServerSqlDbTaskProperties', 'Service.Check.OCI': 'CheckOCIDriverTaskProperties', 'Service.Upload.OCI': 'UploadOCIDriverTaskProperties', 'Service.Install.OCI': 'InstallOCIDriverTaskProperties'} + 'task_type': {'GetTDECertificates.Sql': 'GetTdeCertificatesSqlTaskProperties', 'Validate.Oracle.AzureDbPostgreSql.Sync': 'ValidateOracleAzureDbForPostgreSqlSyncTaskProperties', 'Validate.MongoDb': 'ValidateMongoDbTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS': 'ValidateMigrationInputSqlServerSqlMISyncTaskProperties', 'ValidateMigrationInput.SqlServer.AzureSqlDbMI': 'ValidateMigrationInputSqlServerSqlMITaskProperties', 'ValidateMigrationInput.SqlServer.SqlDb.Sync': 'ValidateMigrationInputSqlServerSqlDbSyncTaskProperties', 'Migrate.Oracle.Sql.Sync': 'MigrateOracleAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.PostgreSql.AzureDbForPostgreSql.Sync': 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties', 'Migrate.MySql.AzureDbForMySql.Sync': 'MigrateMySqlAzureDbForMySqlSyncTaskProperties', 'Migrate.SqlServer.AzureSqlDb.Sync': 'MigrateSqlServerSqlDbSyncTaskProperties', 'Migrate.SqlServer.SqlDb': 'MigrateSqlServerSqlDbTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI.Sync.LRS': 'MigrateSqlServerSqlMISyncTaskProperties', 'Migrate.SqlServer.AzureSqlDbMI': 'MigrateSqlServerSqlMITaskProperties', 'Migrate.MongoDb': 'MigrateMongoDbTaskProperties', 'ConnectToTarget.AzureDbForMySql': 'ConnectToTargetAzureDbForMySqlTaskProperties', 'ConnectToTarget.AzureSqlDbMI.Sync.LRS': 'ConnectToTargetSqlMISyncTaskProperties', 'ConnectToTarget.AzureSqlDbMI': 'ConnectToTargetSqlMITaskProperties', 'GetUserTablesPostgreSql': 'GetUserTablesPostgreSqlTaskProperties', 'GetUserTablesOracle': 'GetUserTablesOracleTaskProperties', 'GetUserTables.AzureSqlDb.Sync': 'GetUserTablesSqlSyncTaskProperties', 'GetUserTables.Sql': 'GetUserTablesSqlTaskProperties', 'ConnectToTarget.Oracle.AzureDbForPostgreSql.Sync': 'ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.AzureDbForPostgreSql.Sync': 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', 'ConnectToTarget.SqlDb.Sync': 'ConnectToTargetSqlSqlDbSyncTaskProperties', 'ConnectToTarget.SqlDb': 'ConnectToTargetSqlDbTaskProperties', 'ConnectToSource.Oracle.Sync': 'ConnectToSourceOracleSyncTaskProperties', 'ConnectToSource.PostgreSql.Sync': 'ConnectToSourcePostgreSqlSyncTaskProperties', 'ConnectToSource.SqlServer.Sync': 'ConnectToSourceSqlServerSyncTaskProperties', 'ConnectToSource.SqlServer': 'ConnectToSourceSqlServerTaskProperties', 'Connect.MongoDb': 'ConnectToMongoDbTaskProperties', 'ConnectToSource.MySql': 'ConnectToSourceMySqlTaskProperties', 'MigrateSchemaSqlServerSqlDb': 'MigrateSchemaSqlServerSqlDbTaskProperties', 'Service.Check.OCI': 'CheckOCIDriverTaskProperties', 'Service.Upload.OCI': 'UploadOCIDriverTaskProperties', 'Service.Install.OCI': 'InstallOCIDriverTaskProperties'} } def __init__(self, *, client_data=None, **kwargs) -> None: @@ -1744,6 +1745,9 @@ class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput(Model): :ivar validation_errors: Validation errors associated with the task :vartype validation_errors: list[~azure.mgmt.datamigration.models.ReportableException] + :param database_schema_map: Mapping of schemas per database + :type database_schema_map: + list[~azure.mgmt.datamigration.models.ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem] """ _validation = { @@ -1758,14 +1762,36 @@ class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput(Model): 'databases': {'key': 'databases', 'type': '[str]'}, 'target_server_brand_version': {'key': 'targetServerBrandVersion', 'type': 'str'}, 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + 'database_schema_map': {'key': 'databaseSchemaMap', 'type': '[ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem]'}, } - def __init__(self, **kwargs) -> None: + def __init__(self, *, database_schema_map=None, **kwargs) -> None: super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutput, self).__init__(**kwargs) self.target_server_version = None self.databases = None self.target_server_brand_version = None self.validation_errors = None + self.database_schema_map = database_schema_map + + +class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem(Model): + """ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem. + + :param database: + :type database: str + :param schemas: + :type schemas: list[str] + """ + + _attribute_map = { + 'database': {'key': 'database', 'type': 'str'}, + 'schemas': {'key': 'schemas', 'type': '[str]'}, + } + + def __init__(self, *, database: str=None, schemas=None, **kwargs) -> None: + super(ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskOutputDatabaseSchemaMapItem, self).__init__(**kwargs) + self.database = database + self.schemas = schemas class ConnectToTargetOracleAzureDbForPostgreSqlSyncTaskProperties(ProjectTaskProperties): @@ -3254,6 +3280,249 @@ def __init__(self, *, client_data=None, input=None, **kwargs) -> None: self.task_type = 'GetTDECertificates.Sql' +class GetUserTablesOracleTaskInput(Model): + """Input for the task that gets the list of tables contained within a provided + list of Oracle schemas. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Information for connecting to Oracle + source + :type connection_info: + ~azure.mgmt.datamigration.models.OracleConnectionInfo + :param selected_schemas: Required. List of Oracle schemas for which to + collect tables + :type selected_schemas: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_schemas': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'OracleConnectionInfo'}, + 'selected_schemas': {'key': 'selectedSchemas', 'type': '[str]'}, + } + + def __init__(self, *, connection_info, selected_schemas, **kwargs) -> None: + super(GetUserTablesOracleTaskInput, self).__init__(**kwargs) + self.connection_info = connection_info + self.selected_schemas = selected_schemas + + +class GetUserTablesOracleTaskOutput(Model): + """Output for the task that gets the list of tables contained within a + provided list of Oracle schemas. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar schema_name: The schema this result is for + :vartype schema_name: str + :ivar tables: List of valid tables found for this schema + :vartype tables: list[~azure.mgmt.datamigration.models.DatabaseTable] + :ivar validation_errors: Validation errors associated with the task + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'schema_name': {'readonly': True}, + 'tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'schema_name': {'key': 'schemaName', 'type': 'str'}, + 'tables': {'key': 'tables', 'type': '[DatabaseTable]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(GetUserTablesOracleTaskOutput, self).__init__(**kwargs) + self.schema_name = None + self.tables = None + self.validation_errors = None + + +class GetUserTablesOracleTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of + Oracle schemas. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data + information to task + :type client_data: dict[str, str] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: ~azure.mgmt.datamigration.models.GetUserTablesOracleTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.GetUserTablesOracleTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetUserTablesOracleTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesOracleTaskOutput]'}, + } + + def __init__(self, *, client_data=None, input=None, **kwargs) -> None: + super(GetUserTablesOracleTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.input = input + self.output = None + self.task_type = 'GetUserTablesOracle' + + +class GetUserTablesPostgreSqlTaskInput(Model): + """Input for the task that gets the list of tables for a provided list of + PostgreSQL databases. + + All required parameters must be populated in order to send to Azure. + + :param connection_info: Required. Information for connecting to PostgreSQL + source + :type connection_info: + ~azure.mgmt.datamigration.models.PostgreSqlConnectionInfo + :param selected_databases: Required. List of PostgreSQL databases for + which to collect tables + :type selected_databases: list[str] + """ + + _validation = { + 'connection_info': {'required': True}, + 'selected_databases': {'required': True}, + } + + _attribute_map = { + 'connection_info': {'key': 'connectionInfo', 'type': 'PostgreSqlConnectionInfo'}, + 'selected_databases': {'key': 'selectedDatabases', 'type': '[str]'}, + } + + def __init__(self, *, connection_info, selected_databases, **kwargs) -> None: + super(GetUserTablesPostgreSqlTaskInput, self).__init__(**kwargs) + self.connection_info = connection_info + self.selected_databases = selected_databases + + +class GetUserTablesPostgreSqlTaskOutput(Model): + """Output for the task that gets the list of tables for a provided list of + PostgreSQL databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar database_name: The database this result is for + :vartype database_name: str + :ivar tables: List of valid tables found for this database + :vartype tables: list[~azure.mgmt.datamigration.models.DatabaseTable] + :ivar validation_errors: Validation errors associated with the task + :vartype validation_errors: + list[~azure.mgmt.datamigration.models.ReportableException] + """ + + _validation = { + 'database_name': {'readonly': True}, + 'tables': {'readonly': True}, + 'validation_errors': {'readonly': True}, + } + + _attribute_map = { + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'tables': {'key': 'tables', 'type': '[DatabaseTable]'}, + 'validation_errors': {'key': 'validationErrors', 'type': '[ReportableException]'}, + } + + def __init__(self, **kwargs) -> None: + super(GetUserTablesPostgreSqlTaskOutput, self).__init__(**kwargs) + self.database_name = None + self.tables = None + self.validation_errors = None + + +class GetUserTablesPostgreSqlTaskProperties(ProjectTaskProperties): + """Properties for the task that collects user tables for the given list of + databases. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar errors: Array of errors. This is ignored if submitted. + :vartype errors: list[~azure.mgmt.datamigration.models.ODataError] + :ivar state: The state of the task. This is ignored if submitted. Possible + values include: 'Unknown', 'Queued', 'Running', 'Canceled', 'Succeeded', + 'Failed', 'FailedInputValidation', 'Faulted' + :vartype state: str or ~azure.mgmt.datamigration.models.TaskState + :ivar commands: Array of command properties. + :vartype commands: + list[~azure.mgmt.datamigration.models.CommandProperties] + :param client_data: Key value pairs of client data to attach meta data + information to task + :type client_data: dict[str, str] + :param task_type: Required. Constant filled by server. + :type task_type: str + :param input: Task input + :type input: + ~azure.mgmt.datamigration.models.GetUserTablesPostgreSqlTaskInput + :ivar output: Task output. This is ignored if submitted. + :vartype output: + list[~azure.mgmt.datamigration.models.GetUserTablesPostgreSqlTaskOutput] + """ + + _validation = { + 'errors': {'readonly': True}, + 'state': {'readonly': True}, + 'commands': {'readonly': True}, + 'task_type': {'required': True}, + 'output': {'readonly': True}, + } + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[ODataError]'}, + 'state': {'key': 'state', 'type': 'str'}, + 'commands': {'key': 'commands', 'type': '[CommandProperties]'}, + 'client_data': {'key': 'clientData', 'type': '{str}'}, + 'task_type': {'key': 'taskType', 'type': 'str'}, + 'input': {'key': 'input', 'type': 'GetUserTablesPostgreSqlTaskInput'}, + 'output': {'key': 'output', 'type': '[GetUserTablesPostgreSqlTaskOutput]'}, + } + + def __init__(self, *, client_data=None, input=None, **kwargs) -> None: + super(GetUserTablesPostgreSqlTaskProperties, self).__init__(client_data=client_data, **kwargs) + self.input = input + self.output = None + self.task_type = 'GetUserTablesPostgreSql' + + class GetUserTablesSqlSyncTaskInput(Model): """Input for the task that collects user tables for the given list of databases. diff --git a/sdk/datamigration/azure-mgmt-datamigration/setup.py b/sdk/datamigration/azure-mgmt-datamigration/setup.py index f9b01dd7bafd..e14880c3b373 100644 --- a/sdk/datamigration/azure-mgmt-datamigration/setup.py +++ b/sdk/datamigration/azure-mgmt-datamigration/setup.py @@ -64,7 +64,6 @@ 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7',