Skip to content

Commit 7c3d304

Browse files
authored
Merge pull request #49999 from mattbriggs/mdb_20180824_adminapi
Adding useage info
2 parents 5267ad4 + f2a9ca6 commit 7c3d304

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

articles/azure-stack/azure-stack-provider-resource-api.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.workload: na
1212
ms.tgt_pltfrm: na
1313
ms.devlang: na
1414
ms.topic: article
15-
ms.date: 03/22/2018
15+
ms.date: 08/24/2018
1616
ms.author: mabrigg
1717
ms.reviewer: alfredop
1818

@@ -90,6 +90,8 @@ meterID1",
9090

9191
## Retrieve usage information
9292

93+
### PowerShell
94+
9395
To generate the usage data, you should have resources that are running and actively using the system, For example, an active virtual machine, or a storage account containing some data etc. If you’re not sure whether you have any resources running in Azure Stack Marketplace, deploy a virtual machine (VM), and verify the VM monitoring blade to make sure it’s running. Use the following PowerShell cmdlets to view the usage data:
9496

9597
1. [Install PowerShell for Azure Stack.](azure-stack-powershell-install.md)
@@ -98,6 +100,22 @@ To generate the usage data, you should have resources that are running and activ
98100
```powershell
99101
Get-UsageAggregates -ReportedStartTime "<Start time for usage reporting>" -ReportedEndTime "<end time for usage reporting>" -AggregationGranularity <Hourly or Daily>
100102
```
103+
### REST API
104+
105+
You can collect usage information for deleted subscriptions by calling the Microsoft.Commerce.Admin service.
106+
107+
**To return all tenant usage for deleted for active users:**
108+
109+
| **Method** | **Request URI** |
110+
| --- | --- |
111+
| GET | https://{armendpoint}/subscriptions/{subId}/providersMicrosoft.Commerce.Admin/subscriberUsageAggregates?reportedStartTime={start-time}&reportedEndTime={end-endtime}&aggregationGranularity=Hourly&api-version=2015-06-01-preview |
112+
113+
**To return the usage for deleted or active tenant:**
114+
115+
| **Method** | **Request URI** |
116+
| --- | --- |
117+
| GET |https://{armendpoint}/subscriptions/{subId}/providersMicrosoft.Commerce.Admin/subscriberUsageAggregates?reportedStartTime={start-time}&reportedEndTime={end-endtime}&aggregationGranularity=Hourly&subscriberId={subscriber-id}&api-version=2015-06-01-preview |
118+
101119

102120
## Next steps
103121
[Tenant resource usage API reference](azure-stack-tenant-resource-usage-api.md)

0 commit comments

Comments
 (0)