From 0004242bc9f2b33ae7558ba6adc8a9a3ea6dcce9 Mon Sep 17 00:00:00 2001 From: Durgesh Kumar Date: Mon, 18 Jan 2021 02:12:16 +0530 Subject: [PATCH 1/3] adding required for api changes --- .../examples/RequiredFor_Get.json | 18 ++++++ .../resourcemovercollection.json | 64 ++++++++++++++++++- 2 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json diff --git a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json new file mode 100644 index 000000000000..871eb4ff1211 --- /dev/null +++ b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "moveCollectionName": "movecollection1", + "subscriptionId": "subid", + "resourceGroupName": "rg1", + "sourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/nic1", + "api-version": "2019-10-01-preview" + }, + "responses": { + "200": { + "body": { + "SourceIds": [ + "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1" + ] + } + } + } +} diff --git a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json index a25f9f2fb923..0070232cc936 100644 --- a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json +++ b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json @@ -961,7 +961,56 @@ } } } - } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/requiredFor": { + "get": { + "description": "List of the move resources for which an arm resource is required for.", + "operationId": "MoveCollections_GetRequiredFor", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "#/parameters/moveCollectionName" + }, + { + "name": "sourceId", + "in": "query", + "required": true, + "type": "string", + "description": "The sourceId for which the api is invoked." + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/RequiredForResourcesCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/CloudError" + } + } + }, + "x-ms-examples": { + "UnresolvedDependencies_Get": { + "$ref": "./examples/RequiredFor_Get.json" + } + } + } + } }, "definitions": { "ResourceIdentityType": { @@ -1611,6 +1660,19 @@ } } }, + "RequiredForResourcesCollection": { + "description": "Required for resources collection.", + "type": "object", + "properties": { + "SourceIds": { + "description": "Gets or sets the list of source Ids for which the input resource is required.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, "Display": { "description": "Contains the localized display information for this particular operation / action. These\r\nvalue will be used by several clients for\r\n(1) custom role definitions for RBAC;\r\n(2) complex query filters for the event service; and\r\n(3) audit history / records for management operations.", "type": "object", From 24fa7a40646ee481b0df880fe1395b4f3af6cd7b Mon Sep 17 00:00:00 2001 From: Durgesh Kumar Date: Mon, 18 Jan 2021 02:36:50 +0530 Subject: [PATCH 2/3] fixing npmpretty checks and lint issues --- .../2019-10-01-preview/examples/RequiredFor_Get.json | 2 +- .../preview/2019-10-01-preview/resourcemovercollection.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json index 871eb4ff1211..f31cc0747229 100644 --- a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json +++ b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json @@ -9,7 +9,7 @@ "responses": { "200": { "body": { - "SourceIds": [ + "sourceIds": [ "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/networkInterfaces/nic1" ] } diff --git a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json index 0070232cc936..48e8a1a5e3e9 100644 --- a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json +++ b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json @@ -965,7 +965,7 @@ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Migrate/moveCollections/{moveCollectionName}/requiredFor": { "get": { "description": "List of the move resources for which an arm resource is required for.", - "operationId": "MoveCollections_GetRequiredFor", + "operationId": "MoveCollections_ListRequiredFor", "produces": [ "application/json" ], @@ -1005,12 +1005,12 @@ } }, "x-ms-examples": { - "UnresolvedDependencies_Get": { + "RequiredFor_Get": { "$ref": "./examples/RequiredFor_Get.json" } } } - } + } }, "definitions": { "ResourceIdentityType": { From c8b215fe241e4d82ea8403056651a8bae59f4ba0 Mon Sep 17 00:00:00 2001 From: Durgesh Kumar Date: Mon, 18 Jan 2021 02:44:51 +0530 Subject: [PATCH 3/3] linting fixes 2 --- .../preview/2019-10-01-preview/examples/RequiredFor_Get.json | 2 +- .../preview/2019-10-01-preview/resourcemovercollection.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json index f31cc0747229..8cdcf8c68b47 100644 --- a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json +++ b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/examples/RequiredFor_Get.json @@ -3,7 +3,7 @@ "moveCollectionName": "movecollection1", "subscriptionId": "subid", "resourceGroupName": "rg1", - "sourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/nic1", + "sourceId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/nic1", "api-version": "2019-10-01-preview" }, "responses": { diff --git a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json index 48e8a1a5e3e9..f9b4bc53a501 100644 --- a/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json +++ b/specification/resourcemover/resource-manager/Microsoft.Migrate/preview/2019-10-01-preview/resourcemovercollection.json @@ -1664,7 +1664,7 @@ "description": "Required for resources collection.", "type": "object", "properties": { - "SourceIds": { + "sourceIds": { "description": "Gets or sets the list of source Ids for which the input resource is required.", "type": "array", "items": {