Skip to content

Commit

Permalink
Add change directory to reservations spec 2020-10-01-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Oh committed Nov 6, 2020
1 parent 28cd66f commit 064f7a9
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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`.",
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 064f7a9

Please sign in to comment.