Skip to content

Commit

Permalink
Enabling archival and unarchival of a reservation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sornakumar Sundararajan committed Oct 16, 2020
1 parent d0e81d2 commit b14abd9
Show file tree
Hide file tree
Showing 7 changed files with 142 additions and 35 deletions.
4 changes: 3 additions & 1 deletion custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1982,4 +1982,6 @@ appxmanifest
Appxmanifest
msixpackage
xml
Creds
Creds
unarchive
unarchiving
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": {
"api-version": "2019-04-01",
"reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da",
"reservationId": "356e7ae4-84d0-4da6-ab4b-d6b94f3557da"
},
"responses": {
"200": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83",
"term": "P1Y",
"billingPlan": "Monthly",
"quantity": "1",
"quantity": 1,
"displayName": "TestReservationOrder",
"appliedScopes": null,
"appliedScopeType": "Shared",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,16 @@
"P1Y",
"P3Y"
],
"billingPlans": [
{
"P1Y": [
"Upfront",
"Monthly"
]
},
{
"P3Y": [
"Upfront",
"Monthly"
]
}
],
"billingPlans": {
"P1Y": [
"Upfront",
"Monthly"
],
"P3Y": [
"Upfront",
"Monthly"
]
},
"locations": [
"eastus"
],
Expand Down Expand Up @@ -122,20 +118,16 @@
"P1Y",
"P3Y"
],
"billingPlans": [
{
"P1Y": [
"Upfront",
"Monthly"
]
},
{
"P3Y": [
"Upfront",
"Monthly"
]
}
],
"billingPlans": {
"P1Y": [
"Upfront",
"Monthly"
],
"P3Y": [
"Upfront",
"Monthly"
]
},
"locations": [
"eastus"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83",
"term": "P1Y",
"billingPlan": "Monthly",
"quantity": "1",
"quantity": 1,
"displayName": "TestReservationOrder",
"appliedScopes": null,
"appliedScopeType": "Shared",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"parameters": {
"api-version": "2019-04-01",
"reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da",
"reservationId": "356e7ae4-84d0-4da6-ab4b-d6b94f3557da"
},
"responses": {
"200": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,80 @@
}
}
},
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive": {
"post": {
"summary": "Archive a `Reservation`.",
"description": "Archiving a `Reservation` moves it to `Archived` state.",
"operationId": "Reservation_Archive",
"x-ms-examples": {
"Archive": {
"$ref": "./examples/Archive.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ReservationOrderIdParameter"
},
{
"$ref": "#/parameters/ReservationIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"tags": [
"Reservation, Archive"
],
"responses": {
"200": {
"description": "Archived a reservation."
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive": {
"post": {
"summary": "Unarchive a `Reservation`.",
"description": "Unarchiving a `Reservation` moves it to the state it was before archiving.\n",
"operationId": "Reservation_Unarchive",
"x-ms-examples": {
"Unarchive": {
"$ref": "./examples/Unarchive.json"
}
},
"parameters": [
{
"$ref": "#/parameters/ReservationOrderIdParameter"
},
{
"$ref": "#/parameters/ReservationIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"tags": [
"Reservation, Unarchive"
],
"responses": {
"200": {
"description": "Unarchive complete for the reservation."
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/providers/Microsoft.Capacity/operations": {
"get": {
"summary": "Get operations.",
Expand Down Expand Up @@ -1639,6 +1713,27 @@
"format": "double"
}
}
},
"AvailableScopeRequest": {
"type": "object",
"properties": {
"properties": {
"$ref": "#/definitions/AvailableScopeRequestProperties"
}
}
},
"AvailableScopeRequestProperties": {
"description": "List of scopes for which availability should be checked",
"type": "object",
"properties": {
"scopes": {
"description": "Scopes to be checked for availability",
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"parameters": {
Expand All @@ -1647,11 +1742,9 @@
"x-ms-parameter-location": "method",
"in": "body",
"required": true,
"description": "Parameter for listing the available scopes",
"schema": {
"type": "array",
"items": {
"type": "string"
}
"$ref": "#/definitions/AvailableScopeRequest"
}
},
"PurchaseParameter": {
Expand Down

0 comments on commit b14abd9

Please sign in to comment.