Skip to content

Commit

Permalink
Fixing examples and adding missed properties (#4053)
Browse files Browse the repository at this point in the history
* Fixing examples and adding missed properties

* Incorporating review comments
  • Loading branch information
ms-premp authored and hovsepm committed Oct 3, 2018
1 parent 338c407 commit 48ef7a0
Show file tree
Hide file tree
Showing 27 changed files with 667 additions and 107 deletions.
Empty file added run
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"api-version": "2018-05-31",
"billingAccountId": "100",
"$expand": "properties/data",
"$top": "5"
"$top": 5
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"api-version": "2018-05-31",
"billingAccountId": "100",
"$expand": "properties/data",
"$top": "5",
"$top": 5,
"$filter": "properties/category eq 'instanceId'"
},
"responses": {
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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": {
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"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": {
"200": {
"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": {
Expand All @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,9 @@
"x-ms-examples": {
"SubscriptionQuery": {
"$ref": "./examples/SubscriptionQuery.json"
},
"SubscriptionQueryGrouping": {
"$ref": "./examples/SubscriptionQueryGrouping.json"
}
},
"parameters": [
Expand Down Expand Up @@ -568,6 +571,9 @@
"x-ms-examples": {
"ResourceGroupQuery": {
"$ref": "./examples/ResourceGroupQuery.json"
},
"ResourceGroupQueryGrouping": {
"$ref": "./examples/ResourceGroupQueryGrouping.json"
}
},
"parameters": [
Expand Down Expand Up @@ -622,6 +628,9 @@
"x-ms-examples": {
"BillingAccountQuery": {
"$ref": "./examples/BillingAccountQuery.json"
},
"BillingAccountQueryGrouping": {
"$ref": "./examples/BillingAccountQueryGrouping.json"
}
},
"parameters": [
Expand Down Expand Up @@ -673,6 +682,9 @@
"x-ms-examples": {
"EnrollmentAccountQuery": {
"$ref": "./examples/EnrollmentAccountQuery.json"
},
"EnrollmentAccountQueryGrouping": {
"$ref": "./examples/EnrollmentAccountQueryGrouping.json"
}
},
"parameters": [
Expand Down Expand Up @@ -727,6 +739,9 @@
"x-ms-examples": {
"DepartmentQuery": {
"$ref": "./examples/DepartmentQuery.json"
},
"DepartmentQueryGrouping": {
"$ref": "./examples/DepartmentQueryGrouping.json"
}
},
"parameters": [
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -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"
},
Expand All @@ -1058,7 +1103,7 @@
}
},
"required": [
"columnType",
"type",
"name"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,7 @@
"type": "Usage",
"timeframe": "MonthToDate",
"dataset": {
"granularity": "Daily",
"configuration": {
"columns": [
"PreTaxCost",
"ResourceGroup",
"UsageDate"
]
},
"granularity": "Daily",
"filter":{
"and": [
{
Expand Down Expand Up @@ -51,8 +44,8 @@
}
]
}
}
}
}
}
},
"responses": {
"200": {
Expand Down
Loading

0 comments on commit 48ef7a0

Please sign in to comment.