Skip to content

Commit

Permalink
[Hub Generated] Review request for Microsoft.Consumption to add versi…
Browse files Browse the repository at this point in the history
…on stable/2019-10-01 (#11258)

* Fix mistakes in swagger from actual responses

* Fix swagger mismatches

* Add 204 to examples

* Fix example response to match actual response format

* Fix errors

* Remove discriminator, not returned in full response

* Avoid discriminator while still not active in code

* Add discriminator, it's actively used

* Fix example files

* Additional fix

* Fix discriminator setup

* Remove new properties added

* Remove required property

* Fix example
  • Loading branch information
zachraMSFT authored Nov 3, 2020
1 parent 0486181 commit c222036
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,9 @@
"$ref": "#/definitions/ReservationRecommendationsListResult"
}
},
"204": {
"description": "An empty response is sent when there are no recommendations."
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
Expand Down Expand Up @@ -2985,6 +2988,14 @@
}
],
"properties": {
"location": {
"type": "string",
"description": "Resource Location."
},
"sku": {
"type": "string",
"description": "Resource sku"
},
"properties": {
"x-ms-client-flatten": true,
"$ref": "#/definitions/ReservationRecommendationDetailsProperties",
Expand Down Expand Up @@ -3055,6 +3066,10 @@
"type": "number",
"readOnly": true
},
"reservedUnitCount": {
"description": "The number of reserved units used to calculate savings. Always 1 for virtual machines.",
"type": "number"
},
"savings": {
"description": "The amount saved by purchasing the recommended quantity of reservation.",
"type": "number",
Expand Down Expand Up @@ -3553,7 +3568,7 @@
"x-ms-discriminator-value": "Modern",
"allOf": [
{
"$ref": "#/definitions/Resource"
"$ref": "#/definitions/ReservationTransactionResource"
}
],
"properties": {
Expand Down Expand Up @@ -3700,7 +3715,7 @@
"type": "object",
"allOf": [
{
"$ref": "#/definitions/Resource"
"$ref": "#/definitions/ReservationTransactionResource"
}
],
"properties": {
Expand Down Expand Up @@ -4906,6 +4921,35 @@
},
"x-ms-azure-resource": true
},
"ReservationTransactionResource": {
"description": "The Resource model definition.",
"properties": {
"id": {
"readOnly": true,
"type": "string",
"description": "Resource Id."
},
"name": {
"readOnly": true,
"type": "string",
"description": "Resource name."
},
"type": {
"readOnly": true,
"type": "string",
"description": "Resource type."
},
"tags": {
"readOnly": true,
"type": "array",
"items": {
"type": "string"
},
"description": "Resource tags."
}
},
"x-ms-azure-resource": true
},
"ResourceAttributes": {
"description": "The Resource model definition.",
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D&"
}
}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D&"
}
}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testGroup/providers/Microsoft.Consumption/reservationRecommendations?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D&"
}
}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2019-10-01&$skiptoken=AQAAAA%3D%3D&"
}
}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
],
"nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/reservationRecommendations?api-version=2019-10-01&$filter=properties/scope+eq+'Single'+AND+properties/lookBackPeriod+eq+'Last7Days'&$skiptoken=AQAAAA%3D%3D&"
}
}
},
"204": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"id": "/billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919",
"name": "201909091919",
"type": "Microsoft.Consumption/reservationTransactions",
"tags": {},
"tags": [],
"properties": {
"eventDate": "2019-09-09T19:19:04Z",
"reservationOrderId": "00000000-0000-0000-0000-000000000000",
Expand Down Expand Up @@ -40,7 +40,7 @@
"id": "/billingAccounts/123456/providers/Microsoft.Consumption/reservationtransactions/201909091919",
"name": "201909091919",
"type": "Microsoft.Consumption/reservationTransactions",
"tags": {},
"tags": [],
"properties": {
"eventDate": "2019-09-09T19:19:04Z",
"reservationOrderId": "00000000-0000-0000-0000-000000000000",
Expand Down

0 comments on commit c222036

Please sign in to comment.