diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/datamigration.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/datamigration.json index d8e18f5e0b9e..1a5e8201b4df 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/datamigration.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/datamigration.json @@ -1165,6 +1165,299 @@ } } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files": { + "get": { + "summary": "Get files in a project", + "description": "The project resource is a nested resource representing a stored migration project. This method returns a list of files owned by a project resource.", + "tags": [ + "File resource", + "Standard operation", + "GET" + ], + "operationId": "Files_List", + "x-ms-examples": { + "Files_List": { "$ref": "./examples/Files_List.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/groupName" + }, + { + "$ref": "#/parameters/serviceName" + }, + { + "$ref": "#/parameters/projectName" + }, + { + "$ref": "#/parameters/apiVersion" + } + ], + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "responses": { + "200": { + "description": "List of files", + "schema": { + "$ref": "./definitions/Files.json#/definitions/FileList" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "./definitions/Common.json#/definitions/ApiError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}": { + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/groupName" + }, + { + "$ref": "#/parameters/serviceName" + }, + { + "$ref": "#/parameters/projectName" + }, + { + "$ref": "#/parameters/fileName" + }, + { + "$ref": "#/parameters/apiVersion" + } + ], + "get": { + "summary": "Get file information", + "description": "The files resource is a nested, proxy-only resource representing a file stored under the project resource. This method retrieves information about a file.", + "tags": [ + "File resource", + "Standard operation", + "GET" + ], + "operationId": "Files_Get", + "x-ms-examples": { + "Files_List": { "$ref": "./examples/Files_Get.json" } + }, + "responses": { + "200": { + "description": "A file resource", + "schema": { + "$ref": "./definitions/Files.json#/definitions/ProjectFile" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "./definitions/Common.json#/definitions/ApiError" + } + } + } + }, + "put": { + "summary": "Create a file resource", + "description": "The PUT method creates a new file or updates an existing one.", + "tags": [ + "Fie resource", + "Standard operation", + "PUT" + ], + "operationId": "Files_CreateOrUpdate", + "x-ms-examples": { + "Files_CreateOrUpdate": { "$ref": "./examples/Files_CreateOrUpdate.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/projectFile" + } + ], + "responses": { + "200": { + "description": "File updated", + "schema": { + "$ref": "./definitions/Files.json#/definitions/ProjectFile" + } + }, + "201": { + "description": "File created", + "schema": { + "$ref": "./definitions/Files.json#/definitions/ProjectFile" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "./definitions/Common.json#/definitions/ApiError" + } + } + } + }, + "delete": { + "summary": "Delete file", + "description": "This method deletes a file.", + "tags": [ + "File resource", + "Standard operation", + "DELETE" + ], + "operationId": "Files_Delete", + "x-ms-examples": { + "Files_Delete": { "$ref": "./examples/Files_Delete.json" } + }, + "responses": { + "200": { + "description": "File resource deleted" + }, + "204": { + "description": "Not found" + }, + "default": { + "description": "Error", + "schema": { + "$ref": "./definitions/Common.json#/definitions/ApiError" + } + } + } + }, + "patch": { + "summary": "Update a file", + "description": "This method updates an existing file.", + "tags": [ + "File resource", + "Standard operation", + "PATCH" + ], + "operationId": "Files_Update", + "x-ms-examples": { + "Files_Update": { "$ref": "./examples/Files_Update.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/projectFile" + } + ], + "responses": { + "200": { + "description": "File resource updated", + "schema": { + "$ref": "./definitions/Files.json#/definitions/ProjectFile" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "./definitions/Common.json#/definitions/ApiError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}/read": { + "post": { + "summary": "Request storage information for downloading the file content", + "description": "This method is used for requesting storage information using which contents of the file can be downloaded.", + "tags": [ + "File resource", + "Standard operation", + "POST" + ], + "operationId": "Files_Read", + "x-ms-examples": { + "Files_List": { "$ref": "./examples/Files_Read.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/groupName" + }, + { + "$ref": "#/parameters/serviceName" + }, + { + "$ref": "#/parameters/projectName" + }, + { + "$ref": "#/parameters/fileName" + }, + { + "$ref": "#/parameters/apiVersion" + } + ], + "responses": { + "200": { + "description": "An object describing how to access the file content", + "schema": { + "$ref": "./definitions/Files.json#/definitions/FileStorageInfo" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "./definitions/Common.json#/definitions/ApiError" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.DataMigration/services/{serviceName}/projects/{projectName}/files/{fileName}/readwrite": { + "post": { + "summary": "Request information for reading and writing file content.", + "description": "This method is used for requesting information for reading and writing the file content.", + "tags": [ + "File resource", + "Standard operation", + "POST" + ], + "operationId": "Files_ReadWrite", + "x-ms-examples": { + "Files_List": { "$ref": "./examples/Files_ReadWrite.json" } + }, + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/groupName" + }, + { + "$ref": "#/parameters/serviceName" + }, + { + "$ref": "#/parameters/projectName" + }, + { + "$ref": "#/parameters/fileName" + }, + { + "$ref": "#/parameters/apiVersion" + } + ], + "responses": { + "200": { + "description": "An object describing how to access the file content", + "schema": { + "$ref": "./definitions/Files.json#/definitions/FileStorageInfo" + } + }, + "default": { + "description": "Error", + "schema": { + "$ref": "./definitions/Common.json#/definitions/ApiError" + } + } + } + } } }, "parameters": { @@ -1296,6 +1589,24 @@ "$ref": "./definitions/Commands.json#/definitions/CommandProperties" }, "x-ms-parameter-location": "method" + }, + "projectFile": { + "name": "parameters", + "description": "Information about the file", + "in": "body", + "required": true, + "schema": { + "$ref": "./definitions/Files.json#/definitions/ProjectFile" + }, + "x-ms-parameter-location": "method" + }, + "fileName": { + "name": "fileName", + "description": "Name of the File", + "in": "path", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" } } } 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 a8cc6b2fcb37..25a341d55f38 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 @@ -265,6 +265,24 @@ "modelAsString": true } }, + "MongoDbConnectionInfo": { + "type": "object", + "description": "Describes a connection to a MongoDB data source", + "allOf": [ + { + "$ref": "#/definitions/ConnectionInfo" + } + ], + "properties": { + "connectionString": { + "type": "string", + "description": "A MongoDB connection string or blob container URL. The user name and password can be specified here or in the userName and password properties" + } + }, + "required": [ + "connectionString" + ] + }, "SqlConnectionInfo": { "x-ms-discriminator-value": "SqlConnectionInfo", "type": "object", diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Files.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Files.json new file mode 100644 index 000000000000..06a51036440a --- /dev/null +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Files.json @@ -0,0 +1,104 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Data Migration Service Resource Provider", + "version": "2018-07-15-preview" + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": {}, + "definitions": { + "ProjectFileProperties": { + "type": "object", + "description": "Base class for file properties.", + "properties": { + "extension": { + "description": "Optional File extension. If submitted it should not have a leading period and must match the extension from filePath.", + "type": "string" + }, + "filePath": { + "description": "Relative path of this file resource. This property can be set when creating or updating the file resource.", + "type": "string" + }, + "lastModified": { + "description": "Modification DateTime.", + "type": "string", + "format": "date-time", + "readOnly": true + }, + "mediaType": { + "description": "File content type. This propery can be modified to reflect the file content type.", + "type": "string" + }, + "size": { + "description": "File size.", + "type": "integer", + "format": "int64", + "readOnly": true + } + } + }, + "ProjectFile": { + "type": "object", + "description": "A file resource", + "properties": { + "etag": { + "type": "string", + "description": "HTTP strong entity tag value. This is ignored if submitted." + }, + "properties": { + "description": "Custom file properties", + "$ref": "#/definitions/ProjectFileProperties" + } + }, + "allOf": [ + { + "$ref": "./Common.json#/definitions/Resource" + } + ] + }, + "FileList": { + "type": "object", + "description": "OData page of files", + "properties": { + "value": { + "type": "array", + "description": "List of files", + "items": { + "$ref": "#/definitions/ProjectFile" + } + }, + "nextLink": { + "type": "string", + "description": "URL to load the next page of files" + } + } + }, + "FileStorageInfo": { + "type": "object", + "description": "File storage information.", + "x-ms-discriminator-value": "Unknown", + "properties": { + "uri": { + "description": "A URI that can be used to access the file content.", + "type": "string" + }, + "headers": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } +} diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSchemaSqlServerSqlDbTask.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSchemaSqlServerSqlDbTask.json index 398fb8200bef..1fbe91ebb8a2 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSchemaSqlServerSqlDbTask.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MigrateSchemaSqlServerSqlDbTask.json @@ -66,6 +66,10 @@ "type": "object", "description": "Database input for migrate schema Sql Server to Azure SQL Server scenario", "properties": { + "name": { + "type": "string", + "description": "Name of source database" + }, "targetDatabaseName": { "type": "string", "description": "Name of target database" 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 new file mode 100644 index 000000000000..6056ff1e75df --- /dev/null +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/MongoDbTasks.json @@ -0,0 +1,609 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Data Migration Service Resource Provider", + "version": "2018-07-15-preview" + }, + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": {}, + "definitions": { + "MongoDbCancelCommand": { + "x-ms-discriminator-value": "cancel", + "type": "object", + "description": "Properties for the command that cancels a migration in whole or in part", + "properties": { + "input": { + "$ref": "#/definitions/MongoDbCommandInput", + "description": "Command input" + } + }, + "allOf": [ + { + "$ref": "Commands.json#/definitions/CommandProperties" + } + ] + }, + "MongoDbClusterInfo": { + "type": "object", + "description": "Describes a MongoDB data source", + "properties": { + "databases": { + "type": "array", + "items": { + "$ref": "#/definitions/MongoDbDatabaseInfo" + }, + "description": "A list of non-system databases in the cluster" + }, + "supportsSharding": { + "type": "boolean", + "description": "Whether the cluster supports sharded collections" + }, + "type": { + "type": "string", + "description": "The type of data source", + "enum": [ + "BlobContainer", + "CosmosDb", + "MongoDb" + ], + "x-ms-enum": { + "name": "MongoDbClusterType", + "modelAsString": true + } + }, + "version": { + "type": "string", + "description": "The version of the data source in the form x.y.z (e.g. 3.6.7). Not used if Type is BlobContainer." + } + }, + "required": [ + "databases", + "supportsSharding", + "type", + "version" + ] + }, + "MongoDbCollectionInfo": { + "type": "object", + "description": "Describes a supported collection within a MongoDB database", + "properties": { + "databaseName": { + "type": "string", + "description": "The name of the database containing the collection" + }, + "isCapped": { + "type": "boolean", + "description": "Whether the collection is a capped collection (i.e. whether it has a fixed size and acts like a circular buffer)" + }, + "isSystemCollection": { + "type": "boolean", + "description": "Whether the collection is system collection" + }, + "isView": { + "type": "boolean", + "description": "Whether the collection is a view of another collection" + }, + "shardKey": { + "$ref": "#/definitions/MongoDbShardKeyInfo", + "description": "The shard key on the collection, or null if the collection is not sharded" + }, + "supportsSharding": { + "type": "boolean", + "description": "Whether the database has sharding enabled. Note that the migration task will enable sharding on the target if necessary." + }, + "viewOf": { + "type": "string", + "description": "The name of the collection that this is a view of, if IsView is true" + } + }, + "allOf": [ + { + "$ref": "#/definitions/MongoDbObjectInfo" + } + ], + "required": [ + "databaseName", + "isCapped", + "isSystemCollection", + "isView", + "supportsSharding" + ] + }, + "MongoDbCollectionProgress": { + "x-ms-discriminator-value": "Collection", + "type": "object", + "description": "Describes the progress of a collection", + "allOf": [ + { + "$ref": "#/definitions/MongoDbProgress" + } + ] + }, + "MongoDbCollectionSettings": { + "type": "object", + "description": "Describes how an individual MongoDB collection should be migrated", + "properties": { + "canDelete": { + "type": "boolean", + "description": "Whether the migrator is allowed to drop the target collection in the course of performing a migration. The default is true." + }, + "shardKey": { + "$ref": "#/definitions/MongoDbShardKeySetting" + }, + "targetRUs": { + "type": "integer", + "format": "int32", + "description": "The RUs that should be configured on a CosmosDB target, or null to use the default. This has no effect on non-CosmosDB targets." + } + } + }, + "MongoDbCommandInput": { + "type": "object", + "description": "Describes the input to the 'cancel' and 'restart' MongoDB migration commands", + "properties": { + "objectName": { + "type": "string", + "description": "The qualified name of a database or collection to act upon, or null to act upon the entire migration" + } + } + }, + "MongoDbDatabaseInfo": { + "type": "object", + "description": "Describes a database within a MongoDB data source", + "properties": { + "collections": { + "type": "array", + "items": { + "$ref": "#/definitions/MongoDbCollectionInfo" + }, + "description": "A list of supported collections in a MongoDB database" + }, + "supportsSharding": { + "type": "boolean", + "description": "Whether the database has sharding enabled. Note that the migration task will enable sharding on the target if necessary." + } + }, + "allOf": [ + { + "$ref": "#/definitions/MongoDbObjectInfo" + } + ], + "required": [ + "collections", + "supportsSharding" + ] + }, + "MongoDbDatabaseProgress": { + "x-ms-discriminator-value": "Database", + "type": "object", + "description": "Describes the progress of a database", + "properties": { + "collections": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MongoDbCollectionProgress" + }, + "description": "The progress of the collections in the database. The keys are the unqualified names of the collections" + } + }, + "allOf": [ + { + "$ref": "#/definitions/MongoDbProgress" + } + ] + }, + "MongoDbDatabaseSettings": { + "type": "object", + "description": "Describes how an individual MongoDB database should be migrated", + "properties": { + "collections": { + "type": "object", + "description": "The collections on the source database to migrate to the target. The keys are the unqualified names of the collections.", + "additionalProperties": { + "$ref": "#/definitions/MongoDbCollectionSettings" + } + }, + "targetRUs": { + "type": "integer", + "format": "int32", + "description": "The RUs that should be configured on a CosmosDB target, or null to use the default, or 0 if throughput should not be provisioned for the database. This has no effect on non-CosmosDB targets." + } + }, + "required": [ + "collections" + ] + }, + "MongoDbError": { + "type": "object", + "description": "Describes an error or warning that occurred during a MongoDB migration", + "properties": { + "code": { + "type": "string", + "description": "The non-localized, machine-readable code that describes the error or warning" + }, + "count": { + "type": "integer", + "format": "int32", + "description": "The number of times the error or warning has occurred" + }, + "message": { + "type": "string", + "description": "The localized, human-readable message that describes the error or warning" + }, + "type": { + "type": "string", + "description": "The type of error or warning", + "enum": [ + "Error", + "ValidationError", + "Warning" + ], + "x-ms-enum": { + "name": "MongoDbErrorType", + "modelAsString": true + } + } + } + }, + "MongoDbFinishCommand": { + "x-ms-discriminator-value": "restart", + "type": "object", + "description": "Properties for the command that finishes a migration in whole or in part", + "properties": { + "input": { + "$ref": "#/definitions/MongoDbFinishCommandInput", + "description": "Command input" + } + }, + "allOf": [ + { + "$ref": "Commands.json#/definitions/CommandProperties" + } + ] + }, + "MongoDbFinishCommandInput": { + "type": "object", + "description": "Describes the input to the 'finish' MongoDB migration command", + "properties": { + "immediate": { + "type": "boolean", + "description": "If true, replication for the affected objects will be stopped immediately. If false, the migrator will finish replaying queued events before finishing the replication." + } + }, + "allOf": [ + { + "$ref": "#/definitions/MongoDbCommandInput" + } + ], + "required": [ + "immediate" + ] + }, + "MongoDbMigrationSettings": { + "type": "object", + "description": "Describes how a MongoDB data migration should be performed", + "properties": { + "boostRUs": { + "type": "integer", + "format": "int32", + "description": "The RU limit on a CosmosDB target that collections will be temporarily increased to (if lower) during the initial copy of a migration, from 10,000 to 1,000,000, or 0 to use the default boost (which is generally the maximum), or null to not boost the RUs. This setting has no effect on non-CosmosDB targets." + }, + "databases": { + "type": "object", + "description": "The databases on the source cluster to migrate to the target. The keys are the names of the databases.", + "additionalProperties": { + "$ref": "#/definitions/MongoDbDatabaseSettings" + } + }, + "replication": { + "type": "string", + "description": "Describes how changes will be replicated from the source to the target. The default is OneTime.", + "enum": [ + "Disabled", + "OneTime", + "Continuous" + ], + "x-ms-enum": { + "name": "MongoDbReplication", + "modelAsString": true + } + }, + "source": { + "$ref": "./Common.json#/definitions/MongoDbConnectionInfo", + "description": "Settings used to connect to the source cluster" + }, + "target": { + "$ref": "./Common.json#/definitions/MongoDbConnectionInfo", + "description": "Settings used to connect to the target cluster" + }, + "throttling": { + "$ref": "#/definitions/MongoDbThrottlingSettings", + "description": "Settings used to limit the resource usage of the migration" + } + }, + "required": [ + "databases", + "source", + "target" + ] + }, + "MongoDbProgress": { + "type": "object", + "description": "Base class for MongoDB migration outputs", + "properties": { + "bytesCopied": { + "type": "integer", + "format": "int64", + "description": "The number of document bytes copied during the Copying stage" + }, + "documentsCopied": { + "type": "integer", + "format": "int64", + "description": "The number of documents copied during the Copying stage" + }, + "elapsedTime": { + "type": "string", + "description": "The elapsed time in the format [ddd.]hh:mm:ss[.fffffff] (i.e. TimeSpan format)" + }, + "errors": { + "type": "object", + "description": "The errors and warnings that have occurred for the current object. The keys are the error codes.", + "additionalProperties": { + "$ref": "#/definitions/MongoDbError" + } + }, + "eventsPending": { + "type": "integer", + "format": "int64", + "description": "The number of oplog events awaiting replay" + }, + "eventsReplayed": { + "type": "integer", + "format": "int64", + "description": "The number of oplog events replayed so far" + }, + "lastEventTime": { + "type": "string", + "format": "date-time", + "description": "The timestamp of the last oplog event received, or null if no oplog event has been received yet" + }, + "lastReplayTime": { + "type": "string", + "format": "date-time", + "description": "The timestamp of the last oplog event replayed, or null if no oplog event has been replayed yet" + }, + "name": { + "type": "string", + "description": "The name of the progress object. For a collection, this is the unqualified collection name. For a database, this is the database name. For the overall migration, this is null." + }, + "qualifiedName": { + "type": "string", + "description": "The qualified name of the progress object. For a collection, this is the database-qualified name. For a database, this is the database name. For the overall migration, this is null." + }, + "resultType": { + "type": "string", + "description": "The type of progress object", + "enum": [ + "Migration", + "Database", + "Collection" + ] + }, + "state": { + "type": "string", + "enum": [ + "NotStarted", + "ValidatingInput", + "Initializing", + "Restarting", + "Copying", + "InitialReplay", + "Replaying", + "Finalizing", + "Complete", + "Canceled", + "Failed" + ], + "x-ms-enum": { + "name": "MongoDbMigrationState", + "modelAsString": true + } + }, + "totalBytes": { + "type": "integer", + "format": "int64", + "description": "The total number of document bytes on the source at the beginning of the Copying stage, or -1 if the total size was unknown" + }, + "totalDocuments": { + "type": "integer", + "format": "int64", + "description": "The total number of documents on the source at the beginning of the Copying stage, or -1 if the total count was unknown" + } + }, + "required": [ + "bytesCopied", + "documentsCopied", + "elapsedTime", + "errors", + "eventsPending", + "eventsReplayed", + "resultType", + "state", + "totalBytes", + "totalDocuments" + ], + "discriminator": "ResultType" + }, + "MongoDbMigrationProgress": { + "x-ms-discriminator-value": "Migration", + "type": "object", + "description": "Describes the progress of the overall migration", + "properties": { + "databases": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/MongoDbDatabaseProgress" + }, + "description": "The progress of the databases in the migration. The keys are the names of the databases" + } + }, + "allOf": [ + { + "$ref": "#/definitions/MongoDbProgress" + } + ] + }, + "MongoDbObjectInfo": { + "type": "object", + "description": "Describes a database or collection within a MongoDB data source", + "properties": { + "averageDocumentSize": { + "type": "integer", + "format": "int64", + "description": "The average document size, or -1 if the average size is unknown" + }, + "dataSize": { + "type": "integer", + "format": "int64", + "description": "The estimated total data size, in bytes, or -1 if the size is unknown." + }, + "documentCount": { + "type": "integer", + "format": "int64", + "description": "The estimated total number of documents, or -1 if the document count is unknown" + }, + "name": { + "type": "string", + "description": "The unqualified name of the database or collection" + }, + "qualifiedName": { + "type": "string", + "description": "The qualified name of the database or collection. For a collection, this is the database-qualified name." + } + }, + "required": [ + "averageDocumentSize", + "dataSize", + "documentCount", + "name", + "qualifiedName" + ] + }, + "MongoDbRestartCommand": { + "x-ms-discriminator-value": "restart", + "type": "object", + "description": "Properties for the command that restarts a migration in whole or in part", + "properties": { + "input": { + "$ref": "#/definitions/MongoDbCommandInput", + "description": "Command input" + } + }, + "allOf": [ + { + "$ref": "Commands.json#/definitions/CommandProperties" + } + ] + }, + "MongoDbShardKeyField": { + "type": "object", + "description": "Describes a field reference within a MongoDB shard key", + "properties": { + "name": { + "type": "string", + "description": "The name of the field" + }, + "order": { + "type": "string", + "description": "The field ordering", + "enum": [ + "Forward", + "Reverse", + "Hashed" + ], + "x-ms-enum": { + "name": "MongoDbShardKeyOrder", + "modelAsString": true + } + } + }, + "required": [ + "name", + "order" + ] + }, + "MongoDbShardKeyInfo": { + "type": "object", + "description": "Describes a MongoDB shard key", + "properties": { + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/MongoDbShardKeyField" + }, + "description": "The fields within the shard key" + }, + "isUnique": { + "type": "boolean", + "description": "Whether the shard key is unique" + } + }, + "required": [ + "fields", + "isUnique" + ] + }, + "MongoDbShardKeySetting": { + "type": "object", + "description": "Describes a MongoDB shard key", + "properties": { + "fields": { + "type": "array", + "items": { + "$ref": "#/definitions/MongoDbShardKeyField" + }, + "description": "The fields within the shard key" + }, + "isUnique": { + "type": "boolean", + "description": "Whether the shard key is unique" + } + }, + "required": [ + "fields", + "isUnique" + ] + }, + "MongoDbThrottlingSettings": { + "type": "object", + "description": "Specifies resource limits for the migration", + "properties": { + "minFreeCpu": { + "type": "integer", + "format": "int32", + "description": "The percentage of CPU time that the migrator will try to avoid using, from 0 to 100" + }, + "minFreeMemoryMb": { + "type": "integer", + "format": "int32", + "description": "The number of megabytes of RAM that the migrator will try to avoid using" + }, + "maxParallelism": { + "type": "integer", + "format": "int32", + "description": "The maximum number of work items (e.g. collection copies) that will be processed in parallel" + } + } + } + } +} diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Projects.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Projects.json index ba96f67550ab..65f74e959cc8 100644 --- a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Projects.json +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/definitions/Projects.json @@ -117,6 +117,7 @@ "SQL", "MySQL", "PostgreSql", + "MongoDb", "Unknown" ], "x-ms-enum": { @@ -132,6 +133,7 @@ "SQLMI", "AzureDbForMySql", "AzureDbForPostgreSql", + "MongoDb", "Unknown" ], "x-ms-enum": { 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 c1240937907b..7a27c3a1a67a 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 @@ -101,6 +101,29 @@ } } }, + "ConnectToMongoDbTaskProperties": { + "x-ms-discriminator-value": "Connect.MongoDb", + "type": "object", + "description": "Properties for the task that validates the connection to and provides information about a MongoDB server", + "properties": { + "input": { + "$ref": "./Common.json#/definitions/MongoDbConnectionInfo" + }, + "output": { + "type": "array", + "description": "An array containing a single MongoDbClusterInfo object", + "items": { + "$ref": "./MongoDbTasks.json#/definitions/MongoDbClusterInfo" + }, + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/ProjectTaskProperties" + } + ] + }, "ConnectToSourceSqlServerTaskProperties": { "x-ms-discriminator-value": "ConnectToSource.SqlServer", "type": "object", @@ -293,6 +316,28 @@ } ] }, + "MigrateMongoDbTaskProperties": { + "x-ms-discriminator-value": "Migrate.MongoDb", + "type": "object", + "description": "Properties for the task that migrates data between MongoDB data sources", + "properties": { + "input": { + "$ref": "./MongoDbTasks.json#/definitions/MongoDbMigrationSettings" + }, + "output": { + "type": "array", + "items": { + "$ref": "./MongoDbTasks.json#/definitions/MongoDbProgress" + }, + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/ProjectTaskProperties" + } + ] + }, "MigrateSqlServerSqlMITaskProperties": { "x-ms-discriminator-value": "Migrate.SqlServer.AzureSqlDbMI", "type": "object", @@ -461,6 +506,29 @@ } ] }, + "ValidateMongoDbTaskProperties": { + "x-ms-discriminator-value": "Validate.MongoDb", + "type": "object", + "description": "Properties for the task that validates a migration between MongoDB data sources", + "properties": { + "input": { + "$ref": "./MongoDbTasks.json#/definitions/MongoDbMigrationSettings" + }, + "output": { + "type": "array", + "description": "An array containing a single MongoDbMigrationProgress object", + "items": { + "$ref": "./MongoDbTasks.json#/definitions/MongoDbMigrationProgress" + }, + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/ProjectTaskProperties" + } + ] + }, "GetTdeCertificatesSqlTaskProperties": { "x-ms-discriminator-value": "GetTDECertificates.Sql", "type": "object", diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_CreateOrUpdate.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_CreateOrUpdate.json new file mode 100644 index 000000000000..2ab0397d37fe --- /dev/null +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_CreateOrUpdate.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "fc04246f-04c5-437e-ac5e-206a19e7193f", + "groupName": "DmsSdkRg", + "serviceName": "DmsSdkService", + "projectName": "DmsSdkProject", + "fileName": "x114d023d8", + "api-version": "2018-07-15-preview", + "parameters": { + "properties": { + "filePath": "DmsSdkFilePath/DmsSdkFile.sql" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "extension": "sql", + "filePath": "DmsSdkFilePath/DmsSdkFile.sql" + }, + "etag": "C2WE6C3yt2I0hunjpjzffY8LhTLqrJZHJ20gkuq2ZOA=", + "id": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkRg/providers/Microsoft.DataMigration/services/DmsSdkService/projects/DmsSdkProject/files/x114d023d8", + "name": "x114d023d8", + "type": "Microsoft.DataMigration/services/projects/files" + } + }, + "201": { + "body": { + "properties": { + "extension": "sql", + "filePath": "DmsSdkFilePath/DmsSdkFile.sql" + }, + "etag": "C2WE6C3yt2I0hunjpjzffY8LhTLqrJZHJ20gkuq2ZOA=", + "id": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkRg/providers/Microsoft.DataMigration/services/DmsSdkService/projects/DmsSdkProject/files/x114d023d8", + "name": "x114d023d8", + "type": "Microsoft.DataMigration/services/projects/files" + } + } + } +} diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Delete.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Delete.json new file mode 100644 index 000000000000..5963acb6412f --- /dev/null +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Delete.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "subscriptionId": "fc04246f-04c5-437e-ac5e-206a19e7193f", + "groupName": "DmsSdkRg", + "serviceName": "DmsSdkService", + "projectName": "DmsSdkProject", + "fileName": "x114d023d8", + "api-version": "2018-07-15-preview" + }, + "responses": { + "200": { + "body": "" + }, + "204": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Get.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Get.json new file mode 100644 index 000000000000..a6abd1a4a774 --- /dev/null +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Get.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "subscriptionId": "fc04246f-04c5-437e-ac5e-206a19e7193f", + "groupName": "DmsSdkRg", + "serviceName": "DmsSdkService", + "projectName": "DmsSdkProject", + "fileName": "x114d023d8", + "api-version": "2018-07-15-preview" + }, + "responses": { + "200": { + "body": { + "properties": { + "extension": "sql", + "filePath": "SchemaInput/DmsSdkFile.sql", + "lastModified": "2018-08-15T20:01:33+00:00", + "mediaType": "text/plain", + "size": 51835 + }, + "id": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkRg/providers/Microsoft.DataMigration/services/DmsSdkService/projects/DmsSdkProject/files/x114d023d8", + "name": "x114d023d8", + "type": "Microsoft.DataMigration/services/projects/files" + } + } + } +} diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_List.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_List.json new file mode 100644 index 000000000000..d64409ef7034 --- /dev/null +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_List.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "subscriptionId": "fc04246f-04c5-437e-ac5e-206a19e7193f", + "groupName": "DmsSdkRg", + "serviceName": "DmsSdkService", + "projectName": "DmsSdkProject", + "api-version": "2018-07-15-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "extension": "sql", + "filePath": "SchemaInput/DmsSdkFile.sql", + "lastModified": "2018-08-15T20:01:33+00:00", + "mediaType": "text/plain", + "size": 51835 + }, + "id": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkRg/providers/Microsoft.DataMigration/services/DmsSdkService/projects/DmsSdkProject/files/x114d023d8", + "name": "x114d023d8", + "type": "Microsoft.DataMigration/services/projects/files" + }, + { + "properties": { + "extension": "sql", + "filePath": "7daf055f-82b0-483e-9da0-4244b4eaa9b0/AdventureWorks2008.sql", + "lastModified": "2018-10-05T16:51:03+00:00", + "mediaType": "text/plain", + "size": 910278 + }, + "id": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkRg/providers/Microsoft.DataMigration/services/DmsSdkService/projects/DmsSdkProject/files/pfpu7fxqcpziyg2h3qj2vb7d8jpbbg7p", + "name": "pfpu7fxqcpziyg2h3qj2vb7d8jpbbg7p", + "type": "Microsoft.DataMigration/services/projects/files" + } + ] + } + } + } +} diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Read.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Read.json new file mode 100644 index 000000000000..c495e97dfb6e --- /dev/null +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Read.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "fc04246f-04c5-437e-ac5e-206a19e7193f", + "groupName": "DmsSdkRg", + "serviceName": "DmsSdkService", + "projectName": "DmsSdkProject", + "fileName": "x114d023d8", + "api-version": "2018-07-15-preview" + }, + "responses": { + "200": { + "body": { + "uri": "https://dmssdkservicestorage.blob.core.windows.net/dmssdkservicecontainer/_rpfiles/dmssdkproject/pfpu7fxqcpziyg2h3qj2vb7d8jpbbg7p?sv=2016-05-31&sr=b&sig=sassignature&se=2018-10-05T18%3A21%3A42Z&sp=r", + "headers": { + "x-ms-blob-type": "BlockBlob" + } + } + } + } +} diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_ReadWrite.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_ReadWrite.json new file mode 100644 index 000000000000..505998cb37f1 --- /dev/null +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_ReadWrite.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "subscriptionId": "fc04246f-04c5-437e-ac5e-206a19e7193f", + "groupName": "DmsSdkRg", + "serviceName": "DmsSdkService", + "projectName": "DmsSdkProject", + "fileName": "x114d023d8", + "api-version": "2018-07-15-preview" + }, + "responses": { + "200": { + "body": { + "uri": "https://dmssdkservicestorage.blob.core.windows.net/dmssdkservicecontainer/_rpfiles/dmssdkproject/pfpu7fxqcpziyg2h3qj2vb7d8jpbbg7p?sv=2016-05-31&sr=b&sig=sassignature&se=2018-10-05T18%3A21%3A42Z&sp=racwd", + "headers": { + "x-ms-blob-type": "BlockBlob" + } + } + } + } +} diff --git a/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Update.json b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Update.json new file mode 100644 index 000000000000..f11671d8586a --- /dev/null +++ b/specification/datamigration/resource-manager/Microsoft.DataMigration/preview/2018-07-15-preview/examples/Files_Update.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "subscriptionId": "fc04246f-04c5-437e-ac5e-206a19e7193f", + "groupName": "DmsSdkRg", + "serviceName": "DmsSdkService", + "projectName": "DmsSdkProject", + "fileName": "x114d023d8", + "api-version": "2018-07-15-preview", + "parameters": { + "properties": { + "filePath": "DmsSdkFilePath/DmsSdkFile.sql" + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "extension": "sql", + "filePath": "DmsSdkFilePath/DmsSdkFile.sql" + }, + "etag": "C2WE6C3yt2I0hunjpjzffY8LhTLqrJZHJ20gkuq2ZOA=", + "id": "/subscriptions/fc04246f-04c5-437e-ac5e-206a19e7193f/resourceGroups/DmsSdkRg/providers/Microsoft.DataMigration/services/DmsSdkService/projects/DmsSdkProject/files/x114d023d8", + "name": "x114d023d8", + "type": "Microsoft.DataMigration/services/projects/files" + } + } + } +} \ No newline at end of file