Skip to content

Commit f3fa69a

Browse files
authored
Merge pull request #278315 from bandersmsft/migrate-ea-marketplace-store-charge-api
MCM - Update migrate-ea-marketplace-store-charge-api
2 parents c586268 + dd313b4 commit f3fa69a

File tree

1 file changed

+51
-112
lines changed

1 file changed

+51
-112
lines changed

articles/cost-management-billing/automate/migrate-ea-marketplace-store-charge-api.md

Lines changed: 51 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ titleSuffix: Microsoft Cost Management
44
description: This article has information to help you migrate from the EA Marketplace Store Charge API.
55
author: bandersmsft
66
ms.author: banders
7-
ms.date: 04/23/2024
7+
ms.date: 06/14/2024
88
ms.topic: conceptual
99
ms.service: cost-management-billing
1010
ms.subservice: cost-management
@@ -26,121 +26,60 @@ Endpoints to migrate off:
2626
| `/v3/enrollments/{enrollmentNumber}/billingPeriods/{billingPeriod}/marketplacecharges` | • API method: GET <br><br> • Synchronous (non polling) <br><br> • Data format: JSON |
2727
| `/v3/enrollments/{enrollmentNumber}/marketplacechargesbycustomdate?startTime=2017-01-01&endTime=2017-01-10` | • API method: GET <br><br> • Synchronous (non polling) <br><br> • Data format: JSON |
2828

29+
## New solutions generally available
30+
31+
We merged Azure Marketplace and Azure usage records into a single cost details dataset.
32+
33+
The following table provides a summary of the migration destinations that are available along with a summary of what to consider when choosing which solution is best for you.
34+
35+
| Solution | Purpose | Considerations | Onboarding details |
36+
| --- | --- | --- | --- |
37+
| **Exports** | Recurring data dumps to storage on a schedule | • The most scalable solution for your workloads. <br>• Can be configured to use file partitioning for bigger datasets. <br>• Great for establishing and growing a cost dataset that can be integrated with your own queryable data stores. <br>• Requires access to a storage account that can hold the data. |[Configure in Azure portal](../costs/tutorial-export-acm-data.md) <br>[Automate Export creation with the API](../costs/ingest-azure-usage-at-scale.md) <br>• [Export API Reference](/rest/api/cost-management/exports/create-or-update) |
38+
| **Cost Details API** | On demand download | • Useful for small cost datasets. <br>• Useful for scenarios when Exports to Azure storage aren't feasible due to security or manageability concerns. |[Get small cost datasets on demand](get-small-usage-datasets-on-demand.md) <br>• [Cost Details](/rest/api/cost-management/generate-cost-details-report) API |
39+
40+
We recommend using Exports if you have ongoing data ingestion needs or a large monthly cost details dataset. For more information, see [Ingest cost details data](automation-ingest-usage-details-overview.md). If you need additional information to help you make a decision for your workload, see [Choose a cost details solution](usage-details-best-practices.md).
41+
2942
## Assign permissions to a service principal to call the API
3043

3144
Before calling the API, you need to configure a service principal with the correct permission. You use the service principal to call the API. For more information, see [Assign permissions to Cost Management APIs](cost-management-api-permissions.md).
3245

33-
### Call the Marketplaces API
34-
35-
Use the following request URIs when calling the new Marketplaces API. All Azure and Marketplace charges are merged into a single file that is available through the new solutions. You can identify which charges are *Azure* versus *Marketplace* charges by using the `PublisherType` field that is available in the new dataset.
36-
37-
Your enrollment number should be used as the `billingAccountId`.
38-
39-
#### Supported requests
40-
41-
You can call the API using the following scopes:
42-
43-
- Department: `/providers/Microsoft.Billing/departments/{departmentId}`
44-
- Enrollment: `/providers/Microsoft.Billing/billingAccounts/{billingAccountId}`
45-
- EnrollmentAccount: `/providers/Microsoft.Billing/enrollmentAccounts/{enrollmentAccountId}`
46-
- Management Group: `/providers/Microsoft.Management/managementGroups/{managementGroupId}`
47-
- Subscription: `/subscriptions/{subscriptionId}/`
48-
49-
For subscription, billing account, department, enrollment account, and management group scopes you can also add a billing period to the scope using `/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}`. For example, to specify a billing period at the department scope, use `/providers/Microsoft.Billing/departments/{departmentId}/providers/Microsoft.Billing/billingPeriods/{billingPeriodName}`.
50-
51-
[List Marketplaces](/rest/api/consumption/marketplaces/list#marketplaceslistresult)
52-
53-
```http
54-
GET https://management.azure.com/{scope}/providers/Microsoft.Consumption/marketplaces?api-version=2023-05-01
55-
```
56-
57-
With optional parameters:
58-
59-
```http
60-
https://management.azure.com/{scope}/providers/Microsoft.Consumption/marketplaces?api-version=2023-05-01?&$filter={$filter}&$top={$top}&$skiptoken={$skiptoken}
61-
```
62-
63-
#### Response body changes
64-
65-
>[!NOTE]
66-
> The new response is missing the `AccountId`, `AccountOwnerId`, and `DepartmentId` fields. For account and department information, use the `AccountName` and `DepartmentName` fields.
67-
68-
Old response:
69-
70-
71-
```json
72-
[
73-
{
74-
"id": "id",
75-
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
76-
"subscriptionName": "subName",
77-
"meterId": "2core",
78-
"usageStartDate": "2015-09-17T00:00:00Z",
79-
"usageEndDate": "2015-09-17T23:59:59Z",
80-
"offerName": "Virtual LoadMaster&trade; (VLM) for Azure",
81-
"resourceGroup": "Res group",
82-
"instanceId": "id",
83-
"additionalInfo": "{\"ImageType\":null,\"ServiceType\":\"Medium\"}",
84-
"tags": "",
85-
"orderNumber": "order",
86-
"unitOfMeasure": "",
87-
"costCenter": "100",
88-
"accountId": 100,
89-
"accountName": "Account Name",
90-
"accountOwnerId": "[email protected]",
91-
"departmentId": 101,
92-
"departmentName": "Department 1",
93-
"publisherName": "Publisher 1",
94-
"planName": "Plan name",
95-
"consumedQuantity": 1.15,
96-
"resourceRate": 0.1,
97-
"extendedCost": 1.11,
98-
"isRecurringCharge": "False"
99-
},
100-
...
101-
]
102-
```
103-
104-
New response:
105-
106-
```json
107-
{
108-
"id": "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702/providers/Microsoft.Consumption/marketPlaces/marketplacesId1",
109-
"name": "marketplacesId1",
110-
"type": "Microsoft.Consumption/marketPlaces",
111-
"tags": {
112-
"env": "newcrp",
113-
"dev": "tools"
114-
},
115-
"properties": {
116-
"accountName": "Account1",
117-
"additionalProperties": "additionalProperties",
118-
"costCenter": "Center1",
119-
"departmentName": "Department1",
120-
"billingPeriodId": "/subscriptions/subid/providers/Microsoft.Billing/billingPeriods/201702",
121-
"usageStart": "2017-02-13T00:00:00Z",
122-
"usageEnd": "2017-02-13T23:59:59Z",
123-
"instanceName": "shared1",
124-
"instanceId": "/subscriptions/subid/resourceGroups/Default-Web-eastasia/providers/Microsoft.Web/sites/shared1",
125-
"currency": "USD",
126-
"consumedQuantity": 0.00328,
127-
"pretaxCost": 0.67,
128-
"isEstimated": false,
129-
"meterId": "00000000-0000-0000-0000-000000000000",
130-
"offerName": "offer1",
131-
"resourceGroup": "TEST",
132-
"orderNumber": "00000000-0000-0000-0000-000000000000",
133-
"publisherName": "xyz",
134-
"planName": "plan2",
135-
"resourceRate": 0.24,
136-
"subscriptionGuid": "00000000-0000-0000-0000-000000000000",
137-
"subscriptionName": "azure subscription",
138-
"unitOfMeasure": "10 Hours",
139-
"isRecurringCharge": false
140-
}
141-
}
142-
143-
```
46+
## Avoid the Microsoft Consumption Marketplaces API
47+
48+
The Consumption Marketplaces API is another endpoint that currently supports EA customers. Don't migrate to this API. Migrate to either Exports or the Cost Details API, as outlined earlier in this document. The Consumption Marketplaces API will be deprecated in the future.
49+
50+
## Field differences
51+
52+
The following table summarizes the field mapping needed to transition from the data provided by the Marketplaces API to Exports and the Cost Details API. Both of the solutions provide a CSV file download as opposed to the paginated JSON response that gets provided by the Consumption API.
53+
54+
Usage records can be identified as marketplace records in the combined dataset through the `PublisherType` field. Also, there are many new fields in the newer solutions that might be useful to you. For more information about available fields, see [Understand usage details fields](understand-usage-details-fields.md).
55+
56+
| **Old Property** | **New Property** | **Notes** |
57+
| --- | --- | --- |
58+
| | PublisherType | Used to identify a marketplace usage record |
59+
| accountName | AccountName | |
60+
| additionalProperties | AdditionalInfo | |
61+
| costCenter | CostCenter | |
62+
| departmentName | BillingProfileName | |
63+
| billingPeriodId | | Use BillingPeriodStartDate / BillingPeriodEndDate |
64+
| usageStart | | Use Date |
65+
| usageEnd | | Use Date |
66+
| instanceName | ResourceName | |
67+
| instanceId | ResourceId | |
68+
| currency | BillingCurrencyCode | |
69+
| consumedQuantity | Quantity | |
70+
| pretaxCost | CostInBillingCurrency | |
71+
| isEstimated | | Not available |
72+
| meterId | MeterId | |
73+
| offerName | OfferId | |
74+
| resourceGroup | ResourceGroup | |
75+
| orderNumber | | Not available |
76+
| publisherName | PublisherName | |
77+
| planName | PlanName | |
78+
| resourceRate | EffectivePrice | |
79+
| subscriptionGuid | SubscriptionId | |
80+
| subscriptionName | SubscriptionName | |
81+
| unitOfMeasure | UnitOfMeasure | |
82+
| isRecurringCharge | | Where applicable, use the Frequency and Term fields moving forward. |
14483

14584
## Related content
14685

0 commit comments

Comments
 (0)