Skip to content

Commit

Permalink
Reports API moved from stable to preview version with addition of doc…
Browse files Browse the repository at this point in the history
…umentation of a couple of new APIs (#3640)

* Consumption specifications for cost insights and reporting operations

* Fixed $ref for ReportConfigDelete

* Silly me!! Fixed bad reference again

* Fixed schema validation issues

* Fixing validation errors around datetime and dynamic respones

* Fixed parameters in examples

* Fixed parameter name in example

* Removed x-ms-odata method for POST op

* Fixed ARM review comments

* Moved reports and usage analysis from microsoft.consumption to microsoft.costmanagament

* Merged with master again

* Updated reports api documentation

* Undo remove of API from stable version
  • Loading branch information
shalinved authored and sergey-shandar committed Aug 27, 2018
1 parent d087618 commit 21d580e
Show file tree
Hide file tree
Showing 11 changed files with 653 additions and 175 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"api-version": "2018-08-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "MYDEVTESTRG",
"reportConfigName": "TestReportConfig"
"reportName": "TestReport"
},
"responses": {
"200": {
"body": {
"id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig",
"name": "TestReportConfig",
"type": "Microsoft.Consumption/reportconfigs",
"id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/TestReport",
"name": "TestReport",
"type": "Microsoft.CostManagement/reports",
"properties": {
"format": "Csv",
"deliveryInfo": {
Expand Down Expand Up @@ -46,11 +46,11 @@
},
"grouping": [
{
"columnType": "Dimension",
"type": "Dimension",
"name": "SubscriptionName"
},
{
"columnType": "Tag",
"type": "Tag",
"name": "Environment"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"api-version": "2018-08-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "MYDEVTESTRG",
"reportConfigName": "TestReportConfig",
"reportName": "TestReport",
"parameters": {
"properties": {
"schedule":{
Expand Down Expand Up @@ -44,11 +44,11 @@
},
"grouping": [
{
"columnType": "Dimension",
"type": "Dimension",
"name": "SubscriptionName"
},
{
"columnType": "Tag",
"type": "Tag",
"name": "Environment"
}
],
Expand Down Expand Up @@ -97,9 +97,9 @@
"responses": {
"201": {
"body": {
"id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig",
"name": "TestReportConfig",
"type": "Microsoft.Consumption/reportconfigs",
"id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/TestReport",
"name": "TestReport",
"type": "Microsoft.CostManagement/reports",
"properties": {
"schedule":{
"status": "Active",
Expand Down Expand Up @@ -139,11 +139,11 @@
},
"grouping": [
{
"columnType": "Dimension",
"type": "Dimension",
"name": "SubscriptionName"
},
{
"columnType": "Tag",
"type": "Tag",
"name": "Environment"
}
],
Expand Down Expand Up @@ -191,9 +191,9 @@
},
"200": {
"body": {
"id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig",
"name": "TestReportConfig",
"type": "Microsoft.Consumption/reportconfigs",
"id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/TestReport",
"name": "TestReport",
"type": "Microsoft.CostManagement/reports",
"properties": {
"schedule":{
"status": "Active",
Expand Down Expand Up @@ -233,11 +233,11 @@
},
"grouping": [
{
"columnType": "Dimension",
"type": "Dimension",
"name": "SubscriptionName"
},
{
"columnType": "Tag",
"type": "Tag",
"name": "Environment"
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"api-version": "2018-08-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "MYDEVTESTRG",
"reportConfigName": "TestReport"
"reportName": "TestReport"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"parameters": {
"api-version": "2018-09-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "MYDEVTESTRG",
"reportName": "TestReport"
},
"responses": {
"200": {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
{
"parameters": {
"api-version": "2018-09-01-preview",
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resourceGroupName": "MYDEVTESTRG"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/JohnDoeSchedule/Run/1e25d58a-a3b0-4916-9542-6e04a89bc100",
"name": null,
"type": null,
"eTag": null,
"properties": {
"executionType": "OnDemand",
"status": "Completed",
"submittedBy": "john.doe@gmail.com",
"submittedTime": "2018-08-03T07:52:15.6016681Z",
"processingStartTime": "2018-08-03T07:52:16.9123797Z",
"processingEndTime": "2018-08-03T07:52:28.0373318Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_1e25d58a-a3b0-4916-9542-6e04a89bc100.csv",
"reportSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "reports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"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": [
{
"type": "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.CostManagement/reports/JohnDoeSchedule/Run/11ac6811-dca3-46ad-b326-4704cf0c58ef",
"name": null,
"type": null,
"eTag": null,
"properties": {
"executionType": "Scheduled",
"status": "Completed",
"submittedBy": "System",
"submittedTime": "2018-08-03T09:03:58.5710244Z",
"processingStartTime": "2018-08-03T09:03:58.5710244Z",
"processingEndTime": "2018-08-03T09:04:19.7223808Z",
"fileName": "ScheduledTestsForJohnDoe/JohnDoeSchedule/20180729-20180804/JohnDoeSchedule_11ac6811-dca3-46ad-b326-4704cf0c58ef.csv",
"reportSettings": {
"format": "Csv",
"deliveryInfo": {
"destination": {
"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MYDEVTESTRG/providers/Microsoft.Storage/storageAccounts/ccmeastusdiag182",
"container": "reports",
"rootFolderPath": "ScheduledTestsForJohnDoe"
}
},
"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": [
{
"type": "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"
]
}
}
]
}
}
}
}
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"body": {
"value": [
{
"id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig1",
"name": "TestReportConfig1",
"type": "Microsoft.Consumption/reportconfigs",
"id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/TestReport1",
"name": "TestReport1",
"type": "Microsoft.CostManagement/reports",
"properties": {
"format": "Csv",
"deliveryInfo": {
Expand Down Expand Up @@ -47,7 +47,7 @@
},
"grouping": [
{
"columnType": "Dimension",
"type": "Dimension",
"name": "SubscriptionName"
}
],
Expand Down Expand Up @@ -93,9 +93,9 @@
}
},
{
"id": "subscriptions/{subscription-id}/providers/Microsoft.Consumption/reportconfigs/TestReportConfig2",
"name": "TestReportConfig2",
"type": "Microsoft.Consumption/reportconfigs",
"id": "subscriptions/{subscription-id}/providers/Microsoft.CostManagement/reports/TestReport2",
"name": "TestReport2",
"type": "Microsoft.CostManagement/reports",
"properties": {
"schedule":{
"status": "Active",
Expand Down Expand Up @@ -135,7 +135,7 @@
},
"grouping": [
{
"columnType": "Tag",
"type": "Tag",
"name": "Environment"
}
],
Expand Down
Loading

0 comments on commit 21d580e

Please sign in to comment.