From c7cb3f2687c65209c3b5547689ebc187468b7c30 Mon Sep 17 00:00:00 2001 From: Prem Prakash Date: Wed, 31 Jan 2018 18:20:34 -0800 Subject: [PATCH 1/9] Refactoring Pricesheet response spec to fix model names and references. --- .../stable/2018-01-31/consumption.json | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json index 1001a0b5afe8..49785114a9bb 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json @@ -1696,7 +1696,7 @@ "description": "The current amount of cost which is being tracked for a budget.", "$ref": "#/definitions/CurrentSpend", "readOnly": true - }, + }, "notifications": { "type": "object", "description": "Dictionary of notifications associated with the budget. Budget can have up to five notifications.", @@ -1762,7 +1762,7 @@ "minItems": 0, "maxItems": 10 } - } + } }, "CurrentSpend": { "description": "The current amount of cost which is being tracked for a budget.", @@ -1966,15 +1966,15 @@ }, "x-ms-azure-resource": true }, - "PriceSheetResult": { - "description": "price sheet result. It contains the pricesheet associated with billing period", + "PriceSheetModel": { + "description": "price sheet result. It contains the pricesheet associated with billing period", "properties": { - "value": { + "pricesheets": { "description": "Price sheet", - "type": "object", + "type": "array", "readOnly": true, "items": { - "$ref": "#/definitions/PriceSheetModel" + "$ref": "#/definitions/PriceSheetProperties" } }, "nextLink": { @@ -1984,7 +1984,7 @@ } } }, - "PriceSheetModel": { + "PriceSheetResult": { "description": "An pricesheet resource.", "type": "object", "allOf": [ @@ -1995,14 +1995,14 @@ "properties": { "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/PriceSheetProperties", + "$ref": "#/definitions/PriceSheetModel", "title": "Price sheet properties" } } - }, + }, "PriceSheetProperties": { "description": "The properties of the price sheet.", - "properties": { + "properties": { "billingPeriodId": { "description": "The id of the billing period resource that the usage belongs to.", "type": "string", @@ -2026,7 +2026,7 @@ "includedQuantity": { "description": "Included quality for an offer", "type": "number", - "format": "decimal", + "format": "decimal", "readOnly": true }, "partNumber": { @@ -2037,13 +2037,13 @@ "unitPrice": { "description": "Unit Price", "type": "number", - "format": "decimal", + "format": "decimal", "readOnly": true }, "currencyCode": { "description": "Currency Code", "type": "string", - "readOnly": true + "readOnly": true } } } From 47c6f797b5e1b840759e20dac50e4c96649a1de2 Mon Sep 17 00:00:00 2001 From: Prem Prakash Date: Wed, 31 Jan 2018 19:39:09 -0800 Subject: [PATCH 2/9] Updating examples to correctly reflect the response model --- .../stable/2018-01-31/consumption.json | 32 ++++---- .../2018-01-31/examples/PriceSheet.json | 56 ++++++++------ .../2018-01-31/examples/PriceSheetExpand.json | 77 +++++++++++-------- .../examples/PriceSheetForBillingPeriod.json | 64 ++++++++------- 4 files changed, 129 insertions(+), 100 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json index 49785114a9bb..1345269d5692 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json @@ -1966,6 +1966,22 @@ }, "x-ms-azure-resource": true }, + "PriceSheetResult": { + "description": "An pricesheet resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PriceSheetModel", + "title": "Price sheet properties" + } + } + }, "PriceSheetModel": { "description": "price sheet result. It contains the pricesheet associated with billing period", "properties": { @@ -1983,22 +1999,6 @@ "readOnly": true } } - }, - "PriceSheetResult": { - "description": "An pricesheet resource.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/PriceSheetModel", - "title": "Price sheet properties" - } - } }, "PriceSheetProperties": { "description": "The properties of the price sheet.", diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheet.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheet.json index 4e61ab2210cb..188a48a3004f 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheet.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheet.json @@ -1,27 +1,37 @@ { - "parameters": { - "api-version": "2018-01-31", - "subscriptionId": "00000000-0000-0000-0000-000000000000" - }, - "responses": { - "200": { - "body": { - "value": - { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/pricesheets/default", - "name": "default", - "type": "Microsoft.Consumption/pricesheet", - "properties": { - "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", - "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", - "unitOfMeasure": "100 Hours", - "includedQuantity": 100, - "partNumber": "AB-11110", - "unitPrice": 0.00328, - "currencyCode": "EUR" + "parameters": + { + "api-version": "2018-01-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": + { + "200": + { + "body": + { + "value": + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/pricesheets/default", + "name": "default", + "type": "Microsoft.Consumption/pricesheets", + "properties": + { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31&$skiptoken=AQAAAA%3D%3D", + "pricesheets": [ + { + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", + "unitOfMeasure": "100 Hours", + "includedQuantity": 100, + "partNumber": "AB-11110", + "unitPrice": 0.00328, + "currencyCode": "EUR" + } + ] + } + } } - } } } - } -} \ No newline at end of file +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetExpand.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetExpand.json index 45ba78e7b1ec..4155d5cdecee 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetExpand.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetExpand.json @@ -1,37 +1,48 @@ { - "parameters": { - "api-version": "2018-01-31", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "billingPeriodName": "201801", - "$expand": "meterDetails" - }, - "responses": { - "200": { - "body": { - "value": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", - "name": "pricesheets", - "type": "Microsoft.Consumption/pricesheets", - "tags": [], - "properties": { - "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", - "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", - "unitOfMeasure": "100 Hours", - "includedQuantity": 100, - "partNumber": "AB-11110", - "unitPrice": 0.00328, - "currencyCode": "EUR", - "meterDetails": { - "meterName": "Data Transfer Out (GB)", - "meterCategory": "Networking", - "unit": "GB", - "meterLocation": "Zone 2", - "totalIncludedQuantity": 0, - "pretaxStandardRate": 0.138 - } - } + "parameters": + { + "api-version": "2018-01-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "billingPeriodName": "201801", + "$expand": "meterDetails" + }, + "responses": + { + "200": + { + "body": + { + "value": + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", + "name": "default", + "type": "Microsoft.Consumption/pricesheets", + "properties": + { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31&$skiptoken=AQAAAA%3D%3D&$expand=properties/pricesheets/meterDetails", + "pricesheets": [ + { + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", + "unitOfMeasure": "100 Hours", + "includedQuantity": 100, + "partNumber": "AB-11110", + "unitPrice": 0.00328, + "currencyCode": "EUR", + "meterDetails": + { + "meterName": "Data Transfer Out (GB)", + "meterCategory": "Networking", + "unit": "GB", + "meterLocation": "Zone 2", + "totalIncludedQuantity": 0, + "pretaxStandardRate": 0.138 + } + } + ] + } + } } - } } } -} \ No newline at end of file +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetForBillingPeriod.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetForBillingPeriod.json index ec128fcd25cb..a375ebc699be 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetForBillingPeriod.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetForBillingPeriod.json @@ -1,30 +1,38 @@ { - "parameters": { - "api-version": "2018-01-31", - "subscriptionId": "00000000-0000-0000-0000-000000000000", - "billingPeriodName": "201801" - }, - "responses": { - "200": { - "body": { - "value": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", - "name": "pricesheets", - "type": "Microsoft.Consumption/pricesheets", - "tags": [], - "properties": [ - { - "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", - "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", - "unitOfMeasure": "100 Hours", - "includedQuantity": 100, - "partNumber": "AB-11110", - "unitPrice": 0.00328, - "currencyCode": "EUR" - } - ] - } + "parameters": + { + "api-version": "2018-01-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "billingPeriodName": "201801" + }, + "responses": + { + "200": + { + "body": + { + "value": + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", + "name": "default", + "type": "Microsoft.Consumption/pricesheets", + "properties": + { + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31", + "pricesheets": [ + { + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", + "unitOfMeasure": "100 Hours", + "includedQuantity": 100, + "partNumber": "AB-11110", + "unitPrice": 0.00328, + "currencyCode": "EUR" + } + ] + } + } + } } - } - } -} \ No newline at end of file + } +} From f79454dafe046b04e0bda36ae2c678ccef1e3128 Mon Sep 17 00:00:00 2001 From: Prem Prakash Date: Wed, 31 Jan 2018 22:08:32 -0800 Subject: [PATCH 3/9] Fixing examples for updated pricesheet model response. --- .../2018-01-31/examples/PriceSheet.json | 32 ++++++------- .../2018-01-31/examples/PriceSheetExpand.json | 46 +++++++++---------- .../examples/PriceSheetForBillingPeriod.json | 32 ++++++------- 3 files changed, 49 insertions(+), 61 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheet.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheet.json index 188a48a3004f..0333f09d79ee 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheet.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheet.json @@ -10,26 +10,22 @@ { "body": { - "value": + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/pricesheets/default", + "name": "default", + "type": "Microsoft.Consumption/pricesheets", + "properties": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Consumption/pricesheets/default", - "name": "default", - "type": "Microsoft.Consumption/pricesheets", - "properties": + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31&$skiptoken=AQAAAA%3D%3D", + "pricesheets": [ { - "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31&$skiptoken=AQAAAA%3D%3D", - "pricesheets": [ - { - "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", - "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", - "unitOfMeasure": "100 Hours", - "includedQuantity": 100, - "partNumber": "AB-11110", - "unitPrice": 0.00328, - "currencyCode": "EUR" - } - ] - } + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", + "unitOfMeasure": "100 Hours", + "includedQuantity": 100, + "partNumber": "AB-11110", + "unitPrice": 0.00328, + "currencyCode": "EUR" + }] } } } diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetExpand.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetExpand.json index 4155d5cdecee..6ab48653c8ef 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetExpand.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetExpand.json @@ -12,35 +12,31 @@ { "body": { - "value": + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", + "name": "default", + "type": "Microsoft.Consumption/pricesheets", + "properties": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", - "name": "default", - "type": "Microsoft.Consumption/pricesheets", - "properties": + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31&$skiptoken=AQAAAA%3D%3D&$expand=properties/pricesheets/meterDetails", + "pricesheets": [ { - "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31&$skiptoken=AQAAAA%3D%3D&$expand=properties/pricesheets/meterDetails", - "pricesheets": [ + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", + "unitOfMeasure": "100 Hours", + "includedQuantity": 100, + "partNumber": "AB-11110", + "unitPrice": 0.00328, + "currencyCode": "EUR", + "meterDetails": { - "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", - "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", - "unitOfMeasure": "100 Hours", - "includedQuantity": 100, - "partNumber": "AB-11110", - "unitPrice": 0.00328, - "currencyCode": "EUR", - "meterDetails": - { - "meterName": "Data Transfer Out (GB)", - "meterCategory": "Networking", - "unit": "GB", - "meterLocation": "Zone 2", - "totalIncludedQuantity": 0, - "pretaxStandardRate": 0.138 - } + "meterName": "Data Transfer Out (GB)", + "meterCategory": "Networking", + "unit": "GB", + "meterLocation": "Zone 2", + "totalIncludedQuantity": 0, + "pretaxStandardRate": 0.138 } - ] - } + }] } } } diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetForBillingPeriod.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetForBillingPeriod.json index a375ebc699be..41d9ee663aba 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetForBillingPeriod.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/PriceSheetForBillingPeriod.json @@ -11,26 +11,22 @@ { "body": { - "value": + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", + "name": "default", + "type": "Microsoft.Consumption/pricesheets", + "properties": { - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/pricesheets/default", - "name": "default", - "type": "Microsoft.Consumption/pricesheets", - "properties": + "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31", + "pricesheets": [ { - "nextLink": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702/providers/microsoft.consumption/pricesheets/default?api-version=2018-01-31", - "pricesheets": [ - { - "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", - "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", - "unitOfMeasure": "100 Hours", - "includedQuantity": 100, - "partNumber": "AB-11110", - "unitPrice": 0.00328, - "currencyCode": "EUR" - } - ] - } + "billingPeriodId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Billing/billingPeriods/201702", + "meterId": "fe167397-a38d-43c3-9bb3-8e2907e56a41", + "unitOfMeasure": "100 Hours", + "includedQuantity": 100, + "partNumber": "AB-11110", + "unitPrice": 0.00328, + "currencyCode": "EUR" + }] } } } From 0cd14d09da17c091dab0c80a8181b0f3a547a005 Mon Sep 17 00:00:00 2001 From: Prem Prakash Date: Thu, 1 Feb 2018 10:10:24 -0800 Subject: [PATCH 4/9] Providing nextLink name and removing x-ms-pageable for budget PUT operation. --- .../stable/2018-01-31/consumption.json | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json index 1345269d5692..0ab2263bf39e 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json @@ -394,7 +394,7 @@ } }, "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" } } }, @@ -476,7 +476,7 @@ } }, "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" } } }, @@ -525,7 +525,7 @@ } }, "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" } } }, @@ -577,7 +577,7 @@ } }, "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" } } }, @@ -619,7 +619,7 @@ } }, "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" } } }, @@ -664,7 +664,7 @@ } }, "x-ms-pageable": { - "nextLinkName": null + "nextLinkName": "nextLink" } } }, @@ -762,9 +762,6 @@ "$ref": "#/definitions/ErrorResponse" } } - }, - "x-ms-pageable": { - "nextLinkName": null } }, "delete": { @@ -905,9 +902,6 @@ "$ref": "#/definitions/ErrorResponse" } } - }, - "x-ms-pageable": { - "nextLinkName": null } }, "delete": { From f070fe9ebea2296e20a6a76a12d324b9138c7a38 Mon Sep 17 00:00:00 2001 From: Prem Prakash Date: Thu, 1 Feb 2018 10:26:16 -0800 Subject: [PATCH 5/9] Fixing nextLink definition in response schema. --- .../stable/2018-01-31/consumption.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json index 0ab2263bf39e..c2f8201e0f74 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/consumption.json @@ -1478,6 +1478,11 @@ "items": { "$ref": "#/definitions/ReservationSummaries" } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true } } }, @@ -1563,6 +1568,11 @@ "items": { "$ref": "#/definitions/ReservationDetails" } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true } } }, @@ -1625,6 +1635,11 @@ "items": { "$ref": "#/definitions/Budget" } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true } } }, From cbefdc6e1ebb76efd65b14d3737cc6fe6f20d0d0 Mon Sep 17 00:00:00 2001 From: Prem Prakash Date: Wed, 14 Feb 2018 16:44:35 -0800 Subject: [PATCH 6/9] Updating $filter parameter sample values in examples. Earlier version had incorrect format for the date values. --- .../stable/2018-01-31/examples/ReservationDetails.json | 4 ++-- .../examples/ReservationDetailsWithReservationId.json | 4 ++-- .../stable/2018-01-31/examples/ReservationSummariesDaily.json | 4 ++-- .../examples/ReservationSummariesDailyWithReservationId.json | 4 ++-- .../stable/2018-01-31/examples/UsageDetailsExpand.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationDetails.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationDetails.json index b3063e47c6d3..f4e336483127 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationDetails.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationDetails.json @@ -2,7 +2,7 @@ "parameters": { "api-version": "2018-01-31", "reservationOrderId": "87f3c981-3e33-43d0-b26b-dfca785cf18a", - "$filter": "properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-05" + "$filter": "properties/usageDate ge '2017-10-01' AND properties/usageDate le '2017-12-05'" }, "responses": { "200": { @@ -31,4 +31,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationDetailsWithReservationId.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationDetailsWithReservationId.json index da1005d34a9d..680c56414718 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationDetailsWithReservationId.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationDetailsWithReservationId.json @@ -3,7 +3,7 @@ "api-version": "2018-01-31", "reservationOrderId": "87f3c981-3e33-43d0-b26b-dfca785cf18a", "reservationId": "ba4a5693-71ef-4ec2-a5ea-c4897ee7e740", - "$filter": "properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-12-05" + "$filter": "properties/usageDate ge '2017-10-01' AND properties/usageDate le '2017-12-05'" }, "responses": { "200": { @@ -32,4 +32,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationSummariesDaily.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationSummariesDaily.json index 03336d3f4469..b6fdf7c883cb 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationSummariesDaily.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationSummariesDaily.json @@ -3,7 +3,7 @@ "api-version": "2018-01-31", "reservationOrderId": "87f3c981-3e33-43d0-b26b-dfca785cf18a", "grain":"daily", - "$filter": "properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-11-20" + "$filter": "properties/usageDate ge '2017-10-01' AND properties/usageDate le '2017-11-20'" }, "responses": { "200": { @@ -33,4 +33,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationSummariesDailyWithReservationId.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationSummariesDailyWithReservationId.json index c4da64e370a0..c8f2d94efdde 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationSummariesDailyWithReservationId.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/ReservationSummariesDailyWithReservationId.json @@ -4,7 +4,7 @@ "reservationOrderId": "87f3c981-3e33-43d0-b26b-dfca785cf18a", "reservationId": "ba4a5693-71ef-4ec2-a5ea-c4897ee7e740", "grain":"daily", - "$filter": "properties/UsageDate ge 2017-10-01 AND properties/UsageDate le 2017-11-20" + "$filter": "properties/usageDate ge '2017-10-01' AND properties/usageDate le '2017-11-20'" }, "responses": { "200": { @@ -34,4 +34,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/UsageDetailsExpand.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/UsageDetailsExpand.json index 61ca41e49002..57c2c78b8bd4 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/UsageDetailsExpand.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2018-01-31/examples/UsageDetailsExpand.json @@ -4,7 +4,7 @@ "subscriptionId": "subid", "billingPeriodName": "201702", "$expand": "meterDetails,additionalProperties", - "$filter": "usageEnd le 2017-02-14T00:00:00Z", + "$filter": "properties/usageEnd ge '2018-01-14' AND properties/usageEnd le '2018-02-14'", "$top": 1 }, "responses": { @@ -55,4 +55,4 @@ } } } -} \ No newline at end of file +} From 475b8906a68e7df97dd5888c83e471b14b36bf5b Mon Sep 17 00:00:00 2001 From: Prem Prakash Date: Wed, 19 Sep 2018 13:21:18 -0700 Subject: [PATCH 7/9] Copy of previous version 2018-05-31 --- .../stable/2018-08-31/costmanagement.json | 1380 +++++++++++++++++ .../BillingAccountDimensionsList.json | 38 + ...lingAccountDimensionsListExpandAndTop.json | 52 + ...illingAccountDimensionsListWithFilter.json | 36 + .../examples/BillingAccountQuery.json | 109 ++ .../2018-08-31/examples/ReportConfig.json | 87 ++ .../examples/ReportConfigCreateOrUpdate.json | 287 ++++ .../examples/ReportConfigDelete.json | 11 + .../2018-08-31/examples/ReportConfigList.json | 174 +++ .../examples/ResourceGroupDimensionsList.json | 49 + .../examples/ResourceGroupQuery.json | 100 ++ .../examples/SubscriptionDimensionsList.json | 51 + .../examples/SubscriptionQuery.json | 109 ++ 13 files changed, 2483 insertions(+) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/costmanagement.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfig.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigCreateOrUpdate.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigDelete.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQuery.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/costmanagement.json new file mode 100644 index 000000000000..c3183d2873c9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/costmanagement.json @@ -0,0 +1,1380 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-05-31", + "title": "CostManagementClient" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow.", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reportconfigs": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_List", + "description": "Lists all report configs for a subscription.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ReportConfigList": { + "$ref": "./examples/ReportConfigList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfigListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reportconfigs": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_ListByResourceGroupName", + "description": "Lists all report configs for a resource group under a subscription.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ReportConfigList": { + "$ref": "./examples/ReportConfigList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfigListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/reportconfigs/{reportConfigName}": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_Get", + "description": "Gets the report config for a subscription by report config name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "Report": { + "$ref": "./examples/ReportConfig.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_CreateOrUpdate", + "description": "The operation to create or update a report config. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CreateOrUpdateReport": { + "$ref": "./examples/ReportConfigCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfig" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_Delete", + "description": "The operation to delete a report.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DeleteReport": { + "$ref": "./examples/ReportConfigDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/reportconfigs/{reportConfigName}": { + "get": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_GetByResourceGroupName", + "description": "Gets the report config for a resource group under a subscription by report config name.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ReportConfig": { + "$ref": "./examples/ReportConfig.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "put": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_CreateOrUpdateByResourceGroupName", + "description": "The operation to create or update a report config. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "CreateOrUpdateReport": { + "$ref": "./examples/ReportConfigCreateOrUpdate.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfig" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "201": { + "description": "Created.", + "schema": { + "$ref": "#/definitions/ReportConfig" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + }, + "delete": { + "tags": [ + "Reports" + ], + "operationId": "ReportConfig_DeleteByResourceGroupName", + "description": "The operation to delete a report config.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DeleteReport": { + "$ref": "./examples/ReportConfigDelete.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "$ref": "#/parameters/reportConfigNameParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "BillingAccountDimensions_List", + "description": "Lists the dimensions by billingAccount Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountDimensionsList": { + "$ref": "./examples/BillingAccountDimensionsList.json" + }, + "BillingAccountDimensionsListExpandAndTop": { + "$ref": "./examples/BillingAccountDimensionsListExpandAndTop.json" + }, + "BillingAccountDimensionsListWithFilter": { + "$ref": "./examples/BillingAccountDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension dategory. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "SubscriptionDimensions_List", + "description": "Lists the dimensions by subscription Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionDimensionsList": { + "$ref": "./examples/SubscriptionDimensionsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension dategory. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "ResourceGroupDimensions_List", + "description": "Lists the dimensions by resource group Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupDimensionsList": { + "$ref": "./examples/ResourceGroupDimensionsList.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension dategory. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "QuerySubscription", + "description": "Lists the usage data for subscriptionId.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "SubscriptionQuery": { + "$ref": "./examples/SubscriptionQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "QueryResourceGroup", + "description": "Lists the usage data for subscriptionId and resource group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ResourceGroupQuery": { + "$ref": "./examples/ResourceGroupQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/subscriptionIdParameter" + }, + { + "$ref": "#/parameters/resourceGroupNameParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "QueryBillingAccount", + "description": "Lists the usage data for billing account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "BillingAccountQuery": { + "$ref": "./examples/BillingAccountQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + } + }, + "definitions": { + "ErrorDetails": { + "description": "The details of the error.", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "Resource": { + "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": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags." + } + }, + "x-ms-azure-resource": true + }, + "ReportConfigListResult": { + "description": "Result of listing report configs. It contains a list of available report configurations in the scope provided.", + "properties": { + "value": { + "description": "The list of report configs.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ReportConfig" + } + } + } + }, + "ReportConfig": { + "description": "A report config resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReportConfigProperties", + "title": "Report config properties" + } + } + }, + "ReportConfigProperties": { + "description": "The properties of the report config.", + "properties": { + "schedule": { + "description": "Has schedule information for the report config.", + "$ref": "#/definitions/ReportConfigSchedule" + }, + "format": { + "description": "The format of the report being delivered.", + "type": "string", + "enum": [ + "Csv" + ], + "x-ms-enum": { + "name": "FormatType", + "modelAsString": true + } + }, + "deliveryInfo": { + "description": "Has delivery information for the report config.", + "$ref": "#/definitions/ReportConfigDeliveryInfo" + }, + "definition": { + "description": "Has definition for the report config.", + "$ref": "#/definitions/ReportConfigDefinition" + } + }, + "required": [ + "deliveryInfo", + "definition" + ] + }, + "ReportConfigSchedule": { + "description": "The schedule associated with a report config.", + "properties": { + "status": { + "description": "The status of the schedule. Whether active or not. If inactive, the report's scheduled execution is paused.", + "type": "string", + "enum": [ + "Active", + "Inactive" + ], + "x-ms-enum": { + "name": "StatusType", + "modelAsString": true + } + }, + "recurrence": { + "description": "The schedule recurrence.", + "type": "string", + "enum": [ + "Daily", + "Weekly", + "Monthly", + "Annually" + ], + "x-ms-enum": { + "name": "RecurrenceType", + "modelAsString": true + } + }, + "recurrencePeriod": { + "description": "Has start and end date of the recurrence. The start date must be in future. If present, the end date must be greater than start date.", + "$ref": "#/definitions/ReportConfigRecurrencePeriod" + } + }, + "required": [ + "recurrence", + "recurrencePeriod" + ] + }, + "ReportConfigDeliveryInfo": { + "description": "The delivery information associated with a report config.", + "properties": { + "destination": { + "description": "Has destination for the report being delivered.", + "$ref": "#/definitions/ReportConfigDeliveryDestination" + } + }, + "required": [ + "destination" + ] + }, + "ReportConfigDefinition": { + "description": "The definition of a report config.", + "properties": { + "type": { + "description": "The type of the report.", + "type": "string", + "enum": [ + "Usage" + ], + "x-ms-enum": { + "name": "ReportType", + "modelAsString": true + } + }, + "timeframe": { + "description": "The time frame for pulling data for the report. If custom, then a specific time period must be provided.", + "type": "string", + "enum": [ + "WeekToDate", + "MonthToDate", + "YearToDate", + "Custom" + ], + "x-ms-enum": { + "name": "TimeframeType", + "modelAsString": true + } + }, + "timePeriod": { + "description": "Has time period for pulling data for the report.", + "$ref": "#/definitions/ReportConfigTimePeriod" + }, + "dataset": { + "description": "Has definition for data in this report config.", + "$ref": "#/definitions/ReportConfigDataset" + } + }, + "required": [ + "type", + "timeframe" + ] + }, + "ReportConfigRecurrencePeriod": { + "description": "The start and end date for recurrence schedule.", + "properties": { + "from": { + "description": "The start date of recurrence.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date of recurrence. If not provided, we default this to 10 years from the start date.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from" + ] + }, + "ReportConfigDeliveryDestination": { + "description": "The destination information for the delivery of the report.", + "properties": { + "resourceId": { + "description": "The resource id of the storage account where reports will be delivered.", + "type": "string" + }, + "container": { + "description": "The name of the container where reports will be uploaded.", + "type": "string" + }, + "rootFolderPath": { + "description": "The name of the directory where reports will be uploaded.", + "type": "string" + } + }, + "required": [ + "resourceId", + "container" + ] + }, + "ReportConfigTimePeriod": { + "description": "The start and end date for pulling data for the report.", + "properties": { + "from": { + "description": "The start date to pull data from.", + "type": "string", + "format": "date-time" + }, + "to": { + "description": "The end date to pull data to.", + "type": "string", + "format": "date-time" + } + }, + "required": [ + "from", + "to" + ] + }, + "ReportConfigDataset": { + "description": "The definition of data present in the report.", + "properties": { + "granularity": { + "description": "The granularity of rows in the report.", + "type": "string", + "enum": [ + "Daily" + ], + "x-ms-enum": { + "name": "GranularityType", + "modelAsString": true + } + }, + "configuration": { + "description": "Has configuration information for the data in the report. The configuration will be ignored if aggregation and grouping are provided.", + "$ref": "#/definitions/ReportConfigDatasetConfiguration" + }, + "aggregation": { + "type": "object", + "description": "Dictionary of aggregation expression to use in the report. The key of each item in the dictionary is the alias for the aggregated column. Report can have upto 2 aggregation clauses.", + "additionalProperties": { + "type": "object", + "$ref": "#/definitions/ReportConfigAggregation" + }, + "maxItems": 2 + }, + "grouping": { + "description": "Array of group by expression to use in the report. Report can have upto 2 group by clauses.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigGrouping" + }, + "maxItems": 2 + }, + "filter": { + "type": "object", + "description": "Has filter expression to use in the report.", + "$ref": "#/definitions/ReportConfigFilter" + } + } + }, + "ReportConfigDatasetConfiguration": { + "description": "The configuration of dataset in the report.", + "properties": { + "columns": { + "description": "Array of column names to be included in the report. Any valid report column name is allowed. If not provided, then report includes all columns.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ReportConfigAggregation": { + "description": "The aggregation expression to be used in the report.", + "properties": { + "name": { + "description": "The name of the column to aggregate.", + "type": "string" + }, + "function": { + "description": "The name of the aggregation function to use.", + "type": "string", + "enum": [ + "Sum" + ], + "x-ms-enum": { + "name": "FunctionType", + "modelAsString": true + } + } + }, + "required": [ + "name", + "function" + ] + }, + "ReportConfigGrouping": { + "description": "The group by expression to be used in the report.", + "properties": { + "columnType": { + "description": "Has type of the column to group.", + "$ref": "#/definitions/ReportConfigColumnType" + }, + "name": { + "description": "The name of the column to group.", + "type": "string" + } + }, + "required": [ + "columnType", + "name" + ] + }, + "ReportConfigFilter": { + "description": "The filter expression to be used in the report.", + "properties": { + "and": { + "description": "The logical \"AND\" expression. Must have atleast 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "or": { + "description": "The logical \"OR\" expression. Must have atleast 2 items.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigFilter" + }, + "minItems": 2 + }, + "not": { + "description": "The logical \"NOT\" expression.", + "$ref": "#/definitions/ReportConfigFilter" + }, + "dimension": { + "description": "Has comparison expression for a dimension", + "$ref": "#/definitions/ReportConfigComparisonExpression" + }, + "tag": { + "description": "Has comparison expression for a tag", + "$ref": "#/definitions/ReportConfigComparisonExpression" + } + } + }, + "ReportConfigColumnType": { + "description": "The type of the column in the report.", + "type": "string", + "enum": [ + "Tag", + "Dimension" + ], + "x-ms-enum": { + "name": "ReportConfigColumnType", + "modelAsString": true + } + }, + "ReportConfigComparisonExpression": { + "description": "The comparison expression to be used in the report.", + "properties": { + "name": { + "description": "The name of the column to use in comaprison.", + "type": "string" + }, + "operator": { + "description": "The operator to use for comparison.", + "type": "string", + "enum": [ + "In" + ], + "x-ms-enum": { + "name": "OperatorType", + "modelAsString": true + } + }, + "values": { + "description": "Array of values to use for comparison", + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "DimensionsListResult": { + "description": "Result of listing dimensions. It contains a list of available dimensions.", + "type": "object", + "properties": { + "value": { + "description": "The list of dimensions.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Dimension" + } + } + } + }, + "Dimension": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/DimensionProperties", + "title": "Dimension properties" + } + } + }, + "DimensionProperties": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "string" + } + }, + "total": { + "format": "int32", + "type": "integer" + }, + "category": { + "type": "string" + }, + "usageStart": { + "format": "date-time", + "type": "string" + }, + "usageEnd": { + "format": "date-time", + "type": "string" + }, + "nextLink": { + "type": "string" + } + } + }, + "QueryResult": { + "description": "Result of query. It contains all columns listed under groupings and aggregation.", + "type": "object", + "properties": { + "value": { + "description": "The list of usage data.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Query" + } + } + } + }, + "Query": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/QueryProperties", + "title": "Query properties" + } + } + }, + "QueryProperties": { + "type": "object", + "properties": { + "nextLink": { + "type": "string" + }, + "columns": { + "description": "Array of columns", + "type": "array", + "items": { + "$ref": "#/definitions/QueryColumn" + } + }, + "rows": { + "type": "array", + "items": { + "type": "array", + "items": {} + } + } + } + }, + "QueryColumn": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "type": { + "type": "string" + } + } + } + }, + "parameters": { + "apiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Version of the API to be used with the client request. The current version is 2018-05-31." + }, + "subscriptionIdParameter": { + "name": "subscriptionId", + "in": "path", + "description": "Azure Subscription ID.", + "required": true, + "type": "string" + }, + "resourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "description": "Azure Resource Group Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "billingAccountIdParameter": { + "name": "billingAccountId", + "in": "path", + "description": "BillingAccount ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "reportConfigNameParameter": { + "name": "reportConfigName", + "in": "path", + "description": "Report Config Name.", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsList.json new file mode 100644 index 000000000000..23a7b5d6e43a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsList.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "billingAccountId": "100" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..87d9d31d7bc9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListExpandAndTop.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": "5" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..db8aab50eec2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListWithFilter.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "billingAccountId": "100", + "$expand": "properties/data", + "$top": "5", + "$filter": "properties/category eq 'instanceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_InstanceId_2018-05-01_2018-05-31_5", + "name": "dimensions_InstanceId_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "InstanceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "nextLink": "http://management.azure.com/ccmapi/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'instanceId'&$top=5&api-version=2018-05-31&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQuery.json new file mode 100644 index 000000000000..1ef7260472f9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "billingAccountId": "70664866", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "PreTaxCost", + "ResourceGroup", + "UsageDate" + ] + }, + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/providers/Microsoft.CostManagement/Query?api-version=2018-05-31&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331 + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331 + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331 + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331 + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfig.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfig.json new file mode 100644 index 000000000000..228c1752d768 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfig.json @@ -0,0 +1,87 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportConfigName": "TestReportConfig" + }, + "responses": { + "200": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", + "name": "TestReportConfig", + "type": "Microsoft.Consumption/reportconfigs", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + }, + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "UsageDate", + "MeterId", + "InstanceId", + "ResourceLocation", + "UsageQuantity" + ] + }, + "aggregation": { + "usageSum": { + "name": "UsageQuantity", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "filter": { + "and": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "Contains", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigCreateOrUpdate.json new file mode 100644 index 000000000000..57353a5bde94 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigCreateOrUpdate.json @@ -0,0 +1,287 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportConfigName": "TestReportConfig", + "parameters": { + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + } + } + }, + "responses": { + "201": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", + "name": "TestReportConfig", + "type": "Microsoft.Consumption/reportconfigs", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + } + } + }, + "200": { + "body": { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig", + "name": "TestReportConfig", + "type": "Microsoft.Consumption/reportconfigs", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + }, + { + "columnType": "Tag", + "name": "Environment" + } + ], + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigDelete.json new file mode 100644 index 000000000000..456c1dfc1662 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigDelete.json @@ -0,0 +1,11 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG", + "reportConfigName": "TestReport" + }, + "responses": { + "200": {} + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigList.json new file mode 100644 index 000000000000..76b8d07fec46 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigList.json @@ -0,0 +1,174 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "MYDEVTESTRG" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig1", + "name": "TestReportConfig1", + "type": "Microsoft.Consumption/reportconfigs", + "properties": { + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "Custom", + "timePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + }, + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "PreTaxCost" + ] + }, + "aggregation": { + "costSum": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Dimension", + "name": "SubscriptionName" + } + ], + "filter": { + "and": [ + { + "or": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + } + }, + { + "id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig2", + "name": "TestReportConfig2", + "type": "Microsoft.Consumption/reportconfigs", + "properties": { + "schedule": { + "status": "Active", + "recurrence": "Weekly", + "recurrencePeriod": { + "from": "2018-06-01T00:00:00Z", + "to": "2018-10-31T00:00:00Z" + } + }, + "format": "Csv", + "deliveryInfo": { + "destination": { + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182", + "container": "reports", + "rootFolderPath": "ad-hoc" + } + }, + "definition": { + "type": "Usage", + "timeframe": "WeekToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "Date", + "MeterId", + "InstanceId", + "ResourceLocation", + "UsageQuantity" + ] + }, + "aggregation": { + "usageSum": { + "name": "UsageQuantity", + "function": "Sum" + } + }, + "grouping": [ + { + "columnType": "Tag", + "name": "Environment" + } + ], + "filter": { + "and": [ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + } + } + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupDimensionsList.json new file mode 100644 index 000000000000..6bd76a0a90b9 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupDimensionsList.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "39ae8bea-c3fd-4e24-8936-7c34974326ce", + "resourceGroupName": "system.orlando", + "$expand": "properties/data", + "$top": "5" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.storage/storageaccounts" + ], + "total": 1, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + }, + { + "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_InstanceId_2018-05-01_2018-05-31_5", + "name": "dimensions_InstanceId_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/authprod", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/systemevents", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/armadminprod", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/publicsystemportal" + ], + "total": 27, + "category": "InstanceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQuery.json new file mode 100644 index 000000000000..24b99ae93eab --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQuery.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", + "resourceGroupName": "ScreenSharingTest-peer", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "PreTaxCost", + "ResourceGroup", + "UsageDate" + ] + }, + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Query/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + } + ], + "rows": [ + [ + 2.10333307059661, + "ScreenSharingTest-peer", + 20180417 + ], + [ + 20.10333307059661, + "ScreenSharingTest-peer", + 20180418 + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionDimensionsList.json new file mode 100644 index 000000000000..a1bf887e7aeb --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionDimensionsList.json @@ -0,0 +1,51 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "39ae8bea-c3fd-4e24-8936-7c34974326ce", + "$top": "5", + "$expand": "properties/data" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/providers/Microsoft.Consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "dcrg", + "rg", + "offlinegalleryrg", + "system.orlando.adminkeyvault", + "system.orlando.keyvault" + ], + "total": 68, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + }, + { + "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/providers/Microsoft.Consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.storage/storageaccounts", + "microsoft.web.admin/role", + "microsoft.sql/servers", + "microsoft.compute/virtualmachines" + ], + "total": 4, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQuery.json new file mode 100644 index 000000000000..b84af6a0ab53 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQuery.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "api-version": "2018-05-31", + "subscriptionId": "55312978-ba1b-415c-9304-c6b9c43c0481", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "PreTaxCost", + "ResourceGroup", + "UsageDate" + ] + }, + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/55312978-ba1b-415c-9304-c6b9c43c0481/providers/Microsoft.CostManagement/Query/55312978-ba1b-415c-9304-c6b9c43c0481", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + } + ], + "rows": [ + [ + 2.10333307059661, + "ScreenSharingTest-peer", + 20180417 + ], + [ + 218.68795741935486, + "Ict_StratAndPlan_GoldSprova_Prod", + 20180331 + ], + [ + 0.14384913581657052, + "ssbciotelement01", + 20180331 + ], + [ + 0.009865586851323632, + "ict_stratandplan_goldsprova_prod", + 20180331 + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file From c44fe3b68609854bf0465ec9841968310c2c9fb5 Mon Sep 17 00:00:00 2001 From: Prem Prakash Date: Wed, 19 Sep 2018 16:22:25 -0700 Subject: [PATCH 8/9] Applying changes for new version of CostManagement APIs 2018-08-31 --- .../stable/2018-08-31/costmanagement.json | 528 +++++++++++++++++- .../BillingAccountDimensionsList.json | 12 +- ...lingAccountDimensionsListExpandAndTop.json | 12 +- ...illingAccountDimensionsListWithFilter.json | 15 +- .../examples/BillingAccountQuery.json | 18 +- .../examples/DepartmentDimensionsList.json | 45 ++ .../DepartmentDimensionsListExpandAndTop.json | 59 ++ .../DepartmentDimensionsListWithFilter.json | 40 ++ .../2018-08-31/examples/DepartmentQuery.json | 118 ++++ .../EnrollmentAccountDimensionsList.json | 45 ++ ...mentAccountDimensionsListExpandAndTop.json | 59 ++ ...llmentAccountDimensionsListWithFilter.json | 40 ++ .../examples/EnrollmentAccountQuery.json | 118 ++++ .../ManagementGroupDimensionsList.json | 44 ++ ...gementGroupDimensionsListExpandAndTop.json | 58 ++ ...nagementGroupDimensionsListWithFilter.json | 39 ++ .../examples/ManagementGroupQuery.json | 117 ++++ .../2018-08-31/examples/ReportConfig.json | 2 +- .../examples/ReportConfigCreateOrUpdate.json | 2 +- .../examples/ReportConfigDelete.json | 2 +- .../2018-08-31/examples/ReportConfigList.json | 2 +- .../examples/ResourceGroupDimensionsList.json | 18 +- .../examples/ResourceGroupQuery.json | 12 +- .../examples/SubscriptionDimensionsList.json | 12 +- .../examples/SubscriptionQuery.json | 18 +- 25 files changed, 1386 insertions(+), 49 deletions(-) create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountQuery.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsList.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsListExpandAndTop.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsListWithFilter.json create mode 100644 specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupQuery.json diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/costmanagement.json index c3183d2873c9..96a684789a53 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/costmanagement.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2018-05-31", + "version": "2018-08-31", "title": "CostManagementClient" }, "host": "management.azure.com", @@ -397,7 +397,7 @@ "Dimensions" ], "x-ms-odata": "#/definitions/Dimension", - "operationId": "BillingAccountDimensions_List", + "operationId": "Dimensions_ListByBillingAccount", "description": "Lists the dimensions by billingAccount Id.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" @@ -470,13 +470,250 @@ } } }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByEnrollmentAccount", + "description": "Lists the dimensions by Enrollment Account Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "EnrollmentAccountDimensionsList": { + "$ref": "./examples/EnrollmentAccountDimensionsList.json" + }, + "EnrollmentAccountDimensionsListExpandAndTop": { + "$ref": "./examples/EnrollmentAccountDimensionsListExpandAndTop.json" + }, + "EnrollmentAccountDimensionsListWithFilter": { + "$ref": "./examples/EnrollmentAccountDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension dategory. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByDepartment", + "description": "Lists the dimensions by Department Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DepartmentDimensionsList": { + "$ref": "./examples/DepartmentDimensionsList.json" + }, + "DepartmentDimensionsListExpandAndTop": { + "$ref": "./examples/DepartmentDimensionsListExpandAndTop.json" + }, + "DepartmentDimensionsListWithFilter": { + "$ref": "./examples/DepartmentDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension dategory. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/dimensions": { + "get": { + "tags": [ + "Dimensions" + ], + "x-ms-odata": "#/definitions/Dimension", + "operationId": "Dimensions_ListByManagementGroup", + "description": "Lists the dimensions by managementGroup Id.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagementGroupDimensionsList": { + "$ref": "./examples/ManagementGroupDimensionsList.json" + }, + "ManagementGroupDimensionsListExpandAndTop": { + "$ref": "./examples/ManagementGroupDimensionsListExpandAndTop.json" + }, + "ManagementGroupDimensionsListWithFilter": { + "$ref": "./examples/ManagementGroupDimensionsListWithFilter.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "name": "$filter", + "description": "May be used to filter dimensions by properties/category, properties/usageStart, properties/usageEnd. Supported operators are 'eq','lt', 'gt', 'le', 'ge'.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$expand", + "description": "May be used to expand the properties/data within a dimension dategory. By default, data is not included when listing dimensions.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "Skiptoken is only used if a previous operation returned a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a starting point to use for subsequent calls.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$top", + "description": "May be used to limit the number of results to the most recent N dimension data.", + "in": "query", + "required": false, + "type": "integer", + "minimum": 1, + "maximum": 1000 + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/DimensionsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, "/subscriptions/{subscriptionId}/providers/Microsoft.CostManagement/dimensions": { "get": { "tags": [ "Dimensions" ], "x-ms-odata": "#/definitions/Dimension", - "operationId": "SubscriptionDimensions_List", + "operationId": "Dimensions_ListBySubscription", "description": "Lists the dimensions by subscription Id.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" @@ -549,7 +786,7 @@ "Dimensions" ], "x-ms-odata": "#/definitions/Dimension", - "operationId": "ResourceGroupDimensions_List", + "operationId": "Dimensions_ListByResourceGroup", "description": "Lists the dimensions by resource group Id.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" @@ -624,8 +861,8 @@ "tags": [ "Query" ], - "operationId": "QuerySubscription", - "description": "Lists the usage data for subscriptionId.", + "operationId": "Query_UsageBySubscription", + "description": "Query the usage data for subscriptionId.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, @@ -675,8 +912,8 @@ "tags": [ "Query" ], - "operationId": "QueryResourceGroup", - "description": "Lists the usage data for subscriptionId and resource group.", + "operationId": "Query_UsageByResourceGroup", + "description": "Query the usage data for subscriptionId and resource group.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, @@ -729,8 +966,8 @@ "tags": [ "Query" ], - "operationId": "QueryBillingAccount", - "description": "Lists the usage data for billing account.", + "operationId": "Query_UsageByBillingAccount", + "description": "Query the usage data for billing account.", "externalDocs": { "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, @@ -774,6 +1011,193 @@ "nextLinkName": null } } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/enrollmentAccounts/{enrollmentAccountId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByEnrollmentAccount", + "description": "Query the usage data for an enrollment account.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "EnrollmentAccountQuery": { + "$ref": "./examples/EnrollmentAccountQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/enrollmentAccountIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/departments/{departmentId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByDepartment", + "description": "Query the usage data for department.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "DepartmentQuery": { + "$ref": "./examples/DepartmentQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/billingAccountIdParameter" + }, + { + "$ref": "#/parameters/departmentIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.CostManagement/Query": { + "post": { + "tags": [ + "Query" + ], + "operationId": "Query_UsageByManagmentGroup", + "description": "Lists the usage data for managment group.", + "externalDocs": { + "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" + }, + "x-ms-examples": { + "ManagmentGroupQuery": { + "$ref": "./examples/ManagmentGroupQuery.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + }, + { + "$ref": "#/parameters/managementGroupIdParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ReportConfigDefinition" + }, + "description": "Parameters supplied to the CreateOrUpdate Report Config operation." + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/QueryResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } + }, + "/providers/Microsoft.CostManagement/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available consumption REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { @@ -1248,6 +1672,15 @@ "DimensionProperties": { "type": "object", "properties": { + "description": { + "type": "string" + }, + "filterEnabled": { + "type": "boolean" + }, + "groupingEnabled": { + "type": "boolean" + }, "data": { "type": "array", "items": { @@ -1335,6 +1768,55 @@ "type": "string" } } + }, + "OperationListResult": { + "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of cost management operations supported by the Microsoft.CostManagement resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "A Cost management REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.CostManagement.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: Dimensions, Query.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } } }, "parameters": { @@ -1368,6 +1850,30 @@ "type": "string", "x-ms-parameter-location": "method" }, + "managementGroupIdParameter": { + "name": "managementGroupId", + "in": "path", + "description": "ManagementGroup ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "departmentIdParameter": { + "name": "departmentId", + "in": "path", + "description": "Department ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, + "enrollmentAccountIdParameter": { + "name": "enrollmentAccountId", + "in": "path", + "description": "Enrollment Account ID", + "required": true, + "type": "string", + "x-ms-parameter-location": "method" + }, "reportConfigNameParameter": { "name": "reportConfigName", "in": "path", @@ -1377,4 +1883,4 @@ "x-ms-parameter-location": "method" } } -} \ No newline at end of file +} diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsList.json index 23a7b5d6e43a..d3f3e91b4636 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "billingAccountId": "100" }, "responses": { @@ -16,7 +16,10 @@ "total": 377, "category": "ResourceGroup", "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00" + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true } }, { @@ -28,7 +31,10 @@ "total": 37, "category": "ResourceType", "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00" + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true } } ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListExpandAndTop.json index 87d9d31d7bc9..e97faa7c0eed 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListExpandAndTop.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListExpandAndTop.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "billingAccountId": "100", "$expand": "properties/data", "$top": "5" @@ -24,7 +24,10 @@ "total": 377, "category": "ResourceGroup", "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00" + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true } }, { @@ -42,7 +45,10 @@ "total": 37, "category": "ResourceType", "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00" + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true } } ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListWithFilter.json index db8aab50eec2..147ffa29a523 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListWithFilter.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountDimensionsListWithFilter.json @@ -1,18 +1,18 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "billingAccountId": "100", "$expand": "properties/data", "$top": "5", - "$filter": "properties/category eq 'instanceId'" + "$filter": "properties/category eq 'resourceId'" }, "responses": { "200": { "body": { "value": [ { - "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_InstanceId_2018-05-01_2018-05-31_5", - "name": "dimensions_InstanceId_2018-05-01_2018-05-31_5", + "id": "providers/Microsoft.Billing/billingAccounts/100/providers/microsoft.consumption/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", "type": "microsoft.consumption/dimensions", "properties": { "data": [ @@ -23,10 +23,13 @@ "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" ], "total": 1409, - "category": "InstanceId", + "category": "ResourceId", "usageStart": "2018-05-01T00:00:00-07:00", "usageEnd": "2018-05-31T00:00:00-07:00", - "nextLink": "http://management.azure.com/ccmapi/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'instanceId'&$top=5&api-version=2018-05-31&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/ccmapi/providers/Microsoft.Billing/billingAccounts/100/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-08-31&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" } } ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQuery.json index 1ef7260472f9..abeb0c67633d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "billingAccountId": "70664866", "parameters":{ "type": "Usage", @@ -76,28 +76,36 @@ { "name": "UsageDate", "type": "Number" + }, + { + "name": "Currency", + "type": "String" } ], "rows": [ [ 19.545363672276512, "JapanUnifia-Trial", - 20180331 + 20180331, + "USD" ], [ 173.41979241290323, "RVIIOT-TRIAL", - 20180331 + 20180331, + "USD" ], [ 20.359416562625452, "VSTSHOL-1595322048000", - 20180331 + 20180331, + "USD" ], [ 0.16677720329728665, "gs-stms-dev", - 20180331 + 20180331, + "USD" ] ] } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsList.json new file mode 100644 index 000000000000..fc5f5bb9343d --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "100", + "departmentId": "123" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..5b5cbb8e56b3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "100", + "departmentId": "123", + "$expand": "properties/data", + "$top": "5" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsListWithFilter.json new file mode 100644 index 000000000000..293b1f9bd16f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "100", + "departmentId": "123", + "$expand": "properties/data", + "$top": "5", + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/microsoft.consumption/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/departments/123/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-08-31&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentQuery.json new file mode 100644 index 000000000000..e52ac3ca6e0e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentQuery.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "70664866", + "departmentId": "123", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "PreTaxCost", + "ResourceGroup", + "UsageDate" + ] + }, + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/departments/123/providers/Microsoft.CostManagement/Query?api-version=2018-08-31&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsList.json new file mode 100644 index 000000000000..257b17cb2782 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsList.json @@ -0,0 +1,45 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "100", + "enrollmentAccountId": "456" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..df85ee05ef5f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsListExpandAndTop.json @@ -0,0 +1,59 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "$expand": "properties/data", + "$top": "5" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsListWithFilter.json new file mode 100644 index 000000000000..02269e5fded1 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountDimensionsListWithFilter.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "100", + "enrollmentAccountId": "456", + "$expand": "properties/data", + "$top": "5", + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/microsoft.consumption/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/100/enrollmentAccounts/456/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-08-31&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountQuery.json new file mode 100644 index 000000000000..8ebf58fde08a --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountQuery.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "PreTaxCost", + "ResourceGroup", + "UsageDate" + ] + }, + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Billing/billingAccounts/70664866/enrollmentAccounts/456/providers/Microsoft.CostManagement/Query?api-version=2018-08-31&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsList.json new file mode 100644 index 000000000000..3ab2156da7a5 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsList.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "managementGroupId": "MyMgId" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsListExpandAndTop.json new file mode 100644 index 000000000000..a3e4cb236047 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsListExpandAndTop.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "managementGroupId": "MyMgId", + "$expand": "properties/data", + "$top": "5" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "thoroetrg01", + "default-notificationhubs-westus", + "jedikeyvaultrg", + "contosocodeflow8d4a", + "noobaa" + ], + "total": 377, + "category": "ResourceGroup", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true + } + }, + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceType_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "microsoft.automation/automationaccounts", + "microsoft.databricks/workspaces", + "microsoft.dbformysql/servers", + "microsoft.containerregistry/registries", + "microsoft.search/searchservices" + ], + "total": 37, + "category": "ResourceType", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsListWithFilter.json new file mode 100644 index 000000000000..711a0d6e00d3 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupDimensionsListWithFilter.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "managementGroupId": "MyMgId", + "$expand": "properties/data", + "$top": "5", + "$filter": "properties/category eq 'resourceId'" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/microsoft.consumption/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", + "type": "microsoft.consumption/dimensions", + "properties": { + "data": [ + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/67e24f6b-1ec2-4c90-993a-dc2d25b00b6c/resourcegroups/defaultresourcegroup-eus/providers/microsoft.operationalinsights/workspaces/defaultworkspace-67e24f6b-1ec2-4c90-993a-dc2d25b00b6c-eus", + "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/rg-sql-ha/providers/microsoft.compute/virtualmachines/sql-4qqp1", + "/subscriptions/a98d6dc5-eb8f-46cf-8938-f1fb08f03706/resourcegroups/databricks-rg-testwsp-xijmsdubneexm/providers/microsoft.compute/disks/488cdb42bf74474a98075415be3f806c-containerrootvolume" + ], + "total": 1409, + "category": "ResourceId", + "usageStart": "2018-05-01T00:00:00-07:00", + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true, + "nextLink": "http://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.Consumption/Dimensions?$filter=properties/category eq 'resourceId'&$top=5&api-version=2018-08-31&$expand=properties/data&$skiptoken=AQAAAA%3D%3D" + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupQuery.json new file mode 100644 index 000000000000..861b32caefda --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupQuery.json @@ -0,0 +1,117 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "managementGroupId": "MyMgId", + "parameters":{ + "type": "Usage", + "timeframe": "MonthToDate", + "dataset": { + "granularity": "Daily", + "configuration": { + "columns": [ + "PreTaxCost", + "ResourceGroup", + "UsageDate" + ] + }, + "filter":{ + "and": [ + { + "or":[ + { + "dimension": { + "name": "ResourceLocation", + "operator": "In", + "values": [ + "East US", + "West Europe" + ] + } + }, + { + "tag": { + "name": "Environment", + "operator": "In", + "values": [ + "UAT", + "Prod" + ] + } + } + ] + }, + { + "dimension": { + "name": "ResourceGroup", + "operator": "In", + "values": [ + "API" + ] + } + } + ] + } + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query/ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "name": "ad67fd91-c131-4bda-9ba9-7187ecb1cebd", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": "https://management.azure.com/providers/Microsoft.Management/managementGroups/MyMgId/providers/Microsoft.CostManagement/Query?api-version=2018-05-31&$skiptoken=AQAAAA%3D%3D", + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 0.16677720329728665, + "gs-stms-dev", + 20180331, + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfig.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfig.json index 228c1752d768..e6e813eceaff 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfig.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfig.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "MYDEVTESTRG", "reportConfigName": "TestReportConfig" diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigCreateOrUpdate.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigCreateOrUpdate.json index 57353a5bde94..d3852feef0fc 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigCreateOrUpdate.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigCreateOrUpdate.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "MYDEVTESTRG", "reportConfigName": "TestReportConfig", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigDelete.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigDelete.json index 456c1dfc1662..ecddaf005478 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigDelete.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigDelete.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "MYDEVTESTRG", "reportConfigName": "TestReport" diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigList.json index 76b8d07fec46..797e73df1cd3 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ReportConfigList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "MYDEVTESTRG" }, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupDimensionsList.json index 6bd76a0a90b9..fc9fb346be2f 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupDimensionsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "subscriptionId": "39ae8bea-c3fd-4e24-8936-7c34974326ce", "resourceGroupName": "system.orlando", "$expand": "properties/data", @@ -21,12 +21,15 @@ "total": 1, "category": "ResourceType", "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00" + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true } }, { - "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_InstanceId_2018-05-01_2018-05-31_5", - "name": "dimensions_InstanceId_2018-05-01_2018-05-31_5", + "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "name": "dimensions_ResourceId_2018-05-01_2018-05-31_5", "type": "microsoft.consumption/dimensions", "properties": { "data": [ @@ -37,9 +40,12 @@ "/subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/publicsystemportal" ], "total": 27, - "category": "InstanceId", + "category": "ResourceId", "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00" + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource Id", + "filterEnabled": true, + "groupingEnabled": true } } ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQuery.json index 24b99ae93eab..75ce51df032d 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", "resourceGroupName": "ScreenSharingTest-peer", "parameters":{ @@ -77,18 +77,24 @@ { "name": "UsageDate", "type": "Number" + }, + { + "name": "Currency", + "type": "String" } ], "rows": [ [ 2.10333307059661, "ScreenSharingTest-peer", - 20180417 + 20180417, + "USD" ], [ 20.10333307059661, "ScreenSharingTest-peer", - 20180418 + 20180418, + "USD" ] ] } diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionDimensionsList.json index a1bf887e7aeb..31193bb48322 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionDimensionsList.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "subscriptionId": "39ae8bea-c3fd-4e24-8936-7c34974326ce", "$top": "5", "$expand": "properties/data" @@ -24,7 +24,10 @@ "total": 68, "category": "ResourceGroup", "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00" + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource group", + "filterEnabled": true, + "groupingEnabled": true } }, { @@ -41,7 +44,10 @@ "total": 4, "category": "ResourceType", "usageStart": "2018-05-01T00:00:00-07:00", - "usageEnd": "2018-05-31T00:00:00-07:00" + "usageEnd": "2018-05-31T00:00:00-07:00", + "description": "Resource type", + "filterEnabled": true, + "groupingEnabled": true } } ] diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQuery.json index b84af6a0ab53..ce2425d170ac 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2018-05-31", + "api-version": "2018-08-31", "subscriptionId": "55312978-ba1b-415c-9304-c6b9c43c0481", "parameters":{ "type": "Usage", @@ -76,28 +76,36 @@ { "name": "UsageDate", "type": "Number" + }, + { + "name": "Currency", + "type": "String" } ], "rows": [ [ 2.10333307059661, "ScreenSharingTest-peer", - 20180417 + 20180417, + "USD" ], [ 218.68795741935486, "Ict_StratAndPlan_GoldSprova_Prod", - 20180331 + 20180331, + "USD" ], [ 0.14384913581657052, "ssbciotelement01", - 20180331 + 20180331, + "USD" ], [ 0.009865586851323632, "ict_stratandplan_goldsprova_prod", - 20180331 + 20180331, + "USD" ] ] } From 31140b8f6766f2690e0ca70a562555dd8954eb4a Mon Sep 17 00:00:00 2001 From: Prem Prakash Date: Wed, 19 Sep 2018 16:24:26 -0700 Subject: [PATCH 9/9] Adding Operations to previous api version 2018-05-31 --- .../stable/2018-05-31/costmanagement.json | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json index c3183d2873c9..171fdbac71b2 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json @@ -774,6 +774,37 @@ "nextLinkName": null } } + }, + "/providers/Microsoft.CostManagement/operations": { + "get": { + "tags": [ + "Operations" + ], + "operationId": "Operations_List", + "description": "Lists all of the available consumption REST API operations.", + "parameters": [ + { + "$ref": "#/parameters/apiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { @@ -1335,6 +1366,55 @@ "type": "string" } } + }, + "OperationListResult": { + "description": "Result of listing cost management operations. It contains a list of operations and a URL link to get the next set of results.", + "properties": { + "value": { + "description": "List of cost management operations supported by the Microsoft.CostManagement resource provider.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Operation" + } + }, + "nextLink": { + "description": "URL to get the next set of operation list results if there are any.", + "type": "string", + "readOnly": true + } + } + }, + "Operation": { + "description": "A Cost management REST API operation.", + "type": "object", + "properties": { + "name": { + "description": "Operation name: {provider}/{resource}/{operation}.", + "type": "string", + "readOnly": true + }, + "display": { + "description": "The object that represents the operation.", + "properties": { + "provider": { + "description": "Service provider: Microsoft.CostManagement.", + "type": "string", + "readOnly": true + }, + "resource": { + "description": "Resource on which the operation is performed: Dimensions, Query.", + "type": "string", + "readOnly": true + }, + "operation": { + "description": "Operation type: Read, write, delete, etc.", + "type": "string", + "readOnly": true + } + } + } + } } }, "parameters": {