Skip to content

Commit

Permalink
Adding Azure-AsyncOperation header (#12080)
Browse files Browse the repository at this point in the history
  • Loading branch information
juhee0202 committed Dec 15, 2020
1 parent d06151c commit 216e7ae
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,25 @@
"properties": {
"sessionId": "66e2ac8f-439e-4345-8235-6fef07608081",
"netPayable": {
"currencyCode": "EUR",
"amount": -688.11
"currencyCode": "USD",
"amount": 15840.0
},
"refundsTotal": {
"currencyCode": "EUR",
"amount": 2938.11
"currencyCode": "USD",
"amount": 3960.0
},
"purchasesTotal": {
"currencyCode": "EUR",
"amount": 2250.0
"currencyCode": "USD",
"amount": 19800.0
},
"policyResult": {
"policyErrors": null
},
"reservationsToPurchase": [
{
"billingCurrencyTotal": {
"currencyCode": "EUR",
"amount": 2250.0
"currencyCode": "USD",
"amount": 19800.0
}
}
],
Expand All @@ -67,40 +70,32 @@
"reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6",
"quantity": 1,
"billingRefundAmount": {
"currencyCode": "EUR",
"amount": 34.17
"currencyCode": "USD",
"amount": 3960.0
},
"billingInformation": {
"billingCurrencyTotalPaidAmount": {
"currencyCode": "EUR",
"amount": 170.82
"currencyCode": "USD",
"amount": 19800.0
},
"billingCurrencyProratedAmount": {
"currencyCode": "EUR",
"amount": 136.65
"currencyCode": "USD",
"amount": 15840.0
},
"billingCurrencyRemainingCommitmentAmount": {
"currencyCode": "EUR",
"amount": 2903.94
"currencyCode": "USD",
"amount": 0.0
}
}
}
],
"policyResult": {
"policyErrors": [
{
"code": "RefundsLessThanPurchase",
"message": "New purchase amount should be greater than the total refunds."
}
]
}
},
"error": null
]
}
}
},
"202": {
"headers": {
"Location": "https://management.azure.com/Microsoft.Capacity/operationResults/8d542218-8bfe-4fd2-b909-0656c610281c?api-version=2019-04-01",
"Azure-AsyncOperation": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2020-10-01-preview",
"Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2020-10-01-preview",
"Retry-After": 5
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,26 @@
"properties": {
"sessionId": "66e2ac8f-439e-4345-8235-6fef07608081",
"netPayable": {
"currencyCode": "EUR",
"amount": -688.11
"currencyCode": "USD",
"amount": 15840.0
},
"refundsTotal": {
"currencyCode": "EUR",
"amount": 2938.11
"currencyCode": "USD",
"amount": 3960.0
},
"purchasesTotal": {
"currencyCode": "EUR",
"amount": 2250.0
"currencyCode": "USD",
"amount": 19800.0
},
"policyResult": {
"policyErrors": null
},
"reservationsToPurchase": [
{
"reservationOrderId": "/providers/microsoft.capacity/reservationOrders/1e85c519-b815-4169-8d79-62fc460c608f",
"billingCurrencyTotal": {
"currencyCode": "EUR",
"amount": 2250.0
"currencyCode": "USD",
"amount": 19800.0
},
"status": "Succeeded"
}
Expand All @@ -42,41 +45,33 @@
"reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6",
"quantity": 1,
"billingRefundAmount": {
"currencyCode": "EUR",
"amount": 34.17
"currencyCode": "USD",
"amount": 3960.0
},
"billingInformation": {
"billingCurrencyTotalPaidAmount": {
"currencyCode": "EUR",
"amount": 170.82
"currencyCode": "USD",
"amount": 19800.0
},
"billingCurrencyProratedAmount": {
"currencyCode": "EUR",
"amount": 136.65
"currencyCode": "USD",
"amount": 15840.0
},
"billingCurrencyRemainingCommitmentAmount": {
"currencyCode": "EUR",
"amount": 2903.94
"currencyCode": "USD",
"amount": 0.0
}
},
"status": "Succeeded"
}
],
"policyResult": {
"policyErrors": [
{
"code": "RefundsLessThanPurchase",
"message": "New purchase amount should be greater than the total refunds."
}
]
}
},
"error": null
]
}
}
},
"202": {
"headers": {
"Location": "https://management.azure.com/Microsoft.Capacity/operationResults/8d542218-8bfe-4fd2-b909-0656c610281c?api-version=2019-04-01",
"Azure-AsyncOperation": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2020-10-01-preview",
"Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2020-10-01-preview",
"Retry-After": 5
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,7 @@
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
"final-state-via": "azure-async-operation"
},
"parameters": [
{
Expand All @@ -666,9 +666,13 @@
"202": {
"description": "The request is accepted and is being processed.",
"headers": {
"Azure-AsyncOperation": {
"type": "string",
"description": "URL for checking the ongoing status of the operation."
},
"Location": {
"type": "string",
"description": "URL to query for the status of the operation."
"description": "URL for determining when an operation has completed. Only use this value only when Azure-AsyncOperation isn't returned."
},
"Retry-After": {
"type": "integer",
Expand Down Expand Up @@ -698,7 +702,7 @@
},
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
"final-state-via": "azure-async-operation"
},
"parameters": [
{
Expand All @@ -721,9 +725,13 @@
"202": {
"description": "The request is accepted and is being processed.",
"headers": {
"Azure-AsyncOperation": {
"type": "string",
"description": "URL for checking the ongoing status of the operation."
},
"Location": {
"type": "string",
"description": "URL to query for the status of the operation."
"description": "URL for determining when an operation has completed. Only use this value only when Azure-AsyncOperation isn't returned."
},
"Retry-After": {
"type": "integer",
Expand Down

0 comments on commit 216e7ae

Please sign in to comment.