Get-AzConsumptionUsageDetail
Get usage details of the subscription.
Syntax
Default (Default)
Get-AzConsumptionUsageDetail
[-BillingPeriodName <String>]
[-Expand <String>]
[-IncludeMeterDetails]
[-IncludeAdditionalProperties]
[-StartDate <DateTime>]
[-EndDate <DateTime>]
[-ResourceGroup <String>]
[-InstanceName <String>]
[-InstanceId <String>]
[-Tag <String>]
[-MaxCount <Int32>]
[-Top <Int32>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzConsumptionUsageDetail cmdlet gets usage details of the subscription.
Examples
Example 1: Get usage details with expand of MeterDetails
Get-AzConsumptionUsageDetail -Expand MeterDetails -Top 10
AccountName: AAAA
BillingPeriodId: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601
ConsumedService: Microsoft.Compute
CostCenter: XYZ987
Currency: USD
DepartmentName: Ama
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20180601/providers/Microsoft.Consumption/usageDetails/24b9dff0-f022-55a1-886b-17b330000db3
InstanceId: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/resourceGroups/MAR-CCM/providers/Microsoft.Compute/disks/mar-ccm-vm01_OsDisk_1_d0beead4b6ff4b4088a687701d355d61
InstanceLocation: usnorthcentral
InstanceName: mar-ccm-vm01_OsDisk_1_d0beead4b6ff4b4088a687701d355d61
IsEstimated: true
MeterDetails: MeterCategory: Data Management
MeterLocation: usnorthcentral
MeterName: Standard Managed Disk Operations (in 10,000s)
MeterSubCategory: Data Management
Unit: Operations
MeterId: 82cd70ab-1aee-4b30-bc04-8b71e1204dbc
Name: 24b9dff0-f022-55a1-886b-17b330000db3
PretaxCost: 0
Product: Data Management Standard Managed Disk Operations
SubscriptionGuid: 1caaa5a3-2b66-438e-8ab4-bce37d518c5d
SubscriptionName: CCM - Microsoft Azure Enterprise - 1
Type: Microsoft.Consumption/usageDetails
UsageEnd: 6/1/2018 11:59:59 PM
UsageQuantity: 3.8218
UsageStart: 6/1/2018 12:00:00 AM
Example 2: Get usage details with date range
Get-AzConsumptionUsageDetail -StartDate 2017-10-02 -EndDate 2017-10-05 -Top 10
AccountName: AAAA
BillingPeriodId: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20171001
ConsumedService: Storage
CostCenter: XYZ987
Currency: USD
DepartmentName: Ama
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20171001/providers/Microsoft.Consumption/usageDetails/732582e5-40ad-bb23-7a69-ca1ff7c8b004
InstanceId: storsimplezc9q6r2t7f
InstanceLocation: US West Central
InstanceName: storsimplezc9q6r2t7f
IsEstimated: false
MeterId: ad22fac8-9da5-4577-8683-56ae94d39e42
Name: 732582e5-40ad-bb23-7a69-ca1ff7c8b004
PretaxCost: 0
Product: Data Management Geo Redundant Standard IO - Table Write
SubscriptionGuid: 1caaa5a3-2b66-438e-8ab4-bce37d518c5d
SubscriptionName: CCM - Microsoft Azure Enterprise - 1
Type: Microsoft.Consumption/usageDetails
UsageEnd: 10/2/2017 11:59:59 PM
UsageQuantity: 0.0006
UsageStart: 10/2/2017 12:00:00 AM
Example 3: Get usage details of BillingPeriodName with InstanceName filter
Get-AzConsumptionUsageDetail -BillingPeriodName 201710 -InstanceName 1c2052westus -Top 10
AccountName: AAAA
BillingPeriodId: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20171001
ConsumedService: Microsoft.Storage
CostCenter: XYZ987
Currency: USD
DepartmentName: Ama
Id: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/providers/Microsoft.Billing/billingPeriods/20171001/providers/Microsoft.Consumption/usageDetails/8abc8b65-e8f1-31e1-f02b-058a7572363f
InstanceId: subscriptions/1caaa5a3-2b66-438e-8ab4-bce37d518c5d/resourceGroups/securitydata/providers/Microsoft.Storage/storageAccounts/1c2052westus
InstanceLocation: uswest
InstanceName: 1c2052westus
IsEstimated: false
MeterId: 9995d93a-7d35-4d3f-9c69-7a7fea447ef4
Name: 8abc8b65-e8f1-31e1-f02b-058a7572363f
PretaxCost: 0.000000693016692
Product: Data Transfer Out - Zone 1
SubscriptionGuid: 1caaa5a3-2b66-438e-8ab4-bce37d518c5d
SubscriptionName: CCM - Microsoft Azure Enterprise - 1
Type: Microsoft.Consumption/usageDetails
UsageEnd: 10/1/2017 11:59:59 PM
UsageQuantity: 0.000009
UsageStart: 10/1/2017 12:00:00 AM
Parameters
-BillingPeriodName
Name of a specific billing period to get the usage details that associate with.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-EndDate
The end date (in UTC) of the usages to filter.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Expand
Expand the usages based on MeterDetails, or AdditionalInfo.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IncludeAdditionalProperties
Include additional properties in the usages.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-IncludeMeterDetails
Include meter details in the usages.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-InstanceId
The instance id of the usages to filter.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-InstanceName
The instance name of the usages to filter.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MaxCount
Determine the maximum number of records to return.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroup
The resource group of the usages to filter.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-StartDate
The start date (in UTC) of the usages to filter.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
The tag of the usages to filter.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Top
Determine the maximum number of records to return.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
None
Outputs