-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from papatid/users/haraka/mongo-migrations
Mongo migrations
- Loading branch information
Showing
7 changed files
with
1,053 additions
and
24 deletions.
There are no files selected for viewing
92 changes: 92 additions & 0 deletions
92
.../preview/2023-07-15-preview/examples/CosmosDbMongoCreateOrUpdateDatabaseMigrationMAX.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "testrg", | ||
"targetResourceName": "targetCosmosDbClusterName", | ||
"migrationName": "migrationRequest", | ||
"api-version": "2023-07-15-preview", | ||
"parameters": { | ||
"properties": { | ||
"kind": "MongoToCosmosDbMongo", | ||
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName", | ||
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/MigrationServices/testMigrationService", | ||
"sourceMongoConnection": { | ||
"host": "abc.mongodb.com", | ||
"port": 88, | ||
"userName": "abc", | ||
"password": "placeholder", | ||
"useSsl": true | ||
}, | ||
"targetMongoConnection": { | ||
"host": "xyz.mongocluster.cosmos.azure.com", | ||
"port": 10255, | ||
"userName": "def", | ||
"password": "placeholder", | ||
"useSsl": true | ||
}, | ||
"collectionList": [ | ||
{ | ||
"sourceDatabase": "sourceDb1", | ||
"sourceCollection": "sourceCol1", | ||
"targetDatabase": "targetDb1", | ||
"targetCollection": "targetCol1" | ||
}, | ||
{ | ||
"sourceDatabase": "sourceDb2", | ||
"sourceCollection": "sourceCol2", | ||
"targetDatabase": "sourceDb2", | ||
"targetCollection": "sourceCol2" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"body": { | ||
"properties": { | ||
"sourceMongoConnection": { | ||
"host": "abc.mongodb.com", | ||
"port": 88 | ||
}, | ||
"targetMongoConnection": { | ||
"host": "xyz.mongocluster.cosmos.azure.com", | ||
"port": 10255 | ||
}, | ||
"collectionList": [ | ||
{ | ||
"sourceDatabase": "sourceDb1", | ||
"sourceCollection": "sourceCol1", | ||
"targetDatabase": "targetDb1", | ||
"targetCollection": "targetCol1" | ||
}, | ||
{ | ||
"sourceDatabase": "sourceDb2", | ||
"sourceCollection": "sourceCol2", | ||
"targetDatabase": "sourceDb2", | ||
"targetCollection": "sourceCol2" | ||
} | ||
], | ||
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName", | ||
"provisioningState": "Creating", | ||
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService", | ||
"kind": "MongoToCosmosDbMongo", | ||
"migrationStatus": "InProgress", | ||
"migrationStatusDetails": { | ||
|
||
}, | ||
"startedOn": "0001-01-01T08:00:00Z", | ||
"endedOn": "0001-01-01T08:00:00Z", | ||
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd" | ||
}, | ||
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest", | ||
"name": "migrationRequest", | ||
"type": "Microsoft.DataMigration/databaseMigrations" | ||
}, | ||
"headers": { | ||
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.DataMigration/locations/westus2/operationTypes/createcosmosdbmongomigration/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-07-15-preview", | ||
"Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.DataMigration/locations/westus2/operationTypes/createcosmosdbmongomigration/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-07-15-preview" | ||
} | ||
} | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
.../preview/2023-07-15-preview/examples/CosmosDbMongoCreateOrUpdateDatabaseMigrationMIN.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "testrg", | ||
"targetResourceName": "targetCosmosDbClusterName", | ||
"migrationName": "migrationRequest", | ||
"api-version": "2023-07-15-preview", | ||
"parameters": { | ||
"properties": { | ||
"kind": "MongoToCosmosDbMongo", | ||
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName", | ||
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/MigrationServices/testMigrationService", | ||
"sourceMongoConnection": { | ||
"host": "abc.mongodb.com", | ||
"port": 88, | ||
"userName": "abc", | ||
"password": "placeholder", | ||
"useSsl": true | ||
}, | ||
"targetMongoConnection": { | ||
"connectionString": "placeholder" | ||
}, | ||
"collectionList": [ | ||
{ | ||
"sourceDatabase": "sourceDb1", | ||
"sourceCollection": "sourceCol1", | ||
"targetDatabase": "targetDb1", | ||
"targetCollection": "targetCol1" | ||
}, | ||
{ | ||
"sourceDatabase": "sourceDb2", | ||
"sourceCollection": "sourceCol2" | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"responses": { | ||
"201": { | ||
"body": { | ||
"properties": { | ||
"sourceMongoConnection": { | ||
"host": "abc.mongodb.com", | ||
"port": 88 | ||
}, | ||
"targetMongoConnection": { | ||
"host": "xyz.mongo.cosmos.azure.com", | ||
"port": 10255 | ||
}, | ||
"collectionList": [ | ||
{ | ||
"sourceDatabase": "sourceDb1", | ||
"sourceCollection": "sourceCol1", | ||
"targetDatabase": "targetDb1", | ||
"targetCollection": "targetCol1" | ||
}, | ||
{ | ||
"sourceDatabase": "sourceDb2", | ||
"sourceCollection": "sourceCol2", | ||
"targetDatabase": "sourceDb2", | ||
"targetCollection": "sourceCol2" | ||
} | ||
], | ||
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName", | ||
"provisioningState": "Creating", | ||
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService", | ||
"kind": "MongoToCosmosDbMongo", | ||
"migrationStatus": "InProgress", | ||
"migrationStatusDetails": { | ||
|
||
}, | ||
"startedOn": "0001-01-01T08:00:00Z", | ||
"endedOn": "0001-01-01T08:00:00Z", | ||
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd" | ||
}, | ||
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest", | ||
"name": "migrationRequest", | ||
"type": "Microsoft.DataMigration/databaseMigrations" | ||
}, | ||
"headers": { | ||
"Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.DataMigration/locations/westus2/operationTypes/createcosmosdbmongomigration/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-07-15-preview", | ||
"Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.DataMigration/locations/westus2/operationTypes/createcosmosdbmongomigration/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-07-15-preview" | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...taMigration/preview/2023-07-15-preview/examples/CosmosDbMongoDeleteDatabaseMigration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "testrg", | ||
"targetResourceName": "targetCosmosDbClusterName", | ||
"migrationName": "migrationRequest" | ||
}, | ||
"responses": { | ||
"200": {}, | ||
"202": { | ||
"headers": { | ||
"Location": "https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/providers/Microsoft.DataMigration/locations/westus2/operationTypes/dropcosmosdbmongomigration/operationResults/00000000-0000-0000-0000-000000000000?api-version=2023-07-15-preview" | ||
} | ||
}, | ||
"204": {} | ||
} | ||
} |
53 changes: 53 additions & 0 deletions
53
....DataMigration/preview/2023-07-15-preview/examples/CosmosDbMongoGetDatabaseMigration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "testrg", | ||
"targetResourceName": "targetCosmosDbClusterName", | ||
"migrationName": "migrationRequest", | ||
"api-version": "2023-07-15-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"properties": { | ||
"sourceMongoConnection": { | ||
"host": "abc.mongodb.com", | ||
"port": 88 | ||
}, | ||
"targetMongoConnection": { | ||
"host": "xyz.mongocluster.cosmos.azure.com", | ||
"port": 10255 | ||
}, | ||
"collectionList": [ | ||
{ | ||
"sourceDatabase": "sourceDb1", | ||
"sourceCollection": "sourceCol1", | ||
"targetDatabase": "targetDb1", | ||
"targetCollection": "targetCol1" | ||
}, | ||
{ | ||
"sourceDatabase": "sourceDb2", | ||
"sourceCollection": "sourceCol2", | ||
"targetDatabase": "sourceDb2", | ||
"targetCollection": "sourceCol2" | ||
} | ||
], | ||
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName", | ||
"provisioningState": "Creating", | ||
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService", | ||
"kind": "MongoToCosmosDbMongo", | ||
"migrationStatus": "InProgress", | ||
"migrationStatusDetails": { | ||
|
||
}, | ||
"startedOn": "0001-01-01T08:00:00Z", | ||
"endedOn": "0001-01-01T08:00:00Z", | ||
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd" | ||
}, | ||
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest", | ||
"name": "migrationRequest", | ||
"type": "Microsoft.DataMigration/databaseMigrations" | ||
} | ||
} | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
...ration/preview/2023-07-15-preview/examples/CosmosDbMongoListByScopeDatabaseMigration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "testrg", | ||
"targetResourceName": "targetCosmosDbClusterName", | ||
"api-version": "2023-07-15-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"properties": { | ||
"sourceMongoConnection": { | ||
"host": "abc.mongodb.com", | ||
"port": 88 | ||
}, | ||
"targetMongoConnection": { | ||
"host": "xyz.mongocluster.cosmos.azure.com", | ||
"port": 10255 | ||
}, | ||
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName", | ||
"provisioningState": "Creating", | ||
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService", | ||
"kind": "MongoToCosmosDbMongo", | ||
"migrationStatus": "InProgress", | ||
"startedOn": "0001-01-01T08:00:00Z", | ||
"endedOn": "0001-01-01T08:00:00Z", | ||
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd" | ||
}, | ||
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest1", | ||
"name": "migrationRequest1", | ||
"type": "Microsoft.DataMigration/databaseMigrations" | ||
}, | ||
{ | ||
"properties": { | ||
"sourceMongoConnection": { | ||
"host": "abc.mongodb.com", | ||
"port": 88 | ||
}, | ||
"targetMongoConnection": { | ||
"host": "xyz.mongocluster.cosmos.azure.com", | ||
"port": 10255 | ||
}, | ||
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName", | ||
"provisioningState": "Provisioned", | ||
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService", | ||
"kind": "MongoToCosmosDbMongo", | ||
"migrationStatus": "Failed", | ||
"migrationFailureError": { | ||
"code": "400", | ||
"message": "Source or Target database connectivity could not be validated." | ||
}, | ||
"startedOn": "0001-01-01T08:00:00Z", | ||
"endedOn": "0001-01-01T08:00:00Z", | ||
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd" | ||
}, | ||
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest2", | ||
"name": "migrationRequest2", | ||
"type": "Microsoft.DataMigration/databaseMigrations" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
...t.DataMigration/preview/2023-07-15-preview/examples/ListMigrationsByMigrationService.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ | ||
"parameters": { | ||
"subscriptionId": "00000000-1111-2222-3333-444444444444", | ||
"resourceGroupName": "testrg", | ||
"migrationServiceName": "testMigrationService", | ||
"api-version": "2023-07-15-preview" | ||
}, | ||
"responses": { | ||
"200": { | ||
"body": { | ||
"value": [ | ||
{ | ||
"properties": { | ||
"sourceMongoConnection": { | ||
"host": "abc.mongodb.com", | ||
"port": 88 | ||
}, | ||
"targetMongoConnection": { | ||
"host": "xyz.mongocluster.cosmos.azure.com", | ||
"port": 10255 | ||
}, | ||
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName", | ||
"provisioningState": "Creating", | ||
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService", | ||
"kind": "MongoToCosmosDbMongo", | ||
"migrationStatus": "InProgress", | ||
"startedOn": "0001-01-01T08:00:00Z", | ||
"endedOn": "0001-01-01T08:00:00Z", | ||
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd" | ||
}, | ||
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest1", | ||
"name": "migrationRequest1", | ||
"type": "Microsoft.DataMigration/databaseMigrations" | ||
}, | ||
{ | ||
"properties": { | ||
"sourceMongoConnection": { | ||
"host": "abc.mongodb.com", | ||
"port": 88 | ||
}, | ||
"targetMongoConnection": { | ||
"host": "xyz.mongocluster.cosmos.azure.com", | ||
"port": 10255 | ||
}, | ||
"scope": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName", | ||
"provisioningState": "Provisioned", | ||
"migrationService": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/migrationServices/testMigrationService", | ||
"kind": "MongoToCosmosDbMongo", | ||
"migrationStatus": "Failed", | ||
"migrationFailureError": { | ||
"code": "400", | ||
"message": "Source or Target database connectivity could not be validated." | ||
}, | ||
"startedOn": "0001-01-01T08:00:00Z", | ||
"endedOn": "0001-01-01T08:00:00Z", | ||
"migrationOperationId": "858ba109-5ab7-4fa1-8aea-bea487cacdcd" | ||
}, | ||
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.DocumentDB/mongoClusters/targetCosmosDbClusterName/providers/Microsoft.DataMigration/databaseMigrations/migrationRequest2", | ||
"name": "migrationRequest2", | ||
"type": "Microsoft.DataMigration/databaseMigrations" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.