diff --git a/run b/run new file mode 100644 index 000000000000..e69de29bb2d1 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..c3f48d02dfdc 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 @@ -772,6 +772,37 @@ }, "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" } } } @@ -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": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json index 87d9d31d7bc9..da4eb9e8cba5 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListExpandAndTop.json @@ -3,7 +3,7 @@ "api-version": "2018-05-31", "billingAccountId": "100", "$expand": "properties/data", - "$top": "5" + "$top": 5 }, "responses": { "200": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json index db8aab50eec2..30a76597787f 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/BillingAccountDimensionsListWithFilter.json @@ -3,7 +3,7 @@ "api-version": "2018-05-31", "billingAccountId": "100", "$expand": "properties/data", - "$top": "5", + "$top": 5, "$filter": "properties/category eq 'instanceId'" }, "responses": { @@ -16,10 +16,10 @@ "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/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/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, diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupDimensionsList.json index 6bd76a0a90b9..680cc265c12f 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupDimensionsList.json @@ -1,17 +1,17 @@ { "parameters": { "api-version": "2018-05-31", - "subscriptionId": "39ae8bea-c3fd-4e24-8936-7c34974326ce", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "system.orlando", "$expand": "properties/data", - "$top": "5" + "$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", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/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": { @@ -25,16 +25,16 @@ } }, { - "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_InstanceId_2018-05-01_2018-05-31_5", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/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" + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/authprod", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/systemevents", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/armadminprod", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/publicsystemportal" ], "total": 27, "category": "InstanceId", diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupQuery.json index 24b99ae93eab..1e4c74096fdc 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/ResourceGroupQuery.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2018-05-31", - "subscriptionId": "55312978-ba1b-415c-9304-c4b9c43c0481", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "ScreenSharingTest-peer", "parameters":{ "type": "Usage", @@ -60,7 +60,7 @@ "body": { "value": [ { - "id": "subscriptions/55312978-ba1b-415c-9304-c4b9c43c0481/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Query/9af9459d-441d-4055-9ed0-83d4c4a363fb", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/ScreenSharingTest-peer/providers/Microsoft.CostManagement/Query/9af9459d-441d-4055-9ed0-83d4c4a363fb", "name": "9af9459d-441d-4055-9ed0-83d4c4a363fb", "type": "microsoft.costmanagement/Query", "properties": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionDimensionsList.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionDimensionsList.json index a1bf887e7aeb..44509edf6f59 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionDimensionsList.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionDimensionsList.json @@ -1,8 +1,8 @@ { "parameters": { "api-version": "2018-05-31", - "subscriptionId": "39ae8bea-c3fd-4e24-8936-7c34974326ce", - "$top": "5", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "$top": 5, "$expand": "properties/data" }, "responses": { @@ -10,7 +10,7 @@ "body": { "value": [ { - "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/providers/Microsoft.Consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/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": { @@ -28,7 +28,7 @@ } }, { - "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/providers/Microsoft.Consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/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": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionQuery.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionQuery.json index b84af6a0ab53..c28d98b38055 100644 --- a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionQuery.json +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/examples/SubscriptionQuery.json @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2018-05-31", - "subscriptionId": "55312978-ba1b-415c-9304-c6b9c43c0481", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "parameters":{ "type": "Usage", "timeframe": "MonthToDate", @@ -59,7 +59,7 @@ "body": { "value": [ { - "id": "subscriptions/55312978-ba1b-415c-9304-c6b9c43c0481/providers/Microsoft.CostManagement/Query/55312978-ba1b-415c-9304-c6b9c43c0481", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Query/00000000-0000-0000-0000-000000000000", "name": "55312978-ba1b-415c-9304-cfd9c43c0481", "type": "microsoft.costmanagement/Query", "properties": { 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 c01e7c51306a..a141c061f34a 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 @@ -517,6 +517,9 @@ "x-ms-examples": { "SubscriptionQuery": { "$ref": "./examples/SubscriptionQuery.json" + }, + "SubscriptionQueryGrouping": { + "$ref": "./examples/SubscriptionQueryGrouping.json" } }, "parameters": [ @@ -568,6 +571,9 @@ "x-ms-examples": { "ResourceGroupQuery": { "$ref": "./examples/ResourceGroupQuery.json" + }, + "ResourceGroupQueryGrouping": { + "$ref": "./examples/ResourceGroupQueryGrouping.json" } }, "parameters": [ @@ -622,6 +628,9 @@ "x-ms-examples": { "BillingAccountQuery": { "$ref": "./examples/BillingAccountQuery.json" + }, + "BillingAccountQueryGrouping": { + "$ref": "./examples/BillingAccountQueryGrouping.json" } }, "parameters": [ @@ -673,6 +682,9 @@ "x-ms-examples": { "EnrollmentAccountQuery": { "$ref": "./examples/EnrollmentAccountQuery.json" + }, + "EnrollmentAccountQueryGrouping": { + "$ref": "./examples/EnrollmentAccountQueryGrouping.json" } }, "parameters": [ @@ -727,6 +739,9 @@ "x-ms-examples": { "DepartmentQuery": { "$ref": "./examples/DepartmentQuery.json" + }, + "DepartmentQueryGrouping": { + "$ref": "./examples/DepartmentQueryGrouping.json" } }, "parameters": [ @@ -779,8 +794,11 @@ "url": "https://docs.microsoft.com/en-us/rest/api/costmanagement/" }, "x-ms-examples": { - "ManagmentGroupQuery": { + "ManagementGroupQuery": { "$ref": "./examples/ManagementGroupQuery.json" + }, + "ManagementGroupQueryGrouping": { + "$ref": "./examples/ManagementGroupQueryGrouping.json" } }, "parameters": [ @@ -1002,6 +1020,13 @@ }, "maxItems": 2 }, + "sorting": { + "description": "Array of order by expression to use in the report.", + "type": "array", + "items": { + "$ref": "#/definitions/ReportConfigSorting" + } + }, "filter": { "type": "object", "description": "Has filter expression to use in the report.", @@ -1044,11 +1069,31 @@ "name", "function" ] + }, + "ReportConfigSorting": { + "description": "The order by expression to be used in the report.", + "properties": { + "direction": { + "description": "Direction of sort.", + "type": "string", + "enum": [ + "Ascending", + "Descending" + ] + }, + "name": { + "description": "The name of the column to sort.", + "type": "string" + } + }, + "required": [ + "name" + ] }, "ReportConfigGrouping": { "description": "The group by expression to be used in the report.", "properties": { - "columnType": { + "type": { "description": "Has type of the column to group.", "$ref": "#/definitions/ReportConfigColumnType" }, @@ -1058,7 +1103,7 @@ } }, "required": [ - "columnType", + "type", "name" ] }, 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 dbd780e35bcb..ecb6135c583b 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 @@ -16,10 +16,10 @@ "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/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/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, 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 abeb0c67633d..24e42617bc7d 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 @@ -6,14 +6,7 @@ "type": "Usage", "timeframe": "MonthToDate", "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "PreTaxCost", - "ResourceGroup", - "UsageDate" - ] - }, + "granularity": "Daily", "filter":{ "and": [ { @@ -51,8 +44,8 @@ } ] } - } - } + } + } }, "responses": { "200": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQueryGrouping.json new file mode 100644 index 000000000000..d9ea1916e94f --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/BillingAccountQueryGrouping.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "70664866", + "parameters":{ + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "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": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + ] + } + } + } +} \ 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 index 8abc0e6934ee..3b436b1dbfef 100644 --- 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 @@ -17,10 +17,10 @@ "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/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/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, 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 index e52ac3ca6e0e..d8baab639dab 100644 --- 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 @@ -7,14 +7,7 @@ "type": "Usage", "timeframe": "MonthToDate", "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "PreTaxCost", - "ResourceGroup", - "UsageDate" - ] - }, + "granularity": "Daily", "filter":{ "and": [ { @@ -52,8 +45,8 @@ } ] } - } - } + } + } }, "responses": { "200": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentQueryGrouping.json new file mode 100644 index 000000000000..eabd8fd4c015 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/DepartmentQueryGrouping.json @@ -0,0 +1,73 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "70664866", + "departmentId": "123", + "parameters":{ + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ] + } + } + }, + "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": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 19.545363672276512, + "JapanUnifia-Trial", + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + "USD" + ], + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + "USD" + ] + ] + } + } + ] + } + } + } +} \ 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 index 9a491309fd3e..798461f3f74f 100644 --- 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 @@ -17,10 +17,10 @@ "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/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/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, 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 index 8ebf58fde08a..09e319a8773d 100644 --- 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 @@ -7,14 +7,7 @@ "type": "Usage", "timeframe": "MonthToDate", "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "PreTaxCost", - "ResourceGroup", - "UsageDate" - ] - }, + "granularity": "Daily", "filter":{ "and": [ { @@ -53,7 +46,7 @@ ] } } - } + } }, "responses": { "200": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountQueryGrouping.json new file mode 100644 index 000000000000..a5656874fab2 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/EnrollmentAccountQueryGrouping.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "billingAccountId": "70664866", + "enrollmentAccountId": "456", + "parameters":{ + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ], + "sorting": [ + { + "name": "ResourceGroup" + } + ] + } + } + }, + "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" + ] + ] + } + } + ] + } + } + } +} \ 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 index a3361a53b160..b70c7df18455 100644 --- 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 @@ -16,10 +16,10 @@ "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/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/urphealthaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/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/00000000-0000-0000-0000-000000000000/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, 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 index 861b32caefda..4791a4552f6b 100644 --- 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 @@ -6,14 +6,7 @@ "type": "Usage", "timeframe": "MonthToDate", "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "PreTaxCost", - "ResourceGroup", - "UsageDate" - ] - }, + "granularity": "Daily", "filter":{ "and": [ { @@ -51,8 +44,8 @@ } ] } - } - } + } + } }, "responses": { "200": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupQueryGrouping.json new file mode 100644 index 000000000000..de6f7a1e68e6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ManagementGroupQueryGrouping.json @@ -0,0 +1,85 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "managementGroupId": "MyMgId", + "parameters":{ + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ], + "sorting": [ + { + "name": "ResourceGroup", + "direction": "Descending" + } + ] + } + } + }, + "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": [ + [ + 20.359416562625452, + "VSTSHOL-1595322048000", + 20180331, + "USD" + ], + [ + 173.41979241290323, + "RVIIOT-TRIAL", + 20180331, + "USD" + ], + [ + 19.545363672276512, + "JapanUnifia-Trial", + 20180331, + "USD" + ] + ] + } + } + ] + } + } + } +} \ 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 index 38cbb2b7285d..184b17d735c5 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,7 +1,7 @@ { "parameters": { "api-version": "2018-08-31", - "subscriptionId": "39ae8bea-c3fd-4e24-8936-7c34974326ce", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "system.orlando", "$expand": "properties/data", "$top": 5 @@ -11,7 +11,7 @@ "body": { "value": [ { - "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/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": { @@ -28,16 +28,16 @@ } }, { - "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/resourceGroups/system.orlando/providers/microsoft.consumption/dimensions_ResourceId_2018-05-01_2018-05-31_5", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/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": [ - "/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" + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/authprod", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/systemevents", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/armadminprod", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/srphytenaccount", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/system.orlando/providers/microsoft.storage/storageaccounts/publicsystemportal" ], "total": 27, "category": "ResourceId", 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 75ce51df032d..5cb61b419097 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 @@ -7,14 +7,7 @@ "type": "Usage", "timeframe": "MonthToDate", "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "PreTaxCost", - "ResourceGroup", - "UsageDate" - ] - }, + "granularity": "Daily", "filter":{ "and": [ { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQueryGrouping.json new file mode 100644 index 000000000000..a271387e6c5e --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/ResourceGroupQueryGrouping.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "ScreenSharingTest-peer", + "parameters":{ + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "Daily", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceType" + } + ], + "sorting": [ + { + "name": "ResourceType", + "direction": "Descending" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/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": "ResourceType", + "type": "String" + }, + { + "name": "UsageDate", + "type": "Number" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 2.10333307059661, + "Microsoft.SqlServer", + 20180417, + "USD" + ], + [ + 20.10333307059661, + "Microsoft.Compute", + 20180418, + "USD" + ] + ] + } + } + ] + } + } + } +} \ 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 index 51856b6336ec..88de5f460d5e 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,7 +1,7 @@ { "parameters": { "api-version": "2018-08-31", - "subscriptionId": "39ae8bea-c3fd-4e24-8936-7c34974326ce", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "$top": 5, "$expand": "properties/data" }, @@ -10,7 +10,7 @@ "body": { "value": [ { - "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/providers/Microsoft.Consumption/dimensions_ResourceGroup_2018-05-01_2018-05-31_5", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/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": { @@ -31,7 +31,7 @@ } }, { - "id": "subscriptions/39ae8bea-c3fd-4e24-8936-7c34974326ce/providers/Microsoft.Consumption/dimensions_ResourceType_2018-05-01_2018-05-31_5", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/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": { 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 ce2425d170ac..28ac18210f6d 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,19 +1,12 @@ { "parameters": { "api-version": "2018-08-31", - "subscriptionId": "55312978-ba1b-415c-9304-c6b9c43c0481", + "subscriptionId": "00000000-0000-0000-0000-000000000000", "parameters":{ "type": "Usage", "timeframe": "MonthToDate", "dataset": { - "granularity": "Daily", - "configuration": { - "columns": [ - "PreTaxCost", - "ResourceGroup", - "UsageDate" - ] - }, + "granularity": "Daily", "filter":{ "and": [ { @@ -51,15 +44,15 @@ } ] } - } - } + } + } }, "responses": { "200": { "body": { "value": [ { - "id": "subscriptions/55312978-ba1b-415c-9304-c6b9c43c0481/providers/Microsoft.CostManagement/Query/55312978-ba1b-415c-9304-c6b9c43c0481", + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Query/00000000-0000-0000-0000-000000000000", "name": "55312978-ba1b-415c-9304-cfd9c43c0481", "type": "microsoft.costmanagement/Query", "properties": { diff --git a/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQueryGrouping.json b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQueryGrouping.json new file mode 100644 index 000000000000..3901b70ca7c6 --- /dev/null +++ b/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-08-31/examples/SubscriptionQueryGrouping.json @@ -0,0 +1,82 @@ +{ + "parameters": { + "api-version": "2018-08-31", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "parameters":{ + "type": "Usage", + "timeframe": "TheLastMonth", + "dataset": { + "granularity": "None", + "aggregation": { + "totalCost": { + "name": "PreTaxCost", + "function": "Sum" + } + }, + "grouping": [ + { + "type": "Dimension", + "name": "ResourceGroup" + } + ], + "sorting": [ + { + "name": "ResourceGroup" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.CostManagement/Query/00000000-0000-0000-0000-000000000000", + "name": "55312978-ba1b-415c-9304-cfd9c43c0481", + "type": "microsoft.costmanagement/Query", + "properties": { + "nextLink": null, + "columns": [ + { + "name": "PreTaxCost", + "type": "Number" + }, + { + "name": "ResourceGroup", + "type": "String" + }, + { + "name": "Currency", + "type": "String" + } + ], + "rows": [ + [ + 0.009865586851323632, + "Ict_StratAndPlan_GoldSprova_Prod_0", + "USD" + ], + [ + 218.68795741935486, + "Ict_StratAndPlan_GoldSprova_Prod_1", + "USD" + ], + [ + 2.10333307059661, + "ScreenSharingTest-peer1", + "USD" + ], + [ + 0.14384913581657052, + "Ssbciotelement01", + "USD" + ] + ] + } + } + ] + } + } + } +} \ No newline at end of file