From f1e9e42669574aa40ed995632b623bea9d78925b Mon Sep 17 00:00:00 2001 From: Ashish Shinde Date: Thu, 6 Feb 2020 22:09:16 -0800 Subject: [PATCH] Add PGSQL to AzurePGSQL swagger changes (#7583) * Add PGSQL to AzurePGSQL swagger changes * Add trust and encrypt connections flags to the PG scenario * Renamed postgree to postgres and configured and changed text * Adding custom words * Resolving discriminator issues * Fixing typo * Renamed 'ResultType' to 'resultType' * Made result task not read only * prettier run --- custom-words.txt | 3 + .../definitions/Common.json | 10 +++ .../ConnectToSourceSqlServerTask.json | 6 +- .../MigrateMySqlAzureDbForMySqlSyncTask.json | 6 +- ...ostgreSqlAzureDbForPostgreSqlSyncTask.json | 21 ++++++- .../MigrateSqlServerSqlDbSyncTask.json | 6 +- .../MigrateSqlServerSqlDbTask.json | 6 +- .../MigrateSqlServerSqlMITask.json | 6 +- .../MigrateSqlServerSqlMiSyncTask.json | 6 +- .../definitions/MigrateSsisTask.json | 6 +- .../definitions/MongoDbTasks.json | 2 +- .../OracleAzureDbPostgreSqlSyncTask.json | 6 +- .../2018-07-15-preview/definitions/Tasks.json | 2 +- .../definitions/TasksCommon.json | 63 ++++++++++++++++++- 14 files changed, 128 insertions(+), 21 deletions(-) diff --git a/custom-words.txt b/custom-words.txt index 424af84e7c41..f71670c793cc 100644 --- a/custom-words.txt +++ b/custom-words.txt @@ -1063,6 +1063,7 @@ poolusagemetrics portalsettings postbackup Postgre +Postgres postgresql postrestore powerbi @@ -1364,7 +1365,9 @@ sparql SPDX SQLAG SQLDB +SQLDW SQLMI +SQLRDS sqlvirtualmachine sqlvm Sqoop diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Common.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Common.json index 651b9c6840cf..3b65d498f5b7 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Common.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Common.json @@ -393,6 +393,16 @@ "port": { "type": "integer", "description": "Port for Server" + }, + "encryptConnection": { + "type": "boolean", + "description": "Whether to encrypt the connection", + "default": true + }, + "trustServerCertificate": { + "type": "boolean", + "description": "Whether to trust the server certificate", + "default": false } }, "allOf": [ diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/ConnectToSourceSqlServerTask.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/ConnectToSourceSqlServerTask.json index 8a573d43aafe..19a87e4bb176 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/ConnectToSourceSqlServerTask.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/ConnectToSourceSqlServerTask.json @@ -70,10 +70,12 @@ }, "resultType": { "description": "Type of result - database level or task level", - "type": "string", - "readOnly": true + "type": "string" } }, + "required": [ + "resultType" + ], "discriminator": "resultType" }, "ConnectToSourceSqlServerTaskOutputTaskLevel": { diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateMySqlAzureDbForMySqlSyncTask.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateMySqlAzureDbForMySqlSyncTask.json index dc648c4c78a7..fe9b45ba782e 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateMySqlAzureDbForMySqlSyncTask.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateMySqlAzureDbForMySqlSyncTask.json @@ -54,10 +54,12 @@ }, "resultType": { "description": "Result type", - "type": "string", - "readOnly": true + "type": "string" } }, + "required": [ + "resultType" + ], "discriminator": "resultType" }, "MigrateMySqlAzureDbForMySqlSyncTaskOutputMigrationLevel": { diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigratePostgreSqlAzureDbForPostgreSqlSyncTask.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigratePostgreSqlAzureDbForPostgreSqlSyncTask.json index 5ab3f23177f0..1d7ffee88df1 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigratePostgreSqlAzureDbForPostgreSqlSyncTask.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigratePostgreSqlAzureDbForPostgreSqlSyncTask.json @@ -54,10 +54,12 @@ }, "resultType": { "description": "Result type", - "type": "string", - "readOnly": true + "type": "string" } }, + "required": [ + "resultType" + ], "discriminator": "resultType" }, "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskOutputMigrationLevel": { @@ -95,6 +97,21 @@ "type": "string", "description": "Target server name", "readOnly": true + }, + "sourceServerType": { + "$ref": "./TasksCommon.json#/definitions/ScenarioSource", + "description": "Source server type.", + "readOnly": true + }, + "targetServerType": { + "$ref": "./TasksCommon.json#/definitions/ScenarioTarget", + "description": "Target server type.", + "readOnly": true + }, + "state": { + "$ref": "./TasksCommon.json#/definitions/ReplicateMigrationState", + "description": "Migration status", + "readOnly": true } }, "allOf": [ diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlDbSyncTask.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlDbSyncTask.json index d4c66c777f15..4511cc58cf01 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlDbSyncTask.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlDbSyncTask.json @@ -53,10 +53,12 @@ }, "resultType": { "description": "Result type", - "type": "string", - "readOnly": true + "type": "string" } }, + "required": [ + "resultType" + ], "discriminator": "resultType" }, "MigrateSqlServerSqlDbSyncTaskOutputMigrationLevel": { diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlDbTask.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlDbTask.json index 77ae665ddf80..3c5c2a8c8b88 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlDbTask.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlDbTask.json @@ -53,10 +53,12 @@ }, "resultType": { "description": "Result type", - "type": "string", - "readOnly": true + "type": "string" } }, + "required": [ + "resultType" + ], "discriminator": "resultType" }, "MigrateSqlServerSqlDbTaskOutputMigrationLevel": { diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlMITask.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlMITask.json index 5ce2a2fd1e18..199a98afbf0e 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlMITask.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlMITask.json @@ -80,10 +80,12 @@ }, "resultType": { "description": "Result type", - "type": "string", - "readOnly": true + "type": "string" } }, + "required": [ + "resultType" + ], "discriminator": "resultType" }, "MigrateSqlServerSqlMITaskOutputMigrationLevel": { diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlMiSyncTask.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlMiSyncTask.json index e64e894a2411..7c02d9a79d76 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlMiSyncTask.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSqlServerSqlMiSyncTask.json @@ -37,10 +37,12 @@ }, "resultType": { "description": "Result type", - "type": "string", - "readOnly": true + "type": "string" } }, + "required": [ + "resultType" + ], "discriminator": "resultType" }, "MigrateSqlServerSqlMISyncTaskOutputMigrationLevel": { diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSsisTask.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSsisTask.json index 38df9713771b..0816af05f169 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSsisTask.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSsisTask.json @@ -46,10 +46,12 @@ }, "resultType": { "description": "Result type", - "type": "string", - "readOnly": true + "type": "string" } }, + "required": [ + "resultType" + ], "discriminator": "resultType" }, "MigrateSsisTaskOutputMigrationLevel": { diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MongoDbTasks.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MongoDbTasks.json index 8496860bbae8..f77fd75f1558 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MongoDbTasks.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MongoDbTasks.json @@ -442,7 +442,7 @@ "totalBytes", "totalDocuments" ], - "discriminator": "ResultType" + "discriminator": "resultType" }, "MongoDbMigrationProgress": { "x-ms-discriminator-value": "Migration", diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/OracleAzureDbPostgreSqlSyncTask.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/OracleAzureDbPostgreSqlSyncTask.json index b647d8d3ab5e..f5ac9f85f20a 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/OracleAzureDbPostgreSqlSyncTask.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/OracleAzureDbPostgreSqlSyncTask.json @@ -272,10 +272,12 @@ }, "resultType": { "description": "Result type", - "type": "string", - "readOnly": true + "type": "string" } }, + "required": [ + "resultType" + ], "discriminator": "resultType" }, "MigrateOracleAzureDbPostgreSqlSyncTaskOutputMigrationLevel": { diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Tasks.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Tasks.json index 8c8798a0d89b..a3f00403cf7f 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Tasks.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Tasks.json @@ -635,7 +635,7 @@ ] }, "MigratePostgreSqlAzureDbForPostgreSqlSyncTaskProperties": { - "x-ms-discriminator-value": "Migrate.PostgreSql.AzureDbForPostgreSql.Sync", + "x-ms-discriminator-value": "Migrate.PostgreSql.AzureDbForPostgreSql.SyncV2", "type": "object", "description": "Properties for the task that migrates PostgreSQL databases to Azure Database for PostgreSQL for online migrations", "properties": { diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/TasksCommon.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/TasksCommon.json index 7f0496f4d91a..58fd0c288280 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/TasksCommon.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/TasksCommon.json @@ -142,6 +142,60 @@ "modelAsString": true } }, + "ScenarioSource": { + "type": "string", + "description": "An enumeration of source type", + "enum": [ + "Access", + "DB2", + "MySQL", + "Oracle", + "SQL", + "Sybase", + "PostgreSQL", + "MongoDB", + "SQLRDS", + "MySQLRDS", + "PostgreSQLRDS" + ], + "x-ms-enum": { + "name": "ScenarioSource", + "modelAsString": true + } + }, + "ScenarioTarget": { + "type": "string", + "description": "An enumeration of target type", + "enum": [ + "SQLServer", + "SQLDB", + "SQLDW", + "SQLMI", + "AzureDBForMySql", + "AzureDBForPostgresSQL", + "MongoDB" + ], + "x-ms-enum": { + "name": "ScenarioTarget", + "modelAsString": true + } + }, + "ReplicateMigrationState": { + "type": "string", + "description": "Wrapper for replicate reported migration states.", + "enum": [ + "UNDEFINED", + "VALIDATING", + "PENDING", + "COMPLETE", + "ACTION_REQUIRED", + "FAILED" + ], + "x-ms-enum": { + "name": "ReplicateMigrationState", + "modelAsString": true + } + }, "DatabaseObjectName": { "type": "object", "description": "A representation of the name of an object in a database", @@ -1040,7 +1094,14 @@ "COMPLETE", "CANCELLING", "CANCELLED", - "FAILED" + "FAILED", + "VALIDATING", + "VALIDATION_COMPLETE", + "VALIDATION_FAILED", + "RESTORE_IN_PROGRESS", + "RESTORE_COMPLETED", + "BACKUP_IN_PROGRESS", + "BACKUP_COMPLETED" ], "x-ms-enum": { "name": "SyncDatabaseMigrationReportingState",