diff --git a/lib/services/datamigrationManagement/lib/models/azureActiveDirectoryApp.js b/lib/services/datamigrationManagement/lib/models/azureActiveDirectoryApp.js new file mode 100644 index 0000000000..5c61b096ab --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/azureActiveDirectoryApp.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Azure Active Directory Application + * + */ +class AzureActiveDirectoryApp { + /** + * Create a AzureActiveDirectoryApp. + * @property {string} applicationId Application ID of the Azure Active + * Directory Application + * @property {string} appKey Key used to authenticate to the Azure Active + * Directory Application + * @property {string} tenantId Tenant id of the customer + */ + constructor() { + } + + /** + * Defines the metadata of AzureActiveDirectoryApp + * + * @returns {object} metadata of AzureActiveDirectoryApp + * + */ + mapper() { + return { + required: false, + serializedName: 'AzureActiveDirectoryApp', + type: { + name: 'Composite', + className: 'AzureActiveDirectoryApp', + modelProperties: { + applicationId: { + required: true, + serializedName: 'applicationId', + type: { + name: 'String' + } + }, + appKey: { + required: true, + serializedName: 'appKey', + type: { + name: 'String' + } + }, + tenantId: { + required: true, + serializedName: 'tenantId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = AzureActiveDirectoryApp; diff --git a/lib/services/datamigrationManagement/lib/models/backupFileInfo.js b/lib/services/datamigrationManagement/lib/models/backupFileInfo.js new file mode 100644 index 0000000000..735b6994e3 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/backupFileInfo.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Information of the backup file + * + */ +class BackupFileInfo { + /** + * Create a BackupFileInfo. + * @property {string} [fileLocation] Location of the backup file in shared + * folder + * @property {number} [familySequenceNumber] Sequence number of the backup + * file in the backup set + * @property {string} [status] Status of the backup file during migration. + * Possible values include: 'Arrived', 'Queued', 'Uploading', 'Uploaded', + * 'Restoring', 'Restored', 'Cancelled' + */ + constructor() { + } + + /** + * Defines the metadata of BackupFileInfo + * + * @returns {object} metadata of BackupFileInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupFileInfo', + type: { + name: 'Composite', + className: 'BackupFileInfo', + modelProperties: { + fileLocation: { + required: false, + serializedName: 'fileLocation', + type: { + name: 'String' + } + }, + familySequenceNumber: { + required: false, + serializedName: 'familySequenceNumber', + type: { + name: 'Number' + } + }, + status: { + required: false, + serializedName: 'status', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = BackupFileInfo; diff --git a/lib/services/datamigrationManagement/lib/models/backupSetInfo.js b/lib/services/datamigrationManagement/lib/models/backupSetInfo.js new file mode 100644 index 0000000000..05915447aa --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/backupSetInfo.js @@ -0,0 +1,140 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Information of backup set + * + */ +class BackupSetInfo { + /** + * Create a BackupSetInfo. + * @property {string} [backupSetId] Id for the set of backup files + * @property {string} [firstLsn] First log sequence number of the backup file + * @property {string} [lastLsn] Last log sequence number of the backup file + * @property {date} [lastModifiedTime] Last modified time of the backup file + * in share location + * @property {string} [backupType] Enum of the different backup types. + * Possible values include: 'Database', 'TransactionLog', 'File', + * 'DifferentialDatabase', 'DifferentialFile', 'Partial', + * 'DifferentialPartial' + * @property {array} [listOfBackupFiles] List of files in the backup set + * @property {string} [databaseName] Name of the database to which the backup + * set belongs + * @property {date} [backupStartDate] Date and time that the backup operation + * began + * @property {date} [backupFinishedDate] Date and time that the backup + * operation finished + * @property {boolean} [isBackupRestored] Whether the backup set is restored + * or not + */ + constructor() { + } + + /** + * Defines the metadata of BackupSetInfo + * + * @returns {object} metadata of BackupSetInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'BackupSetInfo', + type: { + name: 'Composite', + className: 'BackupSetInfo', + modelProperties: { + backupSetId: { + required: false, + serializedName: 'backupSetId', + type: { + name: 'String' + } + }, + firstLsn: { + required: false, + serializedName: 'firstLsn', + type: { + name: 'String' + } + }, + lastLsn: { + required: false, + serializedName: 'lastLsn', + type: { + name: 'String' + } + }, + lastModifiedTime: { + required: false, + serializedName: 'lastModifiedTime', + type: { + name: 'DateTime' + } + }, + backupType: { + required: false, + serializedName: 'backupType', + type: { + name: 'String' + } + }, + listOfBackupFiles: { + required: false, + serializedName: 'listOfBackupFiles', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'BackupFileInfoElementType', + type: { + name: 'Composite', + className: 'BackupFileInfo' + } + } + } + }, + databaseName: { + required: false, + serializedName: 'databaseName', + type: { + name: 'String' + } + }, + backupStartDate: { + required: false, + serializedName: 'backupStartDate', + type: { + name: 'DateTime' + } + }, + backupFinishedDate: { + required: false, + serializedName: 'backupFinishedDate', + type: { + name: 'DateTime' + } + }, + isBackupRestored: { + required: false, + serializedName: 'isBackupRestored', + type: { + name: 'Boolean' + } + } + } + } + }; + } +} + +module.exports = BackupSetInfo; diff --git a/lib/services/datamigrationManagement/lib/models/connectToSourceMySqlTaskInput.js b/lib/services/datamigrationManagement/lib/models/connectToSourceMySqlTaskInput.js index 92abaf34b6..902649ffed 100644 --- a/lib/services/datamigrationManagement/lib/models/connectToSourceMySqlTaskInput.js +++ b/lib/services/datamigrationManagement/lib/models/connectToSourceMySqlTaskInput.js @@ -22,7 +22,7 @@ class ConnectToSourceMySqlTaskInput { * @property {string} [sourceConnectionInfo.serverName] Name of the server * @property {number} [sourceConnectionInfo.port] Port for Server * @property {string} [targetPlatform] Target Platform for the migration. - * Possible values include: 'AzureDbForMySQL' + * Possible values include: 'SqlServer', 'AzureDbForMySQL' * @property {string} [checkPermissionsGroup] Permission group for * validations. Possible values include: 'Default', * 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', @@ -69,7 +69,8 @@ class ConnectToSourceMySqlTaskInput { required: false, serializedName: 'checkPermissionsGroup', type: { - name: 'String' + name: 'Enum', + allowedValues: [ 'Default', 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' ] } } } diff --git a/lib/services/datamigrationManagement/lib/models/connectToSourceMySqlTaskProperties.js b/lib/services/datamigrationManagement/lib/models/connectToSourceMySqlTaskProperties.js index 89ef3d2b86..9c6f895dab 100644 --- a/lib/services/datamigrationManagement/lib/models/connectToSourceMySqlTaskProperties.js +++ b/lib/services/datamigrationManagement/lib/models/connectToSourceMySqlTaskProperties.js @@ -27,7 +27,7 @@ class ConnectToSourceMySqlTaskProperties extends models['ProjectTaskProperties'] * server * @property {number} [input.sourceConnectionInfo.port] Port for Server * @property {string} [input.targetPlatform] Target Platform for the - * migration. Possible values include: 'AzureDbForMySQL' + * migration. Possible values include: 'SqlServer', 'AzureDbForMySQL' * @property {string} [input.checkPermissionsGroup] Permission group for * validations. Possible values include: 'Default', * 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', diff --git a/lib/services/datamigrationManagement/lib/models/connectToSourcePostgreSqlSyncTaskInput.js b/lib/services/datamigrationManagement/lib/models/connectToSourcePostgreSqlSyncTaskInput.js new file mode 100644 index 0000000000..ca2828a31e --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/connectToSourcePostgreSqlSyncTaskInput.js @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Input for the task that validates connection to PostgreSQL and source server + * requirements + * + */ +class ConnectToSourcePostgreSqlSyncTaskInput { + /** + * Create a ConnectToSourcePostgreSqlSyncTaskInput. + * @property {object} sourceConnectionInfo Connection information for source + * PostgreSQL server + * @property {string} [sourceConnectionInfo.serverName] Name of the server + * @property {string} [sourceConnectionInfo.databaseName] Name of the + * database + * @property {number} [sourceConnectionInfo.port] Port for Server + */ + constructor() { + } + + /** + * Defines the metadata of ConnectToSourcePostgreSqlSyncTaskInput + * + * @returns {object} metadata of ConnectToSourcePostgreSqlSyncTaskInput + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectToSourcePostgreSqlSyncTaskInput', + type: { + name: 'Composite', + className: 'ConnectToSourcePostgreSqlSyncTaskInput', + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: 'sourceConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'PostgreSqlConnectionInfo' + } + } + } + } + }; + } +} + +module.exports = ConnectToSourcePostgreSqlSyncTaskInput; diff --git a/lib/services/datamigrationManagement/lib/models/connectToSourcePostgreSqlSyncTaskOutput.js b/lib/services/datamigrationManagement/lib/models/connectToSourcePostgreSqlSyncTaskOutput.js new file mode 100644 index 0000000000..154b20dbed --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/connectToSourcePostgreSqlSyncTaskOutput.js @@ -0,0 +1,106 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Output for the task that validates connection to PostgreSQL and source + * server requirements + * + */ +class ConnectToSourcePostgreSqlSyncTaskOutput { + /** + * Create a ConnectToSourcePostgreSqlSyncTaskOutput. + * @property {string} [id] Result identifier + * @property {string} [sourceServerVersion] Version of the source server + * @property {array} [databases] List of databases on source server + * @property {string} [sourceServerBrandVersion] Source server brand version + * @property {array} [validationErrors] Validation errors associated with the + * task + */ + constructor() { + } + + /** + * Defines the metadata of ConnectToSourcePostgreSqlSyncTaskOutput + * + * @returns {object} metadata of ConnectToSourcePostgreSqlSyncTaskOutput + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectToSourcePostgreSqlSyncTaskOutput', + type: { + name: 'Composite', + className: 'ConnectToSourcePostgreSqlSyncTaskOutput', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + sourceServerVersion: { + required: false, + readOnly: true, + serializedName: 'sourceServerVersion', + type: { + name: 'String' + } + }, + databases: { + required: false, + readOnly: true, + serializedName: 'databases', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sourceServerBrandVersion: { + required: false, + readOnly: true, + serializedName: 'sourceServerBrandVersion', + type: { + name: 'String' + } + }, + validationErrors: { + required: false, + readOnly: true, + serializedName: 'validationErrors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ReportableExceptionElementType', + type: { + name: 'Composite', + className: 'ReportableException' + } + } + } + } + } + } + }; + } +} + +module.exports = ConnectToSourcePostgreSqlSyncTaskOutput; diff --git a/lib/services/datamigrationManagement/lib/models/connectToSourcePostgreSqlSyncTaskProperties.js b/lib/services/datamigrationManagement/lib/models/connectToSourcePostgreSqlSyncTaskProperties.js new file mode 100644 index 0000000000..0dff4e9e3e --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/connectToSourcePostgreSqlSyncTaskProperties.js @@ -0,0 +1,154 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Properties for the task that validates connection to PostgreSQL server and + * source server requirements for online migration + * + * @extends models['ProjectTaskProperties'] + */ +class ConnectToSourcePostgreSqlSyncTaskProperties extends models['ProjectTaskProperties'] { + /** + * Create a ConnectToSourcePostgreSqlSyncTaskProperties. + * @property {object} [input] Task input + * @property {object} [input.sourceConnectionInfo] Connection information for + * source PostgreSQL server + * @property {string} [input.sourceConnectionInfo.serverName] Name of the + * server + * @property {string} [input.sourceConnectionInfo.databaseName] Name of the + * database + * @property {number} [input.sourceConnectionInfo.port] Port for Server + * @property {array} [output] Task output. This is ignored if submitted. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ConnectToSourcePostgreSqlSyncTaskProperties + * + * @returns {object} metadata of ConnectToSourcePostgreSqlSyncTaskProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectToSource.PostgreSql.Sync', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'taskType', + clientName: 'taskType' + }, + uberParent: 'ProjectTaskProperties', + className: 'ConnectToSourcePostgreSqlSyncTaskProperties', + modelProperties: { + errors: { + required: false, + readOnly: true, + serializedName: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ODataErrorElementType', + type: { + name: 'Composite', + className: 'ODataError' + } + } + } + }, + state: { + required: false, + readOnly: true, + serializedName: 'state', + type: { + name: 'String' + } + }, + commands: { + required: false, + readOnly: true, + serializedName: 'commands', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CommandPropertiesElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'commandType', + clientName: 'commandType' + }, + uberParent: 'CommandProperties', + className: 'CommandProperties' + } + } + } + }, + clientData: { + required: false, + serializedName: 'clientData', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + taskType: { + required: true, + serializedName: 'taskType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + input: { + required: false, + serializedName: 'input', + type: { + name: 'Composite', + className: 'ConnectToSourcePostgreSqlSyncTaskInput' + } + }, + output: { + required: false, + readOnly: true, + serializedName: 'output', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ConnectToSourcePostgreSqlSyncTaskOutputElementType', + type: { + name: 'Composite', + className: 'ConnectToSourcePostgreSqlSyncTaskOutput' + } + } + } + } + } + } + }; + } +} + +module.exports = ConnectToSourcePostgreSqlSyncTaskProperties; diff --git a/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskInput.js b/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskInput.js index 9f40dca22e..a66758debd 100644 --- a/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskInput.js +++ b/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskInput.js @@ -79,7 +79,8 @@ class ConnectToSourceSqlServerTaskInput { required: false, serializedName: 'checkPermissionsGroup', type: { - name: 'String' + name: 'Enum', + allowedValues: [ 'Default', 'MigrationFromSqlServerToAzureDB', 'MigrationFromSqlServerToAzureMI', 'MigrationFromMySQLToAzureDBForMySQL' ] } }, collectLogins: { diff --git a/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskOutputAgentJobLevel.js b/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskOutputAgentJobLevel.js index 6c24564604..2a1c3d5ba8 100644 --- a/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskOutputAgentJobLevel.js +++ b/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskOutputAgentJobLevel.js @@ -28,7 +28,7 @@ class ConnectToSourceSqlServerTaskOutputAgentJobLevel extends models['ConnectToS * @property {date} [lastExecutedOn] UTC Date and time when the Agent Job was * last executed. * @property {array} [validationErrors] Validation errors - * @property {object} [migrationEligibility] Information about eligiblity of + * @property {object} [migrationEligibility] Information about eligibility of * agent job for migration. * @property {boolean} [migrationEligibility.isEligibileForMigration] Whether * object is eligible for migration or not. diff --git a/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskOutputLoginLevel.js b/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskOutputLoginLevel.js index 9d792c6c5e..e5052fdf26 100644 --- a/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskOutputLoginLevel.js +++ b/lib/services/datamigrationManagement/lib/models/connectToSourceSqlServerTaskOutputLoginLevel.js @@ -27,7 +27,7 @@ class ConnectToSourceSqlServerTaskOutputLoginLevel extends models['ConnectToSour * 'ExternalUser', 'ExternalGroup' * @property {string} [defaultDatabase] The default database for the login. * @property {boolean} [isEnabled] The state of the login. - * @property {object} [migrationEligibility] Information about eligiblity of + * @property {object} [migrationEligibility] Information about eligibility of * login for migration. * @property {boolean} [migrationEligibility.isEligibileForMigration] Whether * object is eligible for migration or not. diff --git a/lib/services/datamigrationManagement/lib/models/connectToTargetAzureDbForPostgreSqlSyncTaskInput.js b/lib/services/datamigrationManagement/lib/models/connectToTargetAzureDbForPostgreSqlSyncTaskInput.js new file mode 100644 index 0000000000..714490ec57 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/connectToTargetAzureDbForPostgreSqlSyncTaskInput.js @@ -0,0 +1,83 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Input for the task that validates connection to Azure Database for + * PostgreSQL and target server requirements + * + */ +class ConnectToTargetAzureDbForPostgreSqlSyncTaskInput { + /** + * Create a ConnectToTargetAzureDbForPostgreSqlSyncTaskInput. + * @property {object} sourceConnectionInfo Connection information for source + * PostgreSQL server + * @property {string} [sourceConnectionInfo.serverName] Name of the server + * @property {string} [sourceConnectionInfo.databaseName] Name of the + * database + * @property {number} [sourceConnectionInfo.port] Port for Server + * @property {object} targetConnectionInfo Connection information for target + * Azure Database for PostgreSQL server + * @property {string} [targetConnectionInfo.serverName] Name of the server + * @property {string} [targetConnectionInfo.databaseName] Name of the + * database + * @property {number} [targetConnectionInfo.port] Port for Server + */ + constructor() { + } + + /** + * Defines the metadata of ConnectToTargetAzureDbForPostgreSqlSyncTaskInput + * + * @returns {object} metadata of ConnectToTargetAzureDbForPostgreSqlSyncTaskInput + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectToTargetAzureDbForPostgreSqlSyncTaskInput', + type: { + name: 'Composite', + className: 'ConnectToTargetAzureDbForPostgreSqlSyncTaskInput', + modelProperties: { + sourceConnectionInfo: { + required: true, + serializedName: 'sourceConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'PostgreSqlConnectionInfo' + } + }, + targetConnectionInfo: { + required: true, + serializedName: 'targetConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'PostgreSqlConnectionInfo' + } + } + } + } + }; + } +} + +module.exports = ConnectToTargetAzureDbForPostgreSqlSyncTaskInput; diff --git a/lib/services/datamigrationManagement/lib/models/connectToTargetAzureDbForPostgreSqlSyncTaskOutput.js b/lib/services/datamigrationManagement/lib/models/connectToTargetAzureDbForPostgreSqlSyncTaskOutput.js new file mode 100644 index 0000000000..94642c384b --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/connectToTargetAzureDbForPostgreSqlSyncTaskOutput.js @@ -0,0 +1,106 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Output for the task that validates connection to Azure Database for + * PostgreSQL and target server requirements + * + */ +class ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput { + /** + * Create a ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput. + * @property {string} [id] Result identifier + * @property {string} [targetServerVersion] Version of the target server + * @property {array} [databases] List of databases on target server + * @property {string} [targetServerBrandVersion] Target server brand version + * @property {array} [validationErrors] Validation errors associated with the + * task + */ + constructor() { + } + + /** + * Defines the metadata of ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput + * + * @returns {object} metadata of ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput', + type: { + name: 'Composite', + className: 'ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + targetServerVersion: { + required: false, + readOnly: true, + serializedName: 'targetServerVersion', + type: { + name: 'String' + } + }, + databases: { + required: false, + readOnly: true, + serializedName: 'databases', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + targetServerBrandVersion: { + required: false, + readOnly: true, + serializedName: 'targetServerBrandVersion', + type: { + name: 'String' + } + }, + validationErrors: { + required: false, + readOnly: true, + serializedName: 'validationErrors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ReportableExceptionElementType', + type: { + name: 'Composite', + className: 'ReportableException' + } + } + } + } + } + } + }; + } +} + +module.exports = ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput; diff --git a/lib/services/datamigrationManagement/lib/models/connectToTargetAzureDbForPostgreSqlSyncTaskProperties.js b/lib/services/datamigrationManagement/lib/models/connectToTargetAzureDbForPostgreSqlSyncTaskProperties.js new file mode 100644 index 0000000000..34fe53875a --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/connectToTargetAzureDbForPostgreSqlSyncTaskProperties.js @@ -0,0 +1,161 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Properties for the task that validates connection to Azure Database For + * PostgreSQL server and target server requirements for online migration + * + * @extends models['ProjectTaskProperties'] + */ +class ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties extends models['ProjectTaskProperties'] { + /** + * Create a ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties. + * @property {object} [input] Task input + * @property {object} [input.sourceConnectionInfo] Connection information for + * source PostgreSQL server + * @property {string} [input.sourceConnectionInfo.serverName] Name of the + * server + * @property {string} [input.sourceConnectionInfo.databaseName] Name of the + * database + * @property {number} [input.sourceConnectionInfo.port] Port for Server + * @property {object} [input.targetConnectionInfo] Connection information for + * target Azure Database for PostgreSQL server + * @property {string} [input.targetConnectionInfo.serverName] Name of the + * server + * @property {string} [input.targetConnectionInfo.databaseName] Name of the + * database + * @property {number} [input.targetConnectionInfo.port] Port for Server + * @property {array} [output] Task output. This is ignored if submitted. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties + * + * @returns {object} metadata of ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectToTarget.AzureDbForPostgreSql.Sync', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'taskType', + clientName: 'taskType' + }, + uberParent: 'ProjectTaskProperties', + className: 'ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties', + modelProperties: { + errors: { + required: false, + readOnly: true, + serializedName: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ODataErrorElementType', + type: { + name: 'Composite', + className: 'ODataError' + } + } + } + }, + state: { + required: false, + readOnly: true, + serializedName: 'state', + type: { + name: 'String' + } + }, + commands: { + required: false, + readOnly: true, + serializedName: 'commands', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CommandPropertiesElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'commandType', + clientName: 'commandType' + }, + uberParent: 'CommandProperties', + className: 'CommandProperties' + } + } + } + }, + clientData: { + required: false, + serializedName: 'clientData', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + taskType: { + required: true, + serializedName: 'taskType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + input: { + required: false, + serializedName: 'input', + type: { + name: 'Composite', + className: 'ConnectToTargetAzureDbForPostgreSqlSyncTaskInput' + } + }, + output: { + required: false, + readOnly: true, + serializedName: 'output', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ConnectToTargetAzureDbForPostgreSqlSyncTaskOutputElementType', + type: { + name: 'Composite', + className: 'ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput' + } + } + } + } + } + } + }; + } +} + +module.exports = ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties; diff --git a/lib/services/datamigrationManagement/lib/models/connectToTargetSqlMISyncTaskInput.js b/lib/services/datamigrationManagement/lib/models/connectToTargetSqlMISyncTaskInput.js new file mode 100644 index 0000000000..b65ecd0cb9 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/connectToTargetSqlMISyncTaskInput.js @@ -0,0 +1,78 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Input for the task that validates connection to Azure SQL Database Managed + * Instance online scenario. + * + */ +class ConnectToTargetSqlMISyncTaskInput { + /** + * Create a ConnectToTargetSqlMISyncTaskInput. + * @property {object} targetConnectionInfo Connection information for Azure + * SQL Database Managed Instance + * @property {string} [targetConnectionInfo.managedInstanceResourceId] + * Resource id for Azure SQL database Managed instance + * @property {object} azureApp Azure Active Directory Application the DMS + * instance will use to connect to the target instance of Azure SQL Database + * Managed Instance and the Azure Storage Account + * @property {string} [azureApp.applicationId] Application ID of the Azure + * Active Directory Application + * @property {string} [azureApp.appKey] Key used to authenticate to the Azure + * Active Directory Application + * @property {string} [azureApp.tenantId] Tenant id of the customer + */ + constructor() { + } + + /** + * Defines the metadata of ConnectToTargetSqlMISyncTaskInput + * + * @returns {object} metadata of ConnectToTargetSqlMISyncTaskInput + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectToTargetSqlMISyncTaskInput', + type: { + name: 'Composite', + className: 'ConnectToTargetSqlMISyncTaskInput', + modelProperties: { + targetConnectionInfo: { + required: true, + serializedName: 'targetConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'MiSqlConnectionInfo' + } + }, + azureApp: { + required: true, + serializedName: 'azureApp', + type: { + name: 'Composite', + className: 'AzureActiveDirectoryApp' + } + } + } + } + }; + } +} + +module.exports = ConnectToTargetSqlMISyncTaskInput; diff --git a/lib/services/datamigrationManagement/lib/models/connectToTargetSqlMISyncTaskOutput.js b/lib/services/datamigrationManagement/lib/models/connectToTargetSqlMISyncTaskOutput.js new file mode 100644 index 0000000000..69ff79f3e6 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/connectToTargetSqlMISyncTaskOutput.js @@ -0,0 +1,80 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Output for the task that validates connection to Azure SQL Database Managed + * Instance. + * + */ +class ConnectToTargetSqlMISyncTaskOutput { + /** + * Create a ConnectToTargetSqlMISyncTaskOutput. + * @property {string} [targetServerVersion] Target server version + * @property {string} [targetServerBrandVersion] Target server brand version + * @property {array} [validationErrors] Validation errors + */ + constructor() { + } + + /** + * Defines the metadata of ConnectToTargetSqlMISyncTaskOutput + * + * @returns {object} metadata of ConnectToTargetSqlMISyncTaskOutput + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectToTargetSqlMISyncTaskOutput', + type: { + name: 'Composite', + className: 'ConnectToTargetSqlMISyncTaskOutput', + modelProperties: { + targetServerVersion: { + required: false, + readOnly: true, + serializedName: 'targetServerVersion', + type: { + name: 'String' + } + }, + targetServerBrandVersion: { + required: false, + readOnly: true, + serializedName: 'targetServerBrandVersion', + type: { + name: 'String' + } + }, + validationErrors: { + required: false, + readOnly: true, + serializedName: 'validationErrors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ReportableExceptionElementType', + type: { + name: 'Composite', + className: 'ReportableException' + } + } + } + } + } + } + }; + } +} + +module.exports = ConnectToTargetSqlMISyncTaskOutput; diff --git a/lib/services/datamigrationManagement/lib/models/connectToTargetSqlMISyncTaskProperties.js b/lib/services/datamigrationManagement/lib/models/connectToTargetSqlMISyncTaskProperties.js new file mode 100644 index 0000000000..3e5ecf27cf --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/connectToTargetSqlMISyncTaskProperties.js @@ -0,0 +1,159 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Properties for the task that validates connection to Azure SQL Database + * Managed Instance + * + * @extends models['ProjectTaskProperties'] + */ +class ConnectToTargetSqlMISyncTaskProperties extends models['ProjectTaskProperties'] { + /** + * Create a ConnectToTargetSqlMISyncTaskProperties. + * @property {object} [input] Task input + * @property {object} [input.targetConnectionInfo] Connection information for + * Azure SQL Database Managed Instance + * @property {string} [input.targetConnectionInfo.managedInstanceResourceId] + * Resource id for Azure SQL database Managed instance + * @property {object} [input.azureApp] Azure Active Directory Application the + * DMS instance will use to connect to the target instance of Azure SQL + * Database Managed Instance and the Azure Storage Account + * @property {string} [input.azureApp.applicationId] Application ID of the + * Azure Active Directory Application + * @property {string} [input.azureApp.appKey] Key used to authenticate to the + * Azure Active Directory Application + * @property {string} [input.azureApp.tenantId] Tenant id of the customer + * @property {array} [output] Task output. This is ignored if submitted. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ConnectToTargetSqlMISyncTaskProperties + * + * @returns {object} metadata of ConnectToTargetSqlMISyncTaskProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectToTarget.AzureSqlDbMI.Sync.LRS', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'taskType', + clientName: 'taskType' + }, + uberParent: 'ProjectTaskProperties', + className: 'ConnectToTargetSqlMISyncTaskProperties', + modelProperties: { + errors: { + required: false, + readOnly: true, + serializedName: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ODataErrorElementType', + type: { + name: 'Composite', + className: 'ODataError' + } + } + } + }, + state: { + required: false, + readOnly: true, + serializedName: 'state', + type: { + name: 'String' + } + }, + commands: { + required: false, + readOnly: true, + serializedName: 'commands', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CommandPropertiesElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'commandType', + clientName: 'commandType' + }, + uberParent: 'CommandProperties', + className: 'CommandProperties' + } + } + } + }, + clientData: { + required: false, + serializedName: 'clientData', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + taskType: { + required: true, + serializedName: 'taskType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + input: { + required: false, + serializedName: 'input', + type: { + name: 'Composite', + className: 'ConnectToTargetSqlMISyncTaskInput' + } + }, + output: { + required: false, + readOnly: true, + serializedName: 'output', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ConnectToTargetSqlMISyncTaskOutputElementType', + type: { + name: 'Composite', + className: 'ConnectToTargetSqlMISyncTaskOutput' + } + } + } + } + } + } + }; + } +} + +module.exports = ConnectToTargetSqlMISyncTaskProperties; diff --git a/lib/services/datamigrationManagement/lib/models/index.d.ts b/lib/services/datamigrationManagement/lib/models/index.d.ts index 1ea6f032e9..d222c9812e 100644 --- a/lib/services/datamigrationManagement/lib/models/index.d.ts +++ b/lib/services/datamigrationManagement/lib/models/index.d.ts @@ -66,7 +66,7 @@ export interface ProjectFileProperties { */ readonly lastModified?: Date; /** - * File content type. This propery can be modified to reflect the file content type. + * File content type. This property can be modified to reflect the file content type. */ mediaType?: string; /** @@ -139,9 +139,9 @@ export interface ReportableException { } /** - * Output for command that completes sync migration for a database. + * Output for command that completes online migration for an Azure SQL Database Managed Instance. */ -export interface MigrateSyncCompleteCommandOutput { +export interface MigrateMISyncCompleteCommandOutput { /** * List of errors that happened during the command execution */ @@ -149,17 +149,13 @@ export interface MigrateSyncCompleteCommandOutput { } /** - * Input for command that completes sync migration for a database. + * Input for command that completes online migration for an Azure SQL Database Managed Instance. */ -export interface MigrateSyncCompleteCommandInput { +export interface MigrateMISyncCompleteCommandInput { /** - * Name of database + * Name of managed instance database */ - databaseName: string; - /** - * Time stamp to complete - */ - commitTimeStamp?: Date; + sourceDatabaseName: string; } /** @@ -182,6 +178,49 @@ export interface CommandProperties { commandType: string; } +/** + * Properties for the command that completes online migration for an Azure SQL Database Managed + * Instance. + */ +export interface MigrateMISyncCompleteCommandProperties extends CommandProperties { + /** + * Command input + */ + input?: MigrateMISyncCompleteCommandInput; + /** + * Command output. This is ignored if submitted. + */ + readonly output?: MigrateMISyncCompleteCommandOutput; +} + +/** + * Output for command that completes sync migration for a database. + */ +export interface MigrateSyncCompleteCommandOutput { + /** + * Result identifier + */ + readonly id?: string; + /** + * List of errors that happened during the command execution + */ + readonly errors?: ReportableException[]; +} + +/** + * Input for command that completes sync migration for a database. + */ +export interface MigrateSyncCompleteCommandInput { + /** + * Name of database + */ + databaseName: string; + /** + * Time stamp to complete + */ + commitTimeStamp?: Date; +} + /** * Properties for the command that completes sync migration for a database. */ @@ -211,7 +250,7 @@ export interface GetTdeCertificatesSqlTaskOutput { } /** - * Info for ertificate to be exported for TDE enabled databases. + * Info for certificate to be exported for TDE enabled databases. */ export interface SelectedCertificateInput { /** @@ -260,6 +299,16 @@ export interface ConnectionInfo { type: string; } +/** + * Properties required to create a connection to Azure SQL database Managed instance + */ +export interface MiSqlConnectionInfo extends ConnectionInfo { + /** + * Resource id for Azure SQL database Managed instance + */ + managedInstanceResourceId: string; +} + /** * Information for connecting to PostgreSQL server */ @@ -641,6 +690,121 @@ export interface ValidateMongoDbTaskProperties extends ProjectTaskProperties { readonly output?: MongoDbMigrationProgress[]; } +/** + * Output for task that validates migration input for Azure SQL Database Managed Instance online + * migration +*/ +export interface ValidateMigrationInputSqlServerSqlMISyncTaskOutput { + /** + * Database identifier + */ + readonly id?: string; + /** + * Name of database + */ + readonly name?: string; + /** + * Errors associated with a selected database object + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * Azure Active Directory Application +*/ +export interface AzureActiveDirectoryApp { + /** + * Application ID of the Azure Active Directory Application + */ + applicationId: string; + /** + * Key used to authenticate to the Azure Active Directory Application + */ + appKey: string; + /** + * Tenant id of the customer + */ + tenantId: string; +} + +/** + * Database specific information for SQL to Azure SQL DB Managed Instance migration task inputs +*/ +export interface MigrateSqlServerSqlMIDatabaseInput { + /** + * Name of the database + */ + name: string; + /** + * Name of the database at destination + */ + restoreDatabaseName: string; + /** + * Backup file share information for backing up this database. + */ + backupFileShare?: FileShare; + /** + * The list of backup files to be used in case of existing backups. + */ + backupFilePaths?: string[]; +} + +/** + * Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online + * scenario. +*/ +export interface SqlServerSqlMISyncTaskInput { + /** + * Databases to migrate + */ + selectedDatabases: MigrateSqlServerSqlMIDatabaseInput[]; + /** + * Backup file share information for all selected databases. + */ + backupFileShare?: FileShare; + /** + * Fully qualified resourceId of storage + */ + storageResourceId: string; + /** + * Connection information for source SQL Server + */ + sourceConnectionInfo: SqlConnectionInfo; + /** + * Connection information for Azure SQL Database Managed Instance + */ + targetConnectionInfo: MiSqlConnectionInfo; + /** + * Azure Active Directory Application the DMS instance will use to connect to the target instance + * of Azure SQL Database Managed Instance and the Azure Storage Account + */ + azureApp: AzureActiveDirectoryApp; +} + +/** + * Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online + * scenario. +*/ +export interface ValidateMigrationInputSqlServerSqlMISyncTaskInput extends +SqlServerSqlMISyncTaskInput { +} + +/** + * Properties for task that validates migration input for SQL to Azure SQL Database Managed + * Instance sync scenario +*/ +export interface ValidateMigrationInputSqlServerSqlMISyncTaskProperties extends +ProjectTaskProperties { + /** + * Task input + */ + input?: ValidateMigrationInputSqlServerSqlMISyncTaskInput; + /** + * Task output. This is ignored if submitted. + */ + readonly output?: ValidateMigrationInputSqlServerSqlMISyncTaskOutput[]; +} + /** * Information about backup files when existing backup mode is used. */ @@ -729,28 +893,6 @@ export interface BlobShare { sasUri: string; } -/** - * Database specific information for SQL to Azure SQL DB Managed Instance migration task inputs -*/ -export interface MigrateSqlServerSqlMIDatabaseInput { - /** - * Name of the database - */ - name: string; - /** - * Name of the database at destination - */ - restoreDatabaseName: string; - /** - * Backup file share information for backing up this database. - */ - backupFileShare?: FileShare; - /** - * The list of backup files to be used in case of existing backups. - */ - backupFilePaths?: string[]; -} - /** * Input for task that validates migration input for SQL to Azure SQL Managed Instance */ @@ -1107,6 +1249,18 @@ export interface MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput { * Name of target database. Note: Target database will be truncated before starting migration. */ targetDatabaseName?: string; + /** + * Migration settings which tune the migration behavior + */ + migrationSetting?: { [propertyName: string]: string }; + /** + * Source settings to tune source endpoint migration behavior + */ + sourceSetting?: { [propertyName: string]: string }; + /** + * Target settings to tune target endpoint migration behavior + */ + targetSetting?: { [propertyName: string]: string }; } /** @@ -1342,6 +1496,18 @@ export interface MigrateMySqlAzureDbForMySqlSyncDatabaseInput { * Name of target database. Note: Target database will be truncated before starting migration. */ targetDatabaseName?: string; + /** + * Migration settings which tune the migration behavior + */ + migrationSetting?: { [propertyName: string]: string }; + /** + * Source settings to tune source endpoint migration behavior + */ + sourceSetting?: { [propertyName: string]: string }; + /** + * Target settings to tune target endpoint migration behavior + */ + targetSetting?: { [propertyName: string]: string }; } /** @@ -2210,6 +2376,216 @@ export interface MigrateSqlServerSqlDbTaskProperties extends ProjectTaskProperti readonly output?: MigrateSqlServerSqlDbTaskOutput[]; } +/** + * Output for task that migrates SQL Server databases to Azure SQL Database Managed Instance using + * Log Replay Service. +*/ +export interface MigrateSqlServerSqlMISyncTaskOutput { + /** + * Result identifier + */ + readonly id?: string; + /** + * Polymorphic Discriminator + */ + resultType: string; +} + +export interface MigrateSqlServerSqlMISyncTaskOutputError extends +MigrateSqlServerSqlMISyncTaskOutput { + /** + * Migration error + */ + readonly error?: ReportableException; +} + +/** + * Information of the backup file +*/ +export interface BackupFileInfo { + /** + * Location of the backup file in shared folder + */ + fileLocation?: string; + /** + * Sequence number of the backup file in the backup set + */ + familySequenceNumber?: number; + /** + * Status of the backup file during migration. Possible values include: 'Arrived', 'Queued', + * 'Uploading', 'Uploaded', 'Restoring', 'Restored', 'Cancelled' + */ + status?: string; +} + +/** + * Information of backup set +*/ +export interface BackupSetInfo { + /** + * Id for the set of backup files + */ + backupSetId?: string; + /** + * First log sequence number of the backup file + */ + firstLsn?: string; + /** + * Last log sequence number of the backup file + */ + lastLsn?: string; + /** + * Last modified time of the backup file in share location + */ + lastModifiedTime?: Date; + /** + * Enum of the different backup types. Possible values include: 'Database', 'TransactionLog', + * 'File', 'DifferentialDatabase', 'DifferentialFile', 'Partial', 'DifferentialPartial' + */ + backupType?: string; + /** + * List of files in the backup set + */ + listOfBackupFiles?: BackupFileInfo[]; + /** + * Name of the database to which the backup set belongs + */ + databaseName?: string; + /** + * Date and time that the backup operation began + */ + backupStartDate?: Date; + /** + * Date and time that the backup operation finished + */ + backupFinishedDate?: Date; + /** + * Whether the backup set is restored or not + */ + isBackupRestored?: boolean; +} + +export interface MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel extends +MigrateSqlServerSqlMISyncTaskOutput { + /** + * Name of the database + */ + readonly sourceDatabaseName?: string; + /** + * Current state of database. Possible values include: 'UNDEFINED', 'INITIAL', + * 'FULL_BACKUP_UPLOAD_START', 'LOG_SHIPPING_START', 'UPLOAD_LOG_FILES_START', 'CUTOVER_START', + * 'POST_CUTOVER_COMPLETE', 'COMPLETED', 'CANCELLED', 'FAILED' + */ + readonly migrationState?: string; + /** + * Database migration start time + */ + readonly startedOn?: Date; + /** + * Database migration end time + */ + readonly endedOn?: Date; + /** + * Details of full backup set + */ + readonly fullBackupSetInfo?: BackupSetInfo; + /** + * Last applied backup set information + */ + readonly lastRestoredBackupSetInfo?: BackupSetInfo; + /** + * Backup sets that are currently active (Either being uploaded or getting restored) + */ + readonly activeBackupSets?: BackupSetInfo[]; + /** + * Name of container created in the Azure Storage account where backups are copied to + */ + readonly containerName?: string; + /** + * prefix string to use for querying errors for this database + */ + readonly errorPrefix?: string; + /** + * Whether full backup has been applied to the target database or not + */ + readonly isFullBackupRestored?: boolean; + /** + * Migration exceptions and warnings + */ + readonly exceptionsAndWarnings?: ReportableException[]; +} + +export interface MigrateSqlServerSqlMISyncTaskOutputMigrationLevel extends +MigrateSqlServerSqlMISyncTaskOutput { + /** + * Count of databases + */ + readonly databaseCount?: number; + /** + * Current state of migration. Possible values include: 'None', 'InProgress', 'Failed', + * 'Warning', 'Completed', 'Skipped', 'Stopped' + */ + readonly state?: string; + /** + * Migration start time + */ + readonly startedOn?: Date; + /** + * Migration end time + */ + readonly endedOn?: Date; + /** + * Source server name + */ + readonly sourceServerName?: string; + /** + * Source server version + */ + readonly sourceServerVersion?: string; + /** + * Source server brand version + */ + readonly sourceServerBrandVersion?: string; + /** + * Target server name + */ + readonly targetServerName?: string; + /** + * Target server version + */ + readonly targetServerVersion?: string; + /** + * Target server brand version + */ + readonly targetServerBrandVersion?: string; + /** + * Number of database level errors + */ + readonly databaseErrorCount?: number; +} + +/** + * Input for task that migrates SQL Server databases to Azure SQL Database Managed Instance online + * scenario. +*/ +export interface MigrateSqlServerSqlMISyncTaskInput extends SqlServerSqlMISyncTaskInput { +} + +/** + * Properties for task that migrates SQL Server databases to Azure SQL Database Managed Instance + * sync scenario +*/ +export interface MigrateSqlServerSqlMISyncTaskProperties extends ProjectTaskProperties { + /** + * Task input + */ + input?: MigrateSqlServerSqlMISyncTaskInput; + /** + * Task output. This is ignored if submitted. + */ + readonly output?: MigrateSqlServerSqlMISyncTaskOutput[]; +} + /** * Output for task that migrates SQL Server databases to Azure SQL Database Managed Instance. */ @@ -2337,6 +2713,20 @@ MigrateSqlServerSqlMITaskOutput { readonly exceptionsAndWarnings?: ReportableException[]; } +/** + * Information of orphaned users on the SQL server database. +*/ +export interface OrphanedUserInfo { + /** + * Name of the orphaned user + */ + name?: string; + /** + * Parent database of the user + */ + databaseName?: string; +} + /** * Server role migration result */ @@ -2394,9 +2784,9 @@ MigrateSqlServerSqlMITaskOutput { */ readonly serverRoleResults?: { [propertyName: string]: StartMigrationScenarioServerRoleResult }; /** - * Map of users to database name of orphaned users. + * List of orphaned users. */ - readonly orphanedUsers?: { [propertyName: string]: string }; + readonly orphanedUsersInfo?: OrphanedUserInfo[]; /** * Selected databases as a map from database name to database id */ @@ -2534,6 +2924,54 @@ export interface ConnectToTargetAzureDbForMySqlTaskProperties extends ProjectTas readonly output?: ConnectToTargetAzureDbForMySqlTaskOutput[]; } +/** + * Output for the task that validates connection to Azure SQL Database Managed Instance. +*/ +export interface ConnectToTargetSqlMISyncTaskOutput { + /** + * Target server version + */ + readonly targetServerVersion?: string; + /** + * Target server brand version + */ + readonly targetServerBrandVersion?: string; + /** + * Validation errors + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * Input for the task that validates connection to Azure SQL Database Managed Instance online + * scenario. +*/ +export interface ConnectToTargetSqlMISyncTaskInput { + /** + * Connection information for Azure SQL Database Managed Instance + */ + targetConnectionInfo: MiSqlConnectionInfo; + /** + * Azure Active Directory Application the DMS instance will use to connect to the target instance + * of Azure SQL Database Managed Instance and the Azure Storage Account + */ + azureApp: AzureActiveDirectoryApp; +} + +/** + * Properties for the task that validates connection to Azure SQL Database Managed Instance +*/ +export interface ConnectToTargetSqlMISyncTaskProperties extends ProjectTaskProperties { + /** + * Task input + */ + input?: ConnectToTargetSqlMISyncTaskInput; + /** + * Task output. This is ignored if submitted. + */ + readonly output?: ConnectToTargetSqlMISyncTaskOutput[]; +} + /** * Output for the task that validates connection to Azure SQL Database Managed Instance. */ @@ -2706,6 +3144,64 @@ export interface GetUserTablesSqlTaskProperties extends ProjectTaskProperties { readonly output?: GetUserTablesSqlTaskOutput[]; } +/** + * Output for the task that validates connection to Azure Database for PostgreSQL and target server + * requirements +*/ +export interface ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput { + /** + * Result identifier + */ + readonly id?: string; + /** + * Version of the target server + */ + readonly targetServerVersion?: string; + /** + * List of databases on target server + */ + readonly databases?: string[]; + /** + * Target server brand version + */ + readonly targetServerBrandVersion?: string; + /** + * Validation errors associated with the task + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * Input for the task that validates connection to Azure Database for PostgreSQL and target server + * requirements +*/ +export interface ConnectToTargetAzureDbForPostgreSqlSyncTaskInput { + /** + * Connection information for source PostgreSQL server + */ + sourceConnectionInfo: PostgreSqlConnectionInfo; + /** + * Connection information for target Azure Database for PostgreSQL server + */ + targetConnectionInfo: PostgreSqlConnectionInfo; +} + +/** + * Properties for the task that validates connection to Azure Database For PostgreSQL server and + * target server requirements for online migration +*/ +export interface ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties extends +ProjectTaskProperties { + /** + * Task input + */ + input?: ConnectToTargetAzureDbForPostgreSqlSyncTaskInput; + /** + * Task output. This is ignored if submitted. + */ + readonly output?: ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput[]; +} + /** * Output for the task that validates connection to SQL DB and target server requirements */ @@ -2781,6 +3277,57 @@ export interface ConnectToTargetSqlDbTaskProperties extends ProjectTaskPropertie readonly output?: ConnectToTargetSqlDbTaskOutput[]; } +/** + * Output for the task that validates connection to PostgreSQL and source server requirements +*/ +export interface ConnectToSourcePostgreSqlSyncTaskOutput { + /** + * Result identifier + */ + readonly id?: string; + /** + * Version of the source server + */ + readonly sourceServerVersion?: string; + /** + * List of databases on source server + */ + readonly databases?: string[]; + /** + * Source server brand version + */ + readonly sourceServerBrandVersion?: string; + /** + * Validation errors associated with the task + */ + readonly validationErrors?: ReportableException[]; +} + +/** + * Input for the task that validates connection to PostgreSQL and source server requirements +*/ +export interface ConnectToSourcePostgreSqlSyncTaskInput { + /** + * Connection information for source PostgreSQL server + */ + sourceConnectionInfo: PostgreSqlConnectionInfo; +} + +/** + * Properties for the task that validates connection to PostgreSQL server and source server + * requirements for online migration +*/ +export interface ConnectToSourcePostgreSqlSyncTaskProperties extends ProjectTaskProperties { + /** + * Task input + */ + input?: ConnectToSourcePostgreSqlSyncTaskInput; + /** + * Task output. This is ignored if submitted. + */ + readonly output?: ConnectToSourcePostgreSqlSyncTaskOutput[]; +} + /** * Information about migration eligibility of a server object */ @@ -2841,7 +3388,7 @@ ConnectToSourceSqlServerTaskOutput { */ readonly validationErrors?: ReportableException[]; /** - * Information about eligiblity of agent job for migration. + * Information about eligibility of agent job for migration. */ readonly migrationEligibility?: MigrationEligibilityInfo; } @@ -2870,7 +3417,7 @@ ConnectToSourceSqlServerTaskOutput { */ readonly isEnabled?: boolean; /** - * Information about eligiblity of login for migration. + * Information about eligibility of login for migration. */ readonly migrationEligibility?: MigrationEligibilityInfo; } @@ -3522,7 +4069,7 @@ export interface ResourceSkuRestrictions { } /** - * Describes The SKU capabilites object. + * Describes The SKU capabilities object. */ export interface ResourceSkuCapabilities { /** @@ -3639,7 +4186,7 @@ export interface ConnectToSourceMySqlTaskInput { */ sourceConnectionInfo: MySqlConnectionInfo; /** - * Target Platform for the migration. Possible values include: 'AzureDbForMySQL' + * Target Platform for the migration. Possible values include: 'SqlServer', 'AzureDbForMySQL' */ targetPlatform?: string; /** diff --git a/lib/services/datamigrationManagement/lib/models/index.js b/lib/services/datamigrationManagement/lib/models/index.js index 919b607d33..37e5b17492 100644 --- a/lib/services/datamigrationManagement/lib/models/index.js +++ b/lib/services/datamigrationManagement/lib/models/index.js @@ -24,14 +24,18 @@ exports.ProjectFileProperties = require('./projectFileProperties'); exports.ProjectFile = require('./projectFile'); exports.ODataError = require('./oDataError'); exports.ReportableException = require('./reportableException'); +exports.MigrateMISyncCompleteCommandOutput = require('./migrateMISyncCompleteCommandOutput'); +exports.MigrateMISyncCompleteCommandInput = require('./migrateMISyncCompleteCommandInput'); +exports.CommandProperties = require('./commandProperties'); +exports.MigrateMISyncCompleteCommandProperties = require('./migrateMISyncCompleteCommandProperties'); exports.MigrateSyncCompleteCommandOutput = require('./migrateSyncCompleteCommandOutput'); exports.MigrateSyncCompleteCommandInput = require('./migrateSyncCompleteCommandInput'); -exports.CommandProperties = require('./commandProperties'); exports.MigrateSyncCompleteCommandProperties = require('./migrateSyncCompleteCommandProperties'); exports.GetTdeCertificatesSqlTaskOutput = require('./getTdeCertificatesSqlTaskOutput'); exports.SelectedCertificateInput = require('./selectedCertificateInput'); exports.FileShare = require('./fileShare'); exports.ConnectionInfo = require('./connectionInfo'); +exports.MiSqlConnectionInfo = require('./miSqlConnectionInfo'); exports.PostgreSqlConnectionInfo = require('./postgreSqlConnectionInfo'); exports.MySqlConnectionInfo = require('./mySqlConnectionInfo'); exports.MongoDbConnectionInfo = require('./mongoDbConnectionInfo'); @@ -51,10 +55,15 @@ exports.MongoDbCollectionSettings = require('./mongoDbCollectionSettings'); exports.MongoDbDatabaseSettings = require('./mongoDbDatabaseSettings'); exports.MongoDbMigrationSettings = require('./mongoDbMigrationSettings'); exports.ValidateMongoDbTaskProperties = require('./validateMongoDbTaskProperties'); +exports.ValidateMigrationInputSqlServerSqlMISyncTaskOutput = require('./validateMigrationInputSqlServerSqlMISyncTaskOutput'); +exports.AzureActiveDirectoryApp = require('./azureActiveDirectoryApp'); +exports.MigrateSqlServerSqlMIDatabaseInput = require('./migrateSqlServerSqlMIDatabaseInput'); +exports.SqlServerSqlMISyncTaskInput = require('./sqlServerSqlMISyncTaskInput'); +exports.ValidateMigrationInputSqlServerSqlMISyncTaskInput = require('./validateMigrationInputSqlServerSqlMISyncTaskInput'); +exports.ValidateMigrationInputSqlServerSqlMISyncTaskProperties = require('./validateMigrationInputSqlServerSqlMISyncTaskProperties'); exports.DatabaseBackupInfo = require('./databaseBackupInfo'); exports.ValidateMigrationInputSqlServerSqlMITaskOutput = require('./validateMigrationInputSqlServerSqlMITaskOutput'); exports.BlobShare = require('./blobShare'); -exports.MigrateSqlServerSqlMIDatabaseInput = require('./migrateSqlServerSqlMIDatabaseInput'); exports.ValidateMigrationInputSqlServerSqlMITaskInput = require('./validateMigrationInputSqlServerSqlMITaskInput'); exports.ValidateMigrationInputSqlServerSqlMITaskProperties = require('./validateMigrationInputSqlServerSqlMITaskProperties'); exports.ValidateSyncMigrationInputSqlServerTaskOutput = require('./validateSyncMigrationInputSqlServerTaskOutput'); @@ -112,11 +121,20 @@ exports.MigrateSqlServerSqlDbTaskOutputMigrationLevel = require('./migrateSqlSer exports.MigrateSqlServerSqlDbDatabaseInput = require('./migrateSqlServerSqlDbDatabaseInput'); exports.MigrateSqlServerSqlDbTaskInput = require('./migrateSqlServerSqlDbTaskInput'); exports.MigrateSqlServerSqlDbTaskProperties = require('./migrateSqlServerSqlDbTaskProperties'); +exports.MigrateSqlServerSqlMISyncTaskOutput = require('./migrateSqlServerSqlMISyncTaskOutput'); +exports.MigrateSqlServerSqlMISyncTaskOutputError = require('./migrateSqlServerSqlMISyncTaskOutputError'); +exports.BackupFileInfo = require('./backupFileInfo'); +exports.BackupSetInfo = require('./backupSetInfo'); +exports.MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel = require('./migrateSqlServerSqlMISyncTaskOutputDatabaseLevel'); +exports.MigrateSqlServerSqlMISyncTaskOutputMigrationLevel = require('./migrateSqlServerSqlMISyncTaskOutputMigrationLevel'); +exports.MigrateSqlServerSqlMISyncTaskInput = require('./migrateSqlServerSqlMISyncTaskInput'); +exports.MigrateSqlServerSqlMISyncTaskProperties = require('./migrateSqlServerSqlMISyncTaskProperties'); exports.MigrateSqlServerSqlMITaskOutput = require('./migrateSqlServerSqlMITaskOutput'); exports.MigrateSqlServerSqlMITaskOutputError = require('./migrateSqlServerSqlMITaskOutputError'); exports.MigrateSqlServerSqlMITaskOutputLoginLevel = require('./migrateSqlServerSqlMITaskOutputLoginLevel'); exports.MigrateSqlServerSqlMITaskOutputAgentJobLevel = require('./migrateSqlServerSqlMITaskOutputAgentJobLevel'); exports.MigrateSqlServerSqlMITaskOutputDatabaseLevel = require('./migrateSqlServerSqlMITaskOutputDatabaseLevel'); +exports.OrphanedUserInfo = require('./orphanedUserInfo'); exports.StartMigrationScenarioServerRoleResult = require('./startMigrationScenarioServerRoleResult'); exports.MigrateSqlServerSqlMITaskOutputMigrationLevel = require('./migrateSqlServerSqlMITaskOutputMigrationLevel'); exports.MigrateSqlServerSqlMITaskInput = require('./migrateSqlServerSqlMITaskInput'); @@ -125,6 +143,9 @@ exports.MigrateMongoDbTaskProperties = require('./migrateMongoDbTaskProperties') exports.ConnectToTargetAzureDbForMySqlTaskOutput = require('./connectToTargetAzureDbForMySqlTaskOutput'); exports.ConnectToTargetAzureDbForMySqlTaskInput = require('./connectToTargetAzureDbForMySqlTaskInput'); exports.ConnectToTargetAzureDbForMySqlTaskProperties = require('./connectToTargetAzureDbForMySqlTaskProperties'); +exports.ConnectToTargetSqlMISyncTaskOutput = require('./connectToTargetSqlMISyncTaskOutput'); +exports.ConnectToTargetSqlMISyncTaskInput = require('./connectToTargetSqlMISyncTaskInput'); +exports.ConnectToTargetSqlMISyncTaskProperties = require('./connectToTargetSqlMISyncTaskProperties'); exports.ConnectToTargetSqlMITaskOutput = require('./connectToTargetSqlMITaskOutput'); exports.ConnectToTargetSqlMITaskInput = require('./connectToTargetSqlMITaskInput'); exports.ConnectToTargetSqlMITaskProperties = require('./connectToTargetSqlMITaskProperties'); @@ -135,11 +156,17 @@ exports.GetUserTablesSqlSyncTaskProperties = require('./getUserTablesSqlSyncTask exports.GetUserTablesSqlTaskOutput = require('./getUserTablesSqlTaskOutput'); exports.GetUserTablesSqlTaskInput = require('./getUserTablesSqlTaskInput'); exports.GetUserTablesSqlTaskProperties = require('./getUserTablesSqlTaskProperties'); +exports.ConnectToTargetAzureDbForPostgreSqlSyncTaskOutput = require('./connectToTargetAzureDbForPostgreSqlSyncTaskOutput'); +exports.ConnectToTargetAzureDbForPostgreSqlSyncTaskInput = require('./connectToTargetAzureDbForPostgreSqlSyncTaskInput'); +exports.ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties = require('./connectToTargetAzureDbForPostgreSqlSyncTaskProperties'); exports.ConnectToTargetSqlDbTaskOutput = require('./connectToTargetSqlDbTaskOutput'); exports.ConnectToTargetSqlSqlDbSyncTaskInput = require('./connectToTargetSqlSqlDbSyncTaskInput'); exports.ConnectToTargetSqlSqlDbSyncTaskProperties = require('./connectToTargetSqlSqlDbSyncTaskProperties'); exports.ConnectToTargetSqlDbTaskInput = require('./connectToTargetSqlDbTaskInput'); exports.ConnectToTargetSqlDbTaskProperties = require('./connectToTargetSqlDbTaskProperties'); +exports.ConnectToSourcePostgreSqlSyncTaskOutput = require('./connectToSourcePostgreSqlSyncTaskOutput'); +exports.ConnectToSourcePostgreSqlSyncTaskInput = require('./connectToSourcePostgreSqlSyncTaskInput'); +exports.ConnectToSourcePostgreSqlSyncTaskProperties = require('./connectToSourcePostgreSqlSyncTaskProperties'); exports.MigrationEligibilityInfo = require('./migrationEligibilityInfo'); exports.ConnectToSourceSqlServerTaskOutput = require('./connectToSourceSqlServerTaskOutput'); exports.ConnectToSourceSqlServerTaskOutputAgentJobLevel = require('./connectToSourceSqlServerTaskOutputAgentJobLevel'); @@ -217,8 +244,10 @@ exports.QuotaList = require('./quotaList'); exports.ServiceOperationList = require('./serviceOperationList'); exports.FileList = require('./fileList'); exports.discriminators = { + 'CommandProperties.Migrate.SqlServer.AzureDbSqlMi.Complete' : exports.MigrateMISyncCompleteCommandProperties, 'CommandProperties.Migrate.Sync.Complete.Database' : exports.MigrateSyncCompleteCommandProperties, 'Unknown' : exports.CommandProperties, + 'ConnectionInfo.MiSqlConnectionInfo' : exports.MiSqlConnectionInfo, 'ConnectionInfo.PostgreSqlConnectionInfo' : exports.PostgreSqlConnectionInfo, 'ConnectionInfo.MySqlConnectionInfo' : exports.MySqlConnectionInfo, 'ConnectionInfo.MongoDbConnectionInfo' : exports.MongoDbConnectionInfo, @@ -226,6 +255,7 @@ exports.discriminators = { 'ConnectionInfo.SqlConnectionInfo' : exports.SqlConnectionInfo, 'ProjectTaskProperties.GetTDECertificates.Sql' : exports.GetTdeCertificatesSqlTaskProperties, 'ProjectTaskProperties.Validate.MongoDb' : exports.ValidateMongoDbTaskProperties, + 'ProjectTaskProperties.ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS' : exports.ValidateMigrationInputSqlServerSqlMISyncTaskProperties, 'ProjectTaskProperties.ValidateMigrationInput.SqlServer.AzureSqlDbMI' : exports.ValidateMigrationInputSqlServerSqlMITaskProperties, 'ProjectTaskProperties.ValidateMigrationInput.SqlServer.SqlDb.Sync' : exports.ValidateMigrationInputSqlServerSqlDbSyncTaskProperties, 'MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutput.DatabaseLevelErrorOutput' : exports.MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputDatabaseError, @@ -255,6 +285,11 @@ exports.discriminators = { 'MigrateSqlServerSqlDbTaskOutput.MigrationLevelOutput' : exports.MigrateSqlServerSqlDbTaskOutputMigrationLevel, 'MigrateSqlServerSqlDbTaskOutput' : exports.MigrateSqlServerSqlDbTaskOutput, 'ProjectTaskProperties.Migrate.SqlServer.SqlDb' : exports.MigrateSqlServerSqlDbTaskProperties, + 'MigrateSqlServerSqlMISyncTaskOutput.ErrorOutput' : exports.MigrateSqlServerSqlMISyncTaskOutputError, + 'MigrateSqlServerSqlMISyncTaskOutput.DatabaseLevelOutput' : exports.MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel, + 'MigrateSqlServerSqlMISyncTaskOutput.MigrationLevelOutput' : exports.MigrateSqlServerSqlMISyncTaskOutputMigrationLevel, + 'MigrateSqlServerSqlMISyncTaskOutput' : exports.MigrateSqlServerSqlMISyncTaskOutput, + 'ProjectTaskProperties.Migrate.SqlServer.AzureSqlDbMI.Sync.LRS' : exports.MigrateSqlServerSqlMISyncTaskProperties, 'MigrateSqlServerSqlMITaskOutput.ErrorOutput' : exports.MigrateSqlServerSqlMITaskOutputError, 'MigrateSqlServerSqlMITaskOutput.LoginLevelOutput' : exports.MigrateSqlServerSqlMITaskOutputLoginLevel, 'MigrateSqlServerSqlMITaskOutput.AgentJobLevelOutput' : exports.MigrateSqlServerSqlMITaskOutputAgentJobLevel, @@ -264,11 +299,14 @@ exports.discriminators = { 'ProjectTaskProperties.Migrate.SqlServer.AzureSqlDbMI' : exports.MigrateSqlServerSqlMITaskProperties, 'ProjectTaskProperties.Migrate.MongoDb' : exports.MigrateMongoDbTaskProperties, 'ProjectTaskProperties.ConnectToTarget.AzureDbForMySql' : exports.ConnectToTargetAzureDbForMySqlTaskProperties, + 'ProjectTaskProperties.ConnectToTarget.AzureSqlDbMI.Sync.LRS' : exports.ConnectToTargetSqlMISyncTaskProperties, 'ProjectTaskProperties.ConnectToTarget.AzureSqlDbMI' : exports.ConnectToTargetSqlMITaskProperties, 'ProjectTaskProperties.GetUserTables.AzureSqlDb.Sync' : exports.GetUserTablesSqlSyncTaskProperties, 'ProjectTaskProperties.GetUserTables.Sql' : exports.GetUserTablesSqlTaskProperties, + 'ProjectTaskProperties.ConnectToTarget.AzureDbForPostgreSql.Sync' : exports.ConnectToTargetAzureDbForPostgreSqlSyncTaskProperties, 'ProjectTaskProperties.ConnectToTarget.SqlDb.Sync' : exports.ConnectToTargetSqlSqlDbSyncTaskProperties, 'ProjectTaskProperties.ConnectToTarget.SqlDb' : exports.ConnectToTargetSqlDbTaskProperties, + 'ProjectTaskProperties.ConnectToSource.PostgreSql.Sync' : exports.ConnectToSourcePostgreSqlSyncTaskProperties, 'ConnectToSourceSqlServerTaskOutput.AgentJobLevelOutput' : exports.ConnectToSourceSqlServerTaskOutputAgentJobLevel, 'ConnectToSourceSqlServerTaskOutput.LoginLevelOutput' : exports.ConnectToSourceSqlServerTaskOutputLoginLevel, 'ConnectToSourceSqlServerTaskOutput.DatabaseLevelOutput' : exports.ConnectToSourceSqlServerTaskOutputDatabaseLevel, diff --git a/lib/services/datamigrationManagement/lib/models/miSqlConnectionInfo.js b/lib/services/datamigrationManagement/lib/models/miSqlConnectionInfo.js new file mode 100644 index 0000000000..100ed84bdc --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/miSqlConnectionInfo.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Properties required to create a connection to Azure SQL database Managed + * instance + * + * @extends models['ConnectionInfo'] + */ +class MiSqlConnectionInfo extends models['ConnectionInfo'] { + /** + * Create a MiSqlConnectionInfo. + * @property {string} managedInstanceResourceId Resource id for Azure SQL + * database Managed instance + */ + constructor() { + super(); + } + + /** + * Defines the metadata of MiSqlConnectionInfo + * + * @returns {object} metadata of MiSqlConnectionInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'MiSqlConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'MiSqlConnectionInfo', + modelProperties: { + userName: { + required: false, + serializedName: 'userName', + type: { + name: 'String' + } + }, + password: { + required: false, + serializedName: 'password', + type: { + name: 'String' + } + }, + type: { + required: true, + serializedName: 'type', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + managedInstanceResourceId: { + required: true, + serializedName: 'managedInstanceResourceId', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = MiSqlConnectionInfo; diff --git a/lib/services/datamigrationManagement/lib/models/migrateMISyncCompleteCommandInput.js b/lib/services/datamigrationManagement/lib/models/migrateMISyncCompleteCommandInput.js new file mode 100644 index 0000000000..bf014548a9 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/migrateMISyncCompleteCommandInput.js @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Input for command that completes online migration for an Azure SQL Database + * Managed Instance. + * + */ +class MigrateMISyncCompleteCommandInput { + /** + * Create a MigrateMISyncCompleteCommandInput. + * @property {string} sourceDatabaseName Name of managed instance database + */ + constructor() { + } + + /** + * Defines the metadata of MigrateMISyncCompleteCommandInput + * + * @returns {object} metadata of MigrateMISyncCompleteCommandInput + * + */ + mapper() { + return { + required: false, + serializedName: 'MigrateMISyncCompleteCommandInput', + type: { + name: 'Composite', + className: 'MigrateMISyncCompleteCommandInput', + modelProperties: { + sourceDatabaseName: { + required: true, + serializedName: 'sourceDatabaseName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = MigrateMISyncCompleteCommandInput; diff --git a/lib/services/datamigrationManagement/lib/models/migrateMISyncCompleteCommandOutput.js b/lib/services/datamigrationManagement/lib/models/migrateMISyncCompleteCommandOutput.js new file mode 100644 index 0000000000..5af4bb87d2 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/migrateMISyncCompleteCommandOutput.js @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Output for command that completes online migration for an Azure SQL Database + * Managed Instance. + * + */ +class MigrateMISyncCompleteCommandOutput { + /** + * Create a MigrateMISyncCompleteCommandOutput. + * @property {array} [errors] List of errors that happened during the command + * execution + */ + constructor() { + } + + /** + * Defines the metadata of MigrateMISyncCompleteCommandOutput + * + * @returns {object} metadata of MigrateMISyncCompleteCommandOutput + * + */ + mapper() { + return { + required: false, + serializedName: 'MigrateMISyncCompleteCommandOutput', + type: { + name: 'Composite', + className: 'MigrateMISyncCompleteCommandOutput', + modelProperties: { + errors: { + required: false, + serializedName: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ReportableExceptionElementType', + type: { + name: 'Composite', + className: 'ReportableException' + } + } + } + } + } + } + }; + } +} + +module.exports = MigrateMISyncCompleteCommandOutput; diff --git a/lib/services/datamigrationManagement/lib/models/migrateMISyncCompleteCommandProperties.js b/lib/services/datamigrationManagement/lib/models/migrateMISyncCompleteCommandProperties.js new file mode 100644 index 0000000000..a7c9e687e2 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/migrateMISyncCompleteCommandProperties.js @@ -0,0 +1,109 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Properties for the command that completes online migration for an Azure SQL + * Database Managed Instance. + * + * @extends models['CommandProperties'] + */ +class MigrateMISyncCompleteCommandProperties extends models['CommandProperties'] { + /** + * Create a MigrateMISyncCompleteCommandProperties. + * @property {object} [input] Command input + * @property {string} [input.sourceDatabaseName] Name of managed instance + * database + * @property {object} [output] Command output. This is ignored if submitted. + * @property {array} [output.errors] List of errors that happened during the + * command execution + */ + constructor() { + super(); + } + + /** + * Defines the metadata of MigrateMISyncCompleteCommandProperties + * + * @returns {object} metadata of MigrateMISyncCompleteCommandProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'Migrate.SqlServer.AzureDbSqlMi.Complete', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'commandType', + clientName: 'commandType' + }, + uberParent: 'CommandProperties', + className: 'MigrateMISyncCompleteCommandProperties', + modelProperties: { + errors: { + required: false, + readOnly: true, + serializedName: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ODataErrorElementType', + type: { + name: 'Composite', + className: 'ODataError' + } + } + } + }, + state: { + required: false, + readOnly: true, + serializedName: 'state', + type: { + name: 'String' + } + }, + commandType: { + required: true, + serializedName: 'commandType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + input: { + required: false, + serializedName: 'input', + type: { + name: 'Composite', + className: 'MigrateMISyncCompleteCommandInput' + } + }, + output: { + required: false, + readOnly: true, + serializedName: 'output', + type: { + name: 'Composite', + className: 'MigrateMISyncCompleteCommandOutput' + } + } + } + } + }; + } +} + +module.exports = MigrateMISyncCompleteCommandProperties; diff --git a/lib/services/datamigrationManagement/lib/models/migrateMySqlAzureDbForMySqlSyncDatabaseInput.js b/lib/services/datamigrationManagement/lib/models/migrateMySqlAzureDbForMySqlSyncDatabaseInput.js index 9e4d892d37..4b4fd64652 100644 --- a/lib/services/datamigrationManagement/lib/models/migrateMySqlAzureDbForMySqlSyncDatabaseInput.js +++ b/lib/services/datamigrationManagement/lib/models/migrateMySqlAzureDbForMySqlSyncDatabaseInput.js @@ -21,6 +21,12 @@ class MigrateMySqlAzureDbForMySqlSyncDatabaseInput { * @property {string} [name] Name of the database * @property {string} [targetDatabaseName] Name of target database. Note: * Target database will be truncated before starting migration. + * @property {object} [migrationSetting] Migration settings which tune the + * migration behavior + * @property {object} [sourceSetting] Source settings to tune source endpoint + * migration behavior + * @property {object} [targetSetting] Target settings to tune target endpoint + * migration behavior */ constructor() { } @@ -52,6 +58,48 @@ class MigrateMySqlAzureDbForMySqlSyncDatabaseInput { type: { name: 'String' } + }, + migrationSetting: { + required: false, + serializedName: 'migrationSetting', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sourceSetting: { + required: false, + serializedName: 'sourceSetting', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + targetSetting: { + required: false, + serializedName: 'targetSetting', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } } } } diff --git a/lib/services/datamigrationManagement/lib/models/migratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.js b/lib/services/datamigrationManagement/lib/models/migratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.js index 8d71f4a7b6..2ea99ce5d6 100644 --- a/lib/services/datamigrationManagement/lib/models/migratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.js +++ b/lib/services/datamigrationManagement/lib/models/migratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput.js @@ -21,6 +21,12 @@ class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput { * @property {string} [name] Name of the database * @property {string} [targetDatabaseName] Name of target database. Note: * Target database will be truncated before starting migration. + * @property {object} [migrationSetting] Migration settings which tune the + * migration behavior + * @property {object} [sourceSetting] Source settings to tune source endpoint + * migration behavior + * @property {object} [targetSetting] Target settings to tune target endpoint + * migration behavior */ constructor() { } @@ -52,6 +58,48 @@ class MigratePostgreSqlAzureDbForPostgreSqlSyncDatabaseInput { type: { name: 'String' } + }, + migrationSetting: { + required: false, + serializedName: 'migrationSetting', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + sourceSetting: { + required: false, + serializedName: 'sourceSetting', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + targetSetting: { + required: false, + serializedName: 'targetSetting', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } } } } diff --git a/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskInput.js b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskInput.js new file mode 100644 index 0000000000..ad57540004 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskInput.js @@ -0,0 +1,113 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Input for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance online scenario. + * + * @extends models['SqlServerSqlMISyncTaskInput'] + */ +class MigrateSqlServerSqlMISyncTaskInput extends models['SqlServerSqlMISyncTaskInput'] { + /** + * Create a MigrateSqlServerSqlMISyncTaskInput. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of MigrateSqlServerSqlMISyncTaskInput + * + * @returns {object} metadata of MigrateSqlServerSqlMISyncTaskInput + * + */ + mapper() { + return { + required: false, + serializedName: 'MigrateSqlServerSqlMISyncTaskInput', + type: { + name: 'Composite', + className: 'MigrateSqlServerSqlMISyncTaskInput', + modelProperties: { + selectedDatabases: { + required: true, + serializedName: 'selectedDatabases', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MigrateSqlServerSqlMIDatabaseInputElementType', + type: { + name: 'Composite', + className: 'MigrateSqlServerSqlMIDatabaseInput' + } + } + } + }, + backupFileShare: { + required: false, + serializedName: 'backupFileShare', + type: { + name: 'Composite', + className: 'FileShare' + } + }, + storageResourceId: { + required: true, + serializedName: 'storageResourceId', + type: { + name: 'String' + } + }, + sourceConnectionInfo: { + required: true, + serializedName: 'sourceConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'SqlConnectionInfo' + } + }, + targetConnectionInfo: { + required: true, + serializedName: 'targetConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'MiSqlConnectionInfo' + } + }, + azureApp: { + required: true, + serializedName: 'azureApp', + type: { + name: 'Composite', + className: 'AzureActiveDirectoryApp' + } + } + } + } + }; + } +} + +module.exports = MigrateSqlServerSqlMISyncTaskInput; diff --git a/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutput.js b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutput.js new file mode 100644 index 0000000000..e12a6761fa --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutput.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Output for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance using Log Replay Service. + * + */ +class MigrateSqlServerSqlMISyncTaskOutput { + /** + * Create a MigrateSqlServerSqlMISyncTaskOutput. + * @property {string} [id] Result identifier + * @property {string} resultType Polymorphic Discriminator + */ + constructor() { + } + + /** + * Defines the metadata of MigrateSqlServerSqlMISyncTaskOutput + * + * @returns {object} metadata of MigrateSqlServerSqlMISyncTaskOutput + * + */ + mapper() { + return { + required: false, + serializedName: 'MigrateSqlServerSqlMISyncTaskOutput', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'resultType', + clientName: 'resultType' + }, + uberParent: 'MigrateSqlServerSqlMISyncTaskOutput', + className: 'MigrateSqlServerSqlMISyncTaskOutput', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + resultType: { + required: true, + serializedName: 'resultType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = MigrateSqlServerSqlMISyncTaskOutput; diff --git a/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutputDatabaseLevel.js b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutputDatabaseLevel.js new file mode 100644 index 0000000000..f9d8429817 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutputDatabaseLevel.js @@ -0,0 +1,238 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Class representing a MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel. + * @extends models['MigrateSqlServerSqlMISyncTaskOutput'] + */ +class MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel extends models['MigrateSqlServerSqlMISyncTaskOutput'] { + /** + * Create a MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel. + * @property {string} [sourceDatabaseName] Name of the database + * @property {string} [migrationState] Current state of database. Possible + * values include: 'UNDEFINED', 'INITIAL', 'FULL_BACKUP_UPLOAD_START', + * 'LOG_SHIPPING_START', 'UPLOAD_LOG_FILES_START', 'CUTOVER_START', + * 'POST_CUTOVER_COMPLETE', 'COMPLETED', 'CANCELLED', 'FAILED' + * @property {date} [startedOn] Database migration start time + * @property {date} [endedOn] Database migration end time + * @property {object} [fullBackupSetInfo] Details of full backup set + * @property {string} [fullBackupSetInfo.backupSetId] Id for the set of + * backup files + * @property {string} [fullBackupSetInfo.firstLsn] First log sequence number + * of the backup file + * @property {string} [fullBackupSetInfo.lastLsn] Last log sequence number of + * the backup file + * @property {date} [fullBackupSetInfo.lastModifiedTime] Last modified time + * of the backup file in share location + * @property {string} [fullBackupSetInfo.backupType] Enum of the different + * backup types. Possible values include: 'Database', 'TransactionLog', + * 'File', 'DifferentialDatabase', 'DifferentialFile', 'Partial', + * 'DifferentialPartial' + * @property {array} [fullBackupSetInfo.listOfBackupFiles] List of files in + * the backup set + * @property {string} [fullBackupSetInfo.databaseName] Name of the database + * to which the backup set belongs + * @property {date} [fullBackupSetInfo.backupStartDate] Date and time that + * the backup operation began + * @property {date} [fullBackupSetInfo.backupFinishedDate] Date and time that + * the backup operation finished + * @property {boolean} [fullBackupSetInfo.isBackupRestored] Whether the + * backup set is restored or not + * @property {object} [lastRestoredBackupSetInfo] Last applied backup set + * information + * @property {string} [lastRestoredBackupSetInfo.backupSetId] Id for the set + * of backup files + * @property {string} [lastRestoredBackupSetInfo.firstLsn] First log sequence + * number of the backup file + * @property {string} [lastRestoredBackupSetInfo.lastLsn] Last log sequence + * number of the backup file + * @property {date} [lastRestoredBackupSetInfo.lastModifiedTime] Last + * modified time of the backup file in share location + * @property {string} [lastRestoredBackupSetInfo.backupType] Enum of the + * different backup types. Possible values include: 'Database', + * 'TransactionLog', 'File', 'DifferentialDatabase', 'DifferentialFile', + * 'Partial', 'DifferentialPartial' + * @property {array} [lastRestoredBackupSetInfo.listOfBackupFiles] List of + * files in the backup set + * @property {string} [lastRestoredBackupSetInfo.databaseName] Name of the + * database to which the backup set belongs + * @property {date} [lastRestoredBackupSetInfo.backupStartDate] Date and time + * that the backup operation began + * @property {date} [lastRestoredBackupSetInfo.backupFinishedDate] Date and + * time that the backup operation finished + * @property {boolean} [lastRestoredBackupSetInfo.isBackupRestored] Whether + * the backup set is restored or not + * @property {array} [activeBackupSets] Backup sets that are currently active + * (Either being uploaded or getting restored) + * @property {string} [containerName] Name of container created in the Azure + * Storage account where backups are copied to + * @property {string} [errorPrefix] prefix string to use for querying errors + * for this database + * @property {boolean} [isFullBackupRestored] Whether full backup has been + * applied to the target database or not + * @property {array} [exceptionsAndWarnings] Migration exceptions and + * warnings + */ + constructor() { + super(); + } + + /** + * Defines the metadata of MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel + * + * @returns {object} metadata of MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel + * + */ + mapper() { + return { + required: false, + serializedName: 'DatabaseLevelOutput', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'resultType', + clientName: 'resultType' + }, + uberParent: 'MigrateSqlServerSqlMISyncTaskOutput', + className: 'MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + resultType: { + required: true, + serializedName: 'resultType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + sourceDatabaseName: { + required: false, + readOnly: true, + serializedName: 'sourceDatabaseName', + type: { + name: 'String' + } + }, + migrationState: { + required: false, + readOnly: true, + serializedName: 'migrationState', + type: { + name: 'String' + } + }, + startedOn: { + required: false, + readOnly: true, + serializedName: 'startedOn', + type: { + name: 'DateTime' + } + }, + endedOn: { + required: false, + readOnly: true, + serializedName: 'endedOn', + type: { + name: 'DateTime' + } + }, + fullBackupSetInfo: { + required: false, + readOnly: true, + serializedName: 'fullBackupSetInfo', + type: { + name: 'Composite', + className: 'BackupSetInfo' + } + }, + lastRestoredBackupSetInfo: { + required: false, + readOnly: true, + serializedName: 'lastRestoredBackupSetInfo', + type: { + name: 'Composite', + className: 'BackupSetInfo' + } + }, + activeBackupSets: { + required: false, + readOnly: true, + serializedName: 'activeBackupSets', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'BackupSetInfoElementType', + type: { + name: 'Composite', + className: 'BackupSetInfo' + } + } + } + }, + containerName: { + required: false, + readOnly: true, + serializedName: 'containerName', + type: { + name: 'String' + } + }, + errorPrefix: { + required: false, + readOnly: true, + serializedName: 'errorPrefix', + type: { + name: 'String' + } + }, + isFullBackupRestored: { + required: false, + readOnly: true, + serializedName: 'isFullBackupRestored', + type: { + name: 'Boolean' + } + }, + exceptionsAndWarnings: { + required: false, + readOnly: true, + serializedName: 'exceptionsAndWarnings', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ReportableExceptionElementType', + type: { + name: 'Composite', + className: 'ReportableException' + } + } + } + } + } + } + }; + } +} + +module.exports = MigrateSqlServerSqlMISyncTaskOutputDatabaseLevel; diff --git a/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutputError.js b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutputError.js new file mode 100644 index 0000000000..e2697317ce --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutputError.js @@ -0,0 +1,88 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Class representing a MigrateSqlServerSqlMISyncTaskOutputError. + * @extends models['MigrateSqlServerSqlMISyncTaskOutput'] + */ +class MigrateSqlServerSqlMISyncTaskOutputError extends models['MigrateSqlServerSqlMISyncTaskOutput'] { + /** + * Create a MigrateSqlServerSqlMISyncTaskOutputError. + * @property {object} [error] Migration error + * @property {string} [error.message] Error message + * @property {string} [error.actionableMessage] Actionable steps for this + * exception + * @property {string} [error.filePath] The path to the file where exception + * occurred + * @property {string} [error.lineNumber] The line number where exception + * occurred + * @property {number} [error.hResult] Coded numerical value that is assigned + * to a specific exception + * @property {string} [error.stackTrace] Stack trace + */ + constructor() { + super(); + } + + /** + * Defines the metadata of MigrateSqlServerSqlMISyncTaskOutputError + * + * @returns {object} metadata of MigrateSqlServerSqlMISyncTaskOutputError + * + */ + mapper() { + return { + required: false, + serializedName: 'ErrorOutput', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'resultType', + clientName: 'resultType' + }, + uberParent: 'MigrateSqlServerSqlMISyncTaskOutput', + className: 'MigrateSqlServerSqlMISyncTaskOutputError', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + resultType: { + required: true, + serializedName: 'resultType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + error: { + required: false, + readOnly: true, + serializedName: 'error', + type: { + name: 'Composite', + className: 'ReportableException' + } + } + } + } + }; + } +} + +module.exports = MigrateSqlServerSqlMISyncTaskOutputError; diff --git a/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutputMigrationLevel.js b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutputMigrationLevel.js new file mode 100644 index 0000000000..78ee4501a1 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskOutputMigrationLevel.js @@ -0,0 +1,169 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Class representing a MigrateSqlServerSqlMISyncTaskOutputMigrationLevel. + * @extends models['MigrateSqlServerSqlMISyncTaskOutput'] + */ +class MigrateSqlServerSqlMISyncTaskOutputMigrationLevel extends models['MigrateSqlServerSqlMISyncTaskOutput'] { + /** + * Create a MigrateSqlServerSqlMISyncTaskOutputMigrationLevel. + * @property {number} [databaseCount] Count of databases + * @property {string} [state] Current state of migration. Possible values + * include: 'None', 'InProgress', 'Failed', 'Warning', 'Completed', + * 'Skipped', 'Stopped' + * @property {date} [startedOn] Migration start time + * @property {date} [endedOn] Migration end time + * @property {string} [sourceServerName] Source server name + * @property {string} [sourceServerVersion] Source server version + * @property {string} [sourceServerBrandVersion] Source server brand version + * @property {string} [targetServerName] Target server name + * @property {string} [targetServerVersion] Target server version + * @property {string} [targetServerBrandVersion] Target server brand version + * @property {number} [databaseErrorCount] Number of database level errors + */ + constructor() { + super(); + } + + /** + * Defines the metadata of MigrateSqlServerSqlMISyncTaskOutputMigrationLevel + * + * @returns {object} metadata of MigrateSqlServerSqlMISyncTaskOutputMigrationLevel + * + */ + mapper() { + return { + required: false, + serializedName: 'MigrationLevelOutput', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'resultType', + clientName: 'resultType' + }, + uberParent: 'MigrateSqlServerSqlMISyncTaskOutput', + className: 'MigrateSqlServerSqlMISyncTaskOutputMigrationLevel', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + resultType: { + required: true, + serializedName: 'resultType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + databaseCount: { + required: false, + readOnly: true, + serializedName: 'databaseCount', + type: { + name: 'Number' + } + }, + state: { + required: false, + readOnly: true, + serializedName: 'state', + type: { + name: 'String' + } + }, + startedOn: { + required: false, + readOnly: true, + serializedName: 'startedOn', + type: { + name: 'DateTime' + } + }, + endedOn: { + required: false, + readOnly: true, + serializedName: 'endedOn', + type: { + name: 'DateTime' + } + }, + sourceServerName: { + required: false, + readOnly: true, + serializedName: 'sourceServerName', + type: { + name: 'String' + } + }, + sourceServerVersion: { + required: false, + readOnly: true, + serializedName: 'sourceServerVersion', + type: { + name: 'String' + } + }, + sourceServerBrandVersion: { + required: false, + readOnly: true, + serializedName: 'sourceServerBrandVersion', + type: { + name: 'String' + } + }, + targetServerName: { + required: false, + readOnly: true, + serializedName: 'targetServerName', + type: { + name: 'String' + } + }, + targetServerVersion: { + required: false, + readOnly: true, + serializedName: 'targetServerVersion', + type: { + name: 'String' + } + }, + targetServerBrandVersion: { + required: false, + readOnly: true, + serializedName: 'targetServerBrandVersion', + type: { + name: 'String' + } + }, + databaseErrorCount: { + required: false, + readOnly: true, + serializedName: 'databaseErrorCount', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = MigrateSqlServerSqlMISyncTaskOutputMigrationLevel; diff --git a/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskProperties.js b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskProperties.js new file mode 100644 index 0000000000..3ae5964b13 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMISyncTaskProperties.js @@ -0,0 +1,152 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Properties for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance sync scenario + * + * @extends models['ProjectTaskProperties'] + */ +class MigrateSqlServerSqlMISyncTaskProperties extends models['ProjectTaskProperties'] { + /** + * Create a MigrateSqlServerSqlMISyncTaskProperties. + * @property {object} [input] Task input + * @property {array} [output] Task output. This is ignored if submitted. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of MigrateSqlServerSqlMISyncTaskProperties + * + * @returns {object} metadata of MigrateSqlServerSqlMISyncTaskProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'Migrate.SqlServer.AzureSqlDbMI.Sync.LRS', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'taskType', + clientName: 'taskType' + }, + uberParent: 'ProjectTaskProperties', + className: 'MigrateSqlServerSqlMISyncTaskProperties', + modelProperties: { + errors: { + required: false, + readOnly: true, + serializedName: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ODataErrorElementType', + type: { + name: 'Composite', + className: 'ODataError' + } + } + } + }, + state: { + required: false, + readOnly: true, + serializedName: 'state', + type: { + name: 'String' + } + }, + commands: { + required: false, + readOnly: true, + serializedName: 'commands', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CommandPropertiesElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'commandType', + clientName: 'commandType' + }, + uberParent: 'CommandProperties', + className: 'CommandProperties' + } + } + } + }, + clientData: { + required: false, + serializedName: 'clientData', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + taskType: { + required: true, + serializedName: 'taskType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + input: { + required: false, + serializedName: 'input', + type: { + name: 'Composite', + className: 'MigrateSqlServerSqlMISyncTaskInput' + } + }, + output: { + required: false, + readOnly: true, + serializedName: 'output', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MigrateSqlServerSqlMISyncTaskOutputElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'resultType', + clientName: 'resultType' + }, + uberParent: 'MigrateSqlServerSqlMISyncTaskOutput', + className: 'MigrateSqlServerSqlMISyncTaskOutput' + } + } + } + } + } + } + }; + } +} + +module.exports = MigrateSqlServerSqlMISyncTaskProperties; diff --git a/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMITaskOutputMigrationLevel.js b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMITaskOutputMigrationLevel.js index bbf2574915..3ac5e352e7 100644 --- a/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMITaskOutputMigrationLevel.js +++ b/lib/services/datamigrationManagement/lib/models/migrateSqlServerSqlMITaskOutputMigrationLevel.js @@ -34,8 +34,7 @@ class MigrateSqlServerSqlMITaskOutputMigrationLevel extends models['MigrateSqlSe * @property {string} [message] Migration progress message * @property {object} [serverRoleResults] Map of server role migration * results. - * @property {object} [orphanedUsers] Map of users to database name of - * orphaned users. + * @property {array} [orphanedUsersInfo] List of orphaned users. * @property {object} [databases] Selected databases as a map from database * name to database id * @property {string} [sourceServerVersion] Source server version @@ -170,17 +169,18 @@ class MigrateSqlServerSqlMITaskOutputMigrationLevel extends models['MigrateSqlSe } } }, - orphanedUsers: { + orphanedUsersInfo: { required: false, readOnly: true, - serializedName: 'orphanedUsers', + serializedName: 'orphanedUsersInfo', type: { - name: 'Dictionary', - value: { + name: 'Sequence', + element: { required: false, - serializedName: 'StringElementType', + serializedName: 'OrphanedUserInfoElementType', type: { - name: 'String' + name: 'Composite', + className: 'OrphanedUserInfo' } } } diff --git a/lib/services/datamigrationManagement/lib/models/migrateSyncCompleteCommandOutput.js b/lib/services/datamigrationManagement/lib/models/migrateSyncCompleteCommandOutput.js index 32d29e22f3..889d2ba9b2 100644 --- a/lib/services/datamigrationManagement/lib/models/migrateSyncCompleteCommandOutput.js +++ b/lib/services/datamigrationManagement/lib/models/migrateSyncCompleteCommandOutput.js @@ -17,6 +17,7 @@ class MigrateSyncCompleteCommandOutput { /** * Create a MigrateSyncCompleteCommandOutput. + * @property {string} [id] Result identifier * @property {array} [errors] List of errors that happened during the command * execution */ @@ -37,8 +38,17 @@ class MigrateSyncCompleteCommandOutput { name: 'Composite', className: 'MigrateSyncCompleteCommandOutput', modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, errors: { required: false, + readOnly: true, serializedName: 'errors', type: { name: 'Sequence', diff --git a/lib/services/datamigrationManagement/lib/models/migrateSyncCompleteCommandProperties.js b/lib/services/datamigrationManagement/lib/models/migrateSyncCompleteCommandProperties.js index 2a422ab098..1d1c17fc3d 100644 --- a/lib/services/datamigrationManagement/lib/models/migrateSyncCompleteCommandProperties.js +++ b/lib/services/datamigrationManagement/lib/models/migrateSyncCompleteCommandProperties.js @@ -24,6 +24,7 @@ class MigrateSyncCompleteCommandProperties extends models['CommandProperties'] { * @property {string} [input.databaseName] Name of database * @property {date} [input.commitTimeStamp] Time stamp to complete * @property {object} [output] Command output. This is ignored if submitted. + * @property {string} [output.id] Result identifier * @property {array} [output.errors] List of errors that happened during the * command execution */ diff --git a/lib/services/datamigrationManagement/lib/models/orphanedUserInfo.js b/lib/services/datamigrationManagement/lib/models/orphanedUserInfo.js new file mode 100644 index 0000000000..1d4fb37922 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/orphanedUserInfo.js @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Information of orphaned users on the SQL server database. + * + */ +class OrphanedUserInfo { + /** + * Create a OrphanedUserInfo. + * @property {string} [name] Name of the orphaned user + * @property {string} [databaseName] Parent database of the user + */ + constructor() { + } + + /** + * Defines the metadata of OrphanedUserInfo + * + * @returns {object} metadata of OrphanedUserInfo + * + */ + mapper() { + return { + required: false, + serializedName: 'OrphanedUserInfo', + type: { + name: 'Composite', + className: 'OrphanedUserInfo', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + databaseName: { + required: false, + serializedName: 'databaseName', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = OrphanedUserInfo; diff --git a/lib/services/datamigrationManagement/lib/models/projectFile.js b/lib/services/datamigrationManagement/lib/models/projectFile.js index 6cb61de9e0..ae1c94821f 100644 --- a/lib/services/datamigrationManagement/lib/models/projectFile.js +++ b/lib/services/datamigrationManagement/lib/models/projectFile.js @@ -30,7 +30,7 @@ class ProjectFile extends models['Resource'] { * resource. This property can be set when creating or updating the file * resource. * @property {date} [properties.lastModified] Modification DateTime. - * @property {string} [properties.mediaType] File content type. This propery + * @property {string} [properties.mediaType] File content type. This property * can be modified to reflect the file content type. * @property {number} [properties.size] File size. */ diff --git a/lib/services/datamigrationManagement/lib/models/projectFileProperties.js b/lib/services/datamigrationManagement/lib/models/projectFileProperties.js index ece0e8945f..0a43dbd138 100644 --- a/lib/services/datamigrationManagement/lib/models/projectFileProperties.js +++ b/lib/services/datamigrationManagement/lib/models/projectFileProperties.js @@ -23,7 +23,7 @@ class ProjectFileProperties { * @property {string} [filePath] Relative path of this file resource. This * property can be set when creating or updating the file resource. * @property {date} [lastModified] Modification DateTime. - * @property {string} [mediaType] File content type. This propery can be + * @property {string} [mediaType] File content type. This property can be * modified to reflect the file content type. * @property {number} [size] File size. */ diff --git a/lib/services/datamigrationManagement/lib/models/resourceSkuCapabilities.js b/lib/services/datamigrationManagement/lib/models/resourceSkuCapabilities.js index 731a89aa13..dd0c24728b 100644 --- a/lib/services/datamigrationManagement/lib/models/resourceSkuCapabilities.js +++ b/lib/services/datamigrationManagement/lib/models/resourceSkuCapabilities.js @@ -11,7 +11,7 @@ 'use strict'; /** - * Describes The SKU capabilites object. + * Describes The SKU capabilities object. * */ class ResourceSkuCapabilities { diff --git a/lib/services/datamigrationManagement/lib/models/selectedCertificateInput.js b/lib/services/datamigrationManagement/lib/models/selectedCertificateInput.js index 65557c14e2..d62a27735e 100644 --- a/lib/services/datamigrationManagement/lib/models/selectedCertificateInput.js +++ b/lib/services/datamigrationManagement/lib/models/selectedCertificateInput.js @@ -11,7 +11,7 @@ 'use strict'; /** - * Info for ertificate to be exported for TDE enabled databases. + * Info for certificate to be exported for TDE enabled databases. * */ class SelectedCertificateInput { diff --git a/lib/services/datamigrationManagement/lib/models/sqlServerSqlMISyncTaskInput.js b/lib/services/datamigrationManagement/lib/models/sqlServerSqlMISyncTaskInput.js new file mode 100644 index 0000000000..551c26fcb7 --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/sqlServerSqlMISyncTaskInput.js @@ -0,0 +1,146 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Input for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance online scenario. + * + */ +class SqlServerSqlMISyncTaskInput { + /** + * Create a SqlServerSqlMISyncTaskInput. + * @property {array} selectedDatabases Databases to migrate + * @property {object} [backupFileShare] Backup file share information for all + * selected databases. + * @property {string} [backupFileShare.userName] User name credential to + * connect to the share location + * @property {string} [backupFileShare.password] Password credential used to + * connect to the share location. + * @property {string} [backupFileShare.path] The folder path for this share. + * @property {string} storageResourceId Fully qualified resourceId of storage + * @property {object} sourceConnectionInfo Connection information for source + * SQL Server + * @property {string} [sourceConnectionInfo.dataSource] Data source in the + * format Protocol:MachineName\SQLServerInstanceName,PortNumber + * @property {string} [sourceConnectionInfo.authentication] Authentication + * type to use for connection. Possible values include: 'None', + * 'WindowsAuthentication', 'SqlAuthentication', 'ActiveDirectoryIntegrated', + * 'ActiveDirectoryPassword' + * @property {boolean} [sourceConnectionInfo.encryptConnection] Whether to + * encrypt the connection + * @property {string} [sourceConnectionInfo.additionalSettings] Additional + * connection settings + * @property {boolean} [sourceConnectionInfo.trustServerCertificate] Whether + * to trust the server certificate + * @property {string} [sourceConnectionInfo.platform] Server platform type + * for connection. Possible values include: 'SqlOnPrem' + * @property {object} targetConnectionInfo Connection information for Azure + * SQL Database Managed Instance + * @property {string} [targetConnectionInfo.managedInstanceResourceId] + * Resource id for Azure SQL database Managed instance + * @property {object} azureApp Azure Active Directory Application the DMS + * instance will use to connect to the target instance of Azure SQL Database + * Managed Instance and the Azure Storage Account + * @property {string} [azureApp.applicationId] Application ID of the Azure + * Active Directory Application + * @property {string} [azureApp.appKey] Key used to authenticate to the Azure + * Active Directory Application + * @property {string} [azureApp.tenantId] Tenant id of the customer + */ + constructor() { + } + + /** + * Defines the metadata of SqlServerSqlMISyncTaskInput + * + * @returns {object} metadata of SqlServerSqlMISyncTaskInput + * + */ + mapper() { + return { + required: false, + serializedName: 'SqlServerSqlMISyncTaskInput', + type: { + name: 'Composite', + className: 'SqlServerSqlMISyncTaskInput', + modelProperties: { + selectedDatabases: { + required: true, + serializedName: 'selectedDatabases', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MigrateSqlServerSqlMIDatabaseInputElementType', + type: { + name: 'Composite', + className: 'MigrateSqlServerSqlMIDatabaseInput' + } + } + } + }, + backupFileShare: { + required: false, + serializedName: 'backupFileShare', + type: { + name: 'Composite', + className: 'FileShare' + } + }, + storageResourceId: { + required: true, + serializedName: 'storageResourceId', + type: { + name: 'String' + } + }, + sourceConnectionInfo: { + required: true, + serializedName: 'sourceConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'SqlConnectionInfo' + } + }, + targetConnectionInfo: { + required: true, + serializedName: 'targetConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'MiSqlConnectionInfo' + } + }, + azureApp: { + required: true, + serializedName: 'azureApp', + type: { + name: 'Composite', + className: 'AzureActiveDirectoryApp' + } + } + } + } + }; + } +} + +module.exports = SqlServerSqlMISyncTaskInput; diff --git a/lib/services/datamigrationManagement/lib/models/validateMigrationInputSqlServerSqlMISyncTaskInput.js b/lib/services/datamigrationManagement/lib/models/validateMigrationInputSqlServerSqlMISyncTaskInput.js new file mode 100644 index 0000000000..a55203d04d --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/validateMigrationInputSqlServerSqlMISyncTaskInput.js @@ -0,0 +1,113 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Input for task that migrates SQL Server databases to Azure SQL Database + * Managed Instance online scenario. + * + * @extends models['SqlServerSqlMISyncTaskInput'] + */ +class ValidateMigrationInputSqlServerSqlMISyncTaskInput extends models['SqlServerSqlMISyncTaskInput'] { + /** + * Create a ValidateMigrationInputSqlServerSqlMISyncTaskInput. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ValidateMigrationInputSqlServerSqlMISyncTaskInput + * + * @returns {object} metadata of ValidateMigrationInputSqlServerSqlMISyncTaskInput + * + */ + mapper() { + return { + required: false, + serializedName: 'ValidateMigrationInputSqlServerSqlMISyncTaskInput', + type: { + name: 'Composite', + className: 'ValidateMigrationInputSqlServerSqlMISyncTaskInput', + modelProperties: { + selectedDatabases: { + required: true, + serializedName: 'selectedDatabases', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'MigrateSqlServerSqlMIDatabaseInputElementType', + type: { + name: 'Composite', + className: 'MigrateSqlServerSqlMIDatabaseInput' + } + } + } + }, + backupFileShare: { + required: false, + serializedName: 'backupFileShare', + type: { + name: 'Composite', + className: 'FileShare' + } + }, + storageResourceId: { + required: true, + serializedName: 'storageResourceId', + type: { + name: 'String' + } + }, + sourceConnectionInfo: { + required: true, + serializedName: 'sourceConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'SqlConnectionInfo' + } + }, + targetConnectionInfo: { + required: true, + serializedName: 'targetConnectionInfo', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'type', + clientName: 'type' + }, + uberParent: 'ConnectionInfo', + className: 'MiSqlConnectionInfo' + } + }, + azureApp: { + required: true, + serializedName: 'azureApp', + type: { + name: 'Composite', + className: 'AzureActiveDirectoryApp' + } + } + } + } + }; + } +} + +module.exports = ValidateMigrationInputSqlServerSqlMISyncTaskInput; diff --git a/lib/services/datamigrationManagement/lib/models/validateMigrationInputSqlServerSqlMISyncTaskOutput.js b/lib/services/datamigrationManagement/lib/models/validateMigrationInputSqlServerSqlMISyncTaskOutput.js new file mode 100644 index 0000000000..3aca37400b --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/validateMigrationInputSqlServerSqlMISyncTaskOutput.js @@ -0,0 +1,81 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Output for task that validates migration input for Azure SQL Database + * Managed Instance online migration + * + */ +class ValidateMigrationInputSqlServerSqlMISyncTaskOutput { + /** + * Create a ValidateMigrationInputSqlServerSqlMISyncTaskOutput. + * @property {string} [id] Database identifier + * @property {string} [name] Name of database + * @property {array} [validationErrors] Errors associated with a selected + * database object + */ + constructor() { + } + + /** + * Defines the metadata of ValidateMigrationInputSqlServerSqlMISyncTaskOutput + * + * @returns {object} metadata of ValidateMigrationInputSqlServerSqlMISyncTaskOutput + * + */ + mapper() { + return { + required: false, + serializedName: 'ValidateMigrationInputSqlServerSqlMISyncTaskOutput', + type: { + name: 'Composite', + className: 'ValidateMigrationInputSqlServerSqlMISyncTaskOutput', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + validationErrors: { + required: false, + readOnly: true, + serializedName: 'validationErrors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ReportableExceptionElementType', + type: { + name: 'Composite', + className: 'ReportableException' + } + } + } + } + } + } + }; + } +} + +module.exports = ValidateMigrationInputSqlServerSqlMISyncTaskOutput; diff --git a/lib/services/datamigrationManagement/lib/models/validateMigrationInputSqlServerSqlMISyncTaskProperties.js b/lib/services/datamigrationManagement/lib/models/validateMigrationInputSqlServerSqlMISyncTaskProperties.js new file mode 100644 index 0000000000..0ec6535bea --- /dev/null +++ b/lib/services/datamigrationManagement/lib/models/validateMigrationInputSqlServerSqlMISyncTaskProperties.js @@ -0,0 +1,147 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Properties for task that validates migration input for SQL to Azure SQL + * Database Managed Instance sync scenario + * + * @extends models['ProjectTaskProperties'] + */ +class ValidateMigrationInputSqlServerSqlMISyncTaskProperties extends models['ProjectTaskProperties'] { + /** + * Create a ValidateMigrationInputSqlServerSqlMISyncTaskProperties. + * @property {object} [input] Task input + * @property {array} [output] Task output. This is ignored if submitted. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ValidateMigrationInputSqlServerSqlMISyncTaskProperties + * + * @returns {object} metadata of ValidateMigrationInputSqlServerSqlMISyncTaskProperties + * + */ + mapper() { + return { + required: false, + serializedName: 'ValidateMigrationInput.SqlServer.AzureSqlDbMI.Sync.LRS', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'taskType', + clientName: 'taskType' + }, + uberParent: 'ProjectTaskProperties', + className: 'ValidateMigrationInputSqlServerSqlMISyncTaskProperties', + modelProperties: { + errors: { + required: false, + readOnly: true, + serializedName: 'errors', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ODataErrorElementType', + type: { + name: 'Composite', + className: 'ODataError' + } + } + } + }, + state: { + required: false, + readOnly: true, + serializedName: 'state', + type: { + name: 'String' + } + }, + commands: { + required: false, + readOnly: true, + serializedName: 'commands', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'CommandPropertiesElementType', + type: { + name: 'Composite', + polymorphicDiscriminator: { + serializedName: 'commandType', + clientName: 'commandType' + }, + uberParent: 'CommandProperties', + className: 'CommandProperties' + } + } + } + }, + clientData: { + required: false, + serializedName: 'clientData', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + taskType: { + required: true, + serializedName: 'taskType', + isPolymorphicDiscriminator: true, + type: { + name: 'String' + } + }, + input: { + required: false, + serializedName: 'input', + type: { + name: 'Composite', + className: 'ValidateMigrationInputSqlServerSqlMISyncTaskInput' + } + }, + output: { + required: false, + readOnly: true, + serializedName: 'output', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ValidateMigrationInputSqlServerSqlMISyncTaskOutputElementType', + type: { + name: 'Composite', + className: 'ValidateMigrationInputSqlServerSqlMISyncTaskOutput' + } + } + } + } + } + } + }; + } +} + +module.exports = ValidateMigrationInputSqlServerSqlMISyncTaskProperties; diff --git a/lib/services/datamigrationManagement/lib/operations/files.js b/lib/services/datamigrationManagement/lib/operations/files.js index 2f4d943e2c..15cba4ee97 100644 --- a/lib/services/datamigrationManagement/lib/operations/files.js +++ b/lib/services/datamigrationManagement/lib/operations/files.js @@ -352,7 +352,7 @@ function _get(groupName, serviceName, projectName, fileName, options, callback) * resource. * * @param {string} [parameters.properties.mediaType] File content type. This - * propery can be modified to reflect the file content type. + * property can be modified to reflect the file content type. * * @param {string} groupName Name of the resource group * @@ -706,7 +706,7 @@ function _deleteMethod(groupName, serviceName, projectName, fileName, options, c * resource. * * @param {string} [parameters.properties.mediaType] File content type. This - * propery can be modified to reflect the file content type. + * property can be modified to reflect the file content type. * * @param {string} groupName Name of the resource group * @@ -1570,7 +1570,7 @@ class Files { * resource. * * @param {string} [parameters.properties.mediaType] File content type. This - * propery can be modified to reflect the file content type. + * property can be modified to reflect the file content type. * * @param {string} groupName Name of the resource group * @@ -1626,7 +1626,7 @@ class Files { * resource. * * @param {string} [parameters.properties.mediaType] File content type. This - * propery can be modified to reflect the file content type. + * property can be modified to reflect the file content type. * * @param {string} groupName Name of the resource group * @@ -1801,7 +1801,7 @@ class Files { * resource. * * @param {string} [parameters.properties.mediaType] File content type. This - * propery can be modified to reflect the file content type. + * property can be modified to reflect the file content type. * * @param {string} groupName Name of the resource group * @@ -1857,7 +1857,7 @@ class Files { * resource. * * @param {string} [parameters.properties.mediaType] File content type. This - * propery can be modified to reflect the file content type. + * property can be modified to reflect the file content type. * * @param {string} groupName Name of the resource group * diff --git a/lib/services/datamigrationManagement/lib/operations/index.d.ts b/lib/services/datamigrationManagement/lib/operations/index.d.ts index 44db3dff5e..04d4c0f206 100644 --- a/lib/services/datamigrationManagement/lib/operations/index.d.ts +++ b/lib/services/datamigrationManagement/lib/operations/index.d.ts @@ -1937,7 +1937,7 @@ export interface Tasks { * The tasks resource is a nested, proxy-only resource representing work * performed by a DMS instance. The PUT method creates a new task or updates an * existing one, although since tasks have no mutable custom properties, there - * is little reason to update an exising one. + * is little reason to update an existing one. * * @param {object} parameters Information about the task * @@ -1978,7 +1978,7 @@ export interface Tasks { * The tasks resource is a nested, proxy-only resource representing work * performed by a DMS instance. The PUT method creates a new task or updates an * existing one, although since tasks have no mutable custom properties, there - * is little reason to update an exising one. + * is little reason to update an existing one. * * @param {object} parameters Information about the task * @@ -3487,7 +3487,7 @@ export interface Files { * resource. * * @param {string} [parameters.properties.mediaType] File content type. This - * propery can be modified to reflect the file content type. + * property can be modified to reflect the file content type. * * @param {string} groupName Name of the resource group * @@ -3531,7 +3531,7 @@ export interface Files { * resource. * * @param {string} [parameters.properties.mediaType] File content type. This - * propery can be modified to reflect the file content type. + * property can be modified to reflect the file content type. * * @param {string} groupName Name of the resource group * @@ -3664,7 +3664,7 @@ export interface Files { * resource. * * @param {string} [parameters.properties.mediaType] File content type. This - * propery can be modified to reflect the file content type. + * property can be modified to reflect the file content type. * * @param {string} groupName Name of the resource group * @@ -3708,7 +3708,7 @@ export interface Files { * resource. * * @param {string} [parameters.properties.mediaType] File content type. This - * propery can be modified to reflect the file content type. + * property can be modified to reflect the file content type. * * @param {string} groupName Name of the resource group * diff --git a/lib/services/datamigrationManagement/lib/operations/tasks.js b/lib/services/datamigrationManagement/lib/operations/tasks.js index c8c53269bd..100af6a6ea 100644 --- a/lib/services/datamigrationManagement/lib/operations/tasks.js +++ b/lib/services/datamigrationManagement/lib/operations/tasks.js @@ -186,7 +186,7 @@ function _list(groupName, serviceName, projectName, options, callback) { * The tasks resource is a nested, proxy-only resource representing work * performed by a DMS instance. The PUT method creates a new task or updates an * existing one, although since tasks have no mutable custom properties, there - * is little reason to update an exising one. + * is little reason to update an existing one. * * @param {object} parameters Information about the task * @@ -1512,7 +1512,7 @@ class Tasks { * The tasks resource is a nested, proxy-only resource representing work * performed by a DMS instance. The PUT method creates a new task or updates an * existing one, although since tasks have no mutable custom properties, there - * is little reason to update an exising one. + * is little reason to update an existing one. * * @param {object} parameters Information about the task * @@ -1565,7 +1565,7 @@ class Tasks { * The tasks resource is a nested, proxy-only resource representing work * performed by a DMS instance. The PUT method creates a new task or updates an * existing one, although since tasks have no mutable custom properties, there - * is little reason to update an exising one. + * is little reason to update an existing one. * * @param {object} parameters Information about the task *