From 22fb68d99705b51cfcfebebe80642e9b6f39985f Mon Sep 17 00:00:00 2001 From: dukum Date: Fri, 14 Aug 2020 20:14:30 +0530 Subject: [PATCH 1/3] adding remove move resources api --- .../MoveCollections_RemoveMoveResources.json | 26 +++++ .../regionmovecollection.json | 97 +++++++++++++++++++ 2 files changed, 123 insertions(+) create mode 100644 specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/MoveCollections_RemoveMoveResources.json diff --git a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/MoveCollections_RemoveMoveResources.json b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/MoveCollections_RemoveMoveResources.json new file mode 100644 index 000000000000..03877882ade2 --- /dev/null +++ b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/MoveCollections_RemoveMoveResources.json @@ -0,0 +1,26 @@ +{ + "parameters": { + "moveCollectionName": "movecollection1", + "subscriptionId": "subid", + "resourceGroupName": "rg1", + "api-version": "2019-10-01-preview", + "validateOnly": false, + "moveResources": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Migrate/MoveCollections/movecollection1/MoveResources/moveresource1" + ] + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/e80eb9fa-c996-4435-aa32-5af6f3d3077c/resourceGroups/RegionMoveRG-southcentralus-southeastasia/providers/Microsoft.Migrate/MoveCollections/MoveCollection-southcentralus-southeastasia/operations/1e4193c3-206e-4916-b124-1da16175eb0e", + "name": "1e4193c3-206e-4916-b124-1da16175eb0e", + "status": "Succeeded", + "startTime": "6/17/2020 6:45:55 AM", + "endTime": "6/17/2020 6:45:56 AM", + "error": null, + "properties": {} + } + }, + "202": {} + } +} diff --git a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json index a0b0c4313636..72c9b2446df5 100644 --- a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json +++ b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json @@ -666,6 +666,71 @@ } } }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/removeMoveResources": { + "post": { + "tags": [ + "MoveCollections" + ], + "operationId": "MoveCollections_RemoveMoveResources", + "description": "Removes the set of resources included in the request body from move collection. The orchestration is done by service. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.", + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "consumes": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "in": "path", + "name": "resourceGroupName", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "moveCollectionName", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "in": "body", + "name": "body", + "schema": { + "$ref": "#/definitions/RemoveMoveResourcesRequest" + } + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/OperationStatus" + } + }, + "202": { + "description": "Accepted" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "MoveCollections_RemoveMoveResources": { + "$ref": "./examples/MoveCollections_RemoveMoveResources.json" + } + } + } + }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/moveResources/{moveResourceName}": { "put": { "tags": [ @@ -1033,6 +1098,18 @@ "modelAsString": true } }, + "MoveResourceInputType": { + "description": "Defines the move resource input type.", + "type": "string", + "enum": [ + "MoveResourceId", + "MoveResourceSourceId" + ], + "x-ms-enum": { + "name": "moveResourceInputType", + "modelAsString": true + } + }, "ProvisioningState": { "description": "Defines the provisioning states.", "enum": [ @@ -1400,6 +1477,26 @@ } } }, + "RemoveMoveResourcesRequest": { + "description": "Defines the request body for remove of move resources operation.", + "type": "object", + "properties": { + "validateOnly": { + "description": "Gets or sets a value indicating whether the operation needs to only run pre-requisite.", + "type": "boolean" + }, + "moveResources": { + "description": "Gets or sets the list of resource Id's, by default it accepts move resource id's unless the input type is switched via moveResourceInputType property.", + "type": "array", + "items": { + "type": "string" + } + }, + "moveResourceInputType": { + "$ref": "#/definitions/MoveResourceInputType" + } + } + }, "MoveResourceFilter": { "description": "Move resource filter.", "properties": { From f30e25c77aa30d88868fc0de9497f0d81eb2d390 Mon Sep 17 00:00:00 2001 From: dukum Date: Mon, 17 Aug 2020 16:30:57 +0530 Subject: [PATCH 2/3] syncing with master --- .../preview/2019-10-01-preview/regionmovecollection.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json index 9bbdaf090807..b106577cb4d2 100644 --- a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json +++ b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json @@ -678,7 +678,7 @@ "MoveCollections" ], "operationId": "MoveCollections_RemoveMoveResources", - "description": "Removes the set of resources included in the request body from move collection. The orchestration is done by service. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.", + "description": "Removes the set of move resources included in the request body from move collection. The orchestration is done by service. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.", "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { "final-state-via": "azure-async-operation" From e0d681cc068689ea64172e2b6b9a7e956fedf1b6 Mon Sep 17 00:00:00 2001 From: dukum Date: Tue, 18 Aug 2020 19:34:31 +0530 Subject: [PATCH 3/3] renaming the api --- ...ources.json => MoveCollections_BulkRemove.json} | 0 .../2019-10-01-preview/regionmovecollection.json | 14 +++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) rename specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/{MoveCollections_RemoveMoveResources.json => MoveCollections_BulkRemove.json} (100%) diff --git a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/MoveCollections_RemoveMoveResources.json b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/MoveCollections_BulkRemove.json similarity index 100% rename from specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/MoveCollections_RemoveMoveResources.json rename to specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/MoveCollections_BulkRemove.json diff --git a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json index b106577cb4d2..19bf4fdd1d8d 100644 --- a/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json +++ b/specification/regionmove/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/regionmovecollection.json @@ -672,12 +672,12 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/removeMoveResources": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/bulkRemove": { "post": { "tags": [ "MoveCollections" ], - "operationId": "MoveCollections_RemoveMoveResources", + "operationId": "MoveCollections_BulkRemove", "description": "Removes the set of move resources included in the request body from move collection. The orchestration is done by service. To aid the user to prerequisite the operation the client can call operation with validateOnly property set to true.", "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { @@ -709,7 +709,7 @@ "in": "body", "name": "body", "schema": { - "$ref": "#/definitions/RemoveMoveResourcesRequest" + "$ref": "#/definitions/BulkRemoveRequest" } } ], @@ -731,8 +731,8 @@ } }, "x-ms-examples": { - "MoveCollections_RemoveMoveResources": { - "$ref": "./examples/MoveCollections_RemoveMoveResources.json" + "MoveCollections_BulkRemove": { + "$ref": "./examples/MoveCollections_BulkRemove.json" } } } @@ -1528,8 +1528,8 @@ } } }, - "RemoveMoveResourcesRequest": { - "description": "Defines the request body for remove of move resources operation.", + "BulkRemoveRequest": { + "description": "Defines the request body for bulk remove of move resources operation.", "type": "object", "properties": { "validateOnly": {