Skip to content

Commit

Permalink
Above-Subscription Level Marketplace and Usage Detail, and Enrollment…
Browse files Browse the repository at this point in the history
… Level Balances (#2857)

* This PR includes above-subscription level (Enrollment, Department, or Account) Marketplace, Usage Details, and Enrollment Level Balances.

* Updated consumption.json to fix build failure issues

* Added "Get" to Operation Name 'BalancesByBillingAccount' and also replaced priceHidden boolean type with enum for more clarity

* Added Enrollment-Level balances by BillingPeriod

* Updated BalancesByBillingAccount example files and added x-ms-parameter-location to some parameters missing that part.

* Replaced Microsoft.CostManagment with Microsoft.Billing

* Fixed example errors
  • Loading branch information
parisa-naeimi authored and marstr committed Apr 30, 2018
1 parent 3ac5504 commit a0f2b94
Show file tree
Hide file tree
Showing 17 changed files with 1,840 additions and 86 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"parameters": {
"api-version": "2018-03-31",
"billingAccountId": "123456"
},
"responses": {
"200": {
"body": {
"id": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/balances/balanceId1",
"name": "balanceId1",
"type": "Microsoft.Consumption/balances",
"properties": {
"currency": "USD ",
"beginningBalance": 3396469.19,
"endingBalance": 2922371.02,
"newPurchases": 0,
"adjustments": 0,
"utilized": 474098.17,
"serviceOverage": 0,
"chargesBilledSeparately": 0,
"totalOverage": 0,
"totalUsage": 474098.17,
"azureMarketplaceServiceCharges": 609.82,
"billingFrequency": "Month",
"priceHidden": false,
"newPurchasesDetails": [
{
"name": "Promo Purchase",
"value": 1
}
],
"adjustmentDetails": [
{
"name": "Promo Credit",
"value": 1.1
},
{
"name": "SIE Credit",
"value": 1.0
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"parameters": {
"api-version": "2018-03-31",
"billingAccountId": "123456",
"billingPeriodName": "201702"
},
"responses": {
"200": {
"body": {
"id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/balances/balanceId1",
"name": "balanceId1",
"type": "Microsoft.Consumption/balances",
"properties": {
"currency": "USD ",
"beginningBalance": 3396469.19,
"endingBalance": 2922371.02,
"newPurchases": 0,
"adjustments": 0,
"utilized": 474098.17,
"serviceOverage": 0,
"chargesBilledSeparately": 0,
"totalOverage": 0,
"totalUsage": 474098.17,
"azureMarketplaceServiceCharges": 609.82,
"billingFrequency": "Month",
"priceHidden": false,
"newPurchasesDetails": [
{
"name": "Promo Purchase",
"value": 1
}
],
"adjustmentDetails": [
{
"name": "Promo Credit",
"value": 1.1
},
{
"name": "SIE Credit",
"value": 1.0
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"responses": {
"200": {
"body": {
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costTags/costTags1",
"id": "providers/Microsoft.Billing/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costTags/costTags1",
"name": "costTags1",
"type": "Microsoft.Consumption/costTags",
"eTag": "\"1d34d012214157f\"",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"responses": {
"201": {
"body": {
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costTags/costTags1",
"id": "providers/Microsoft.Billing/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costTags/costTags1",
"name": "costTags1",
"type": "Microsoft.Consumption/costTags",
"eTag": "\"1d34d012214157f\"",
Expand All @@ -46,7 +46,7 @@
},
"200": {
"body": {
"id": "providers/Microsoft.CostManagement/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costTags/costTags1",
"id": "providers/Microsoft.Billing/billingAccounts/{billingaccount-id}/providers/Microsoft.Consumption/costTags/costTags1",
"name": "costTags1",
"type": "Microsoft.Consumption/costTags",
"eTag": "\"1d34d012214157f\"",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"parameters": {
"api-version": "2018-03-31",
"billingAccountId": "123456"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Consumption/marketplaces/marketplaceId1",
"name": "marketplaceId1",
"type": "Microsoft.Consumption/marketPlaces",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingPeriodId": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702",
"usageStart": "2017-02-13T00:00:00Z",
"usageEnd": "2017-02-13T23:59:59Z",
"instanceName": "shared1",
"instanceId": "/subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1",
"currency": "USD",
"consumedQuantity": 0.00328,
"pretaxCost": 0.67,
"isEstimated": false,
"offerName": "offer1",
"resourceGroup": "TEST",
"orderNumber": "00000000-0000-0000-0000-000000000000",
"publisherName": "xyz",
"planName": "plan1",
"resourceRate": 0.24,
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "azure subscription"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"api-version": "2018-03-31",
"billingAccountId": "123456",
"billingPeriodName": "201702"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1",
"name": "marketplacesId1",
"type": "Microsoft.Consumption/marketPlaces",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingPeriodId": "/providers/Microsoft.Billing/billingAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702",
"usageStart": "2017-02-13T00:00:00Z",
"usageEnd": "2017-02-13T23:59:59Z",
"instanceName": "shared1",
"instanceId": "/subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1",
"currency": "USD",
"consumedQuantity": 0.00328,
"pretaxCost": 0.67,
"isEstimated": false,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerName": "offer1",
"resourceGroup": "TEST",
"orderNumber": "00000000-0000-0000-0000-000000000000",
"publisherName": "xyz",
"planName": "plan2",
"resourceRate": 0.24,
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "azure subscription"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"api-version": "2018-03-31",
"departmentId": "123456",
"billingPeriodName": "201702"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Billing/departments/123456/providers/Microsoft.Consumption/marketplaces/marketplaceId1",
"name": "marketplacesId1",
"type": "Microsoft.Consumption/marketPlaces",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingPeriodId": "/providers/Microsoft.Billing/departments/123456/providers/Microsoft.Billing/billingPeriods/201702",
"usageStart": "2017-02-13T00:00:00Z",
"usageEnd": "2017-02-13T23:59:59Z",
"instanceName": "shared1",
"instanceId": "/subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1",
"currency": "USD",
"consumedQuantity": 0.00328,
"pretaxCost": 0.67,
"isEstimated": false,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerName": "offer1",
"resourceGroup": "TEST",
"orderNumber": "00000000-0000-0000-0000-000000000000",
"publisherName": "xyz",
"planName": "plan2",
"resourceRate": 0.24,
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "azure subscription"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"api-version": "2018-03-31",
"departmentId": "123456",
"billingPeriodName": "201702"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Billing/departments/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1",
"name": "marketplacesId1",
"type": "Microsoft.Consumption/marketPlaces",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingPeriodId": "/providers/Microsoft.Billing/departments/123456/providers/Microsoft.Billing/billingPeriods/201702",
"usageStart": "2017-02-13T00:00:00Z",
"usageEnd": "2017-02-13T23:59:59Z",
"instanceName": "shared1",
"instanceId": "/subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1",
"currency": "USD",
"consumedQuantity": 0.00328,
"pretaxCost": 0.67,
"isEstimated": false,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerName": "offer1",
"resourceGroup": "TEST",
"orderNumber": "00000000-0000-0000-0000-000000000000",
"publisherName": "xyz",
"planName": "plan2",
"resourceRate": 0.24,
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "azure subscription"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"api-version": "2018-03-31",
"enrollmentAccountId": "123456",
"billingPeriodName": "201702"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Billing/enrollmentAccounts/123456/providers/Microsoft.Consumption/marketplaces/marketplaceId1",
"name": "marketplacesId1",
"type": "Microsoft.Consumption/marketPlaces",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingPeriodId": "/providers/Microsoft.Billing/enrollmentAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702",
"usageStart": "2017-02-13T00:00:00Z",
"usageEnd": "2017-02-13T23:59:59Z",
"instanceName": "shared1",
"instanceId": "/subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1",
"currency": "USD",
"consumedQuantity": 0.00328,
"pretaxCost": 0.67,
"isEstimated": false,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerName": "offer1",
"resourceGroup": "TEST",
"orderNumber": "00000000-0000-0000-0000-000000000000",
"publisherName": "xyz",
"planName": "plan2",
"resourceRate": 0.24,
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "azure subscription"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"parameters": {
"api-version": "2018-03-31",
"enrollmentAccountId": "123456",
"billingPeriodName": "201702"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/providers/Microsoft.Billing/enrollmentAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketplaces/marketplaceId1",
"name": "marketplacesId1",
"type": "Microsoft.Consumption/marketPlaces",
"tags": {
"env": "newcrp",
"dev": "tools"
},
"properties": {
"billingPeriodId": "/providers/Microsoft.Billing/enrollmentAccounts/123456/providers/Microsoft.Billing/billingPeriods/201702",
"usageStart": "2017-02-13T00:00:00Z",
"usageEnd": "2017-02-13T23:59:59Z",
"instanceName": "shared1",
"instanceId": "/subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1",
"currency": "USD",
"consumedQuantity": 0.00328,
"pretaxCost": 0.67,
"isEstimated": false,
"meterId": "00000000-0000-0000-0000-000000000000",
"offerName": "offer1",
"resourceGroup": "TEST",
"orderNumber": "00000000-0000-0000-0000-000000000000",
"publisherName": "xyz",
"planName": "plan2",
"resourceRate": 0.24,
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
"subscriptionName": "azure subscription"
}
}
]
}
}
}
}
Loading

0 comments on commit a0f2b94

Please sign in to comment.