Get-AzsSubscriberUsage
Gets a collection of SubscriberUsageAggregates, which are UsageAggregates from users.
Syntax
Get-AzsSubscriberUsage
-ReportedEndTime <DateTime>
-ReportedStartTime <DateTime>
[-SubscriptionId <String[]>]
[-AggregationGranularity <String>]
[-ContinuationToken <String>]
[-SubscriberId <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
Gets a collection of SubscriberUsageAggregates, which are UsageAggregates from users.
Examples
Example 1: Get usage data aggregated by day
Get-AzsSubscriberUsage -ReportedStartTime "2019/12/30" -ReportedEndTime "2019-12-31" -AggregationGranularity Daily
Get the usage data for the entire day of 30th Dec 2019 (in UTC) for all tenants under provider aggregated by the day. Specify the date using the format mm/dd/yyyy
.
If called as the service administrator, this effectively shows all usage data for every tenant.
Example 2: Get usage data aggregated by the hour
Get-AzsSubscriberUsage -ReportedStartTime "12/30/2019 15:00" -ReportedEndTime "12/30/2019 16:00" -AggregationGranularity Hourly
Get the usage data between 3pm - 4am on 30th Dec 2019 (in UTC) aggregated by the hour. Specify the date and time using the format mm/dd/yyyy HH:MM
.
Likewise, if called as the service administrator, this effectively shows all usage data for every tenant.
Parameters
-AggregationGranularity
The aggregation granularity.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ContinuationToken
The continuation token.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Type: | System.Management.Automation.PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReportedEndTime
The reported end time (exclusive).
Type: | System.DateTime |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReportedStartTime
The reported start time (inclusive).
Type: | System.DateTime |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriberId
The tenant subscription identifier.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Type: | System.String[] |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Microsoft.Azure.PowerShell.Cmdlets.Commerce.Models.Api20150601Preview.IUsageAggregate