diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2020-10-01-preview/examples/ChangeDirectoryReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2020-10-01-preview/examples/ChangeDirectoryReservationOrder.json new file mode 100644 index 000000000000..e31627c889dc --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2020-10-01-preview/examples/ChangeDirectoryReservationOrder.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2020-10-01-preview", + "reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9", + "body": { + "destinationTenantId": "906655ea-30be-4587-9d12-b50e077b0f32" + } + }, + "responses": { + "200": { + "body": { + "reservationOrder" : { + "id": "1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "name": "VM_RI_10-02-2020_15-21", + "isSucceeded": true, + "error": "error string" + }, + "reservations" : [ + { + "id": "1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "name": "VM_RI_10-02-2020_15-21", + "isSucceeded": true, + "error": "error string" + } + ] + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2020-10-01-preview/reservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2020-10-01-preview/reservations.json index 65ffe539d6a2..2cf222b5ddf8 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2020-10-01-preview/reservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2020-10-01-preview/reservations.json @@ -322,6 +322,49 @@ } } }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/changeDirectory": { + "post": { + "summary": "Change direcotory of `ReservationOrder`.", + "description": "Change directory (tenant) of `ReservationOrder` and all `Reservation` under it to specified tenant id", + "operationId": "ReservationOrder_ChangeDirectory", + "x-ms-examples": { + "Split": { + "$ref": "./examples/ChangeDirectoryReservationOrder.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ChangeDirectoryParameter" + } + ], + "tags": [ + "ReservationOrder, ChangeDirectory" + ], + "responses": { + "200": { + "description": "List of `Reservation`s created after the split operation.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ChangeDirectoryResponse" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split": { "post": { "summary": "Split the `Reservation`.", @@ -1482,6 +1525,59 @@ } } }, + "ChangeDirectoryResponse": { + "type": "object", + "description": "Change direcotry response", + "properties": { + "reservationOrder": { + "type": "object", + "description": "Change direcotry result for reservation order", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the reservation order" + }, + "name": { + "type": "string", + "description": "Name of the reservation order" + }, + "isSucceeded": { + "description": "True if change directory operation succeeded on this reservation order", + "type": "boolean" + }, + "error": { + "type": "string", + "description": "Error reason if operation failed. Null otherwise" + } + } + }, + "reservations": { + "type": "array", + "items": { + "type": "object", + "description": "Change direcotry result for reservation", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the reservation" + }, + "name": { + "type": "string", + "description": "Name of the reservation" + }, + "isSucceeded": { + "description": "True if change directory operation succeeded on this reservation", + "type": "boolean" + }, + "error": { + "type": "string", + "description": "Error reason if operation failed. Null otherwise" + } + } + } + } + } + }, "RenewPropertiesResponse": { "type": "object", "properties": { @@ -1829,6 +1925,15 @@ } } }, + "ChangeDirectoryRequest": { + "type": "object", + "properties": { + "destinationTenantId": { + "description": "Tenant id GUID that reservation order is to be tranferred to", + "type": "string" + } + } + }, "Error": { "type": "object", "properties": { @@ -2183,6 +2288,16 @@ "$ref": "#/definitions/SplitRequest" } }, + "ChangeDirectoryParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Information needed to change directory of reservation order", + "schema": { + "$ref": "#/definitions/ChangeDirectoryRequest" + } + }, "ApiVersionParameter": { "name": "api-version", "in": "query",