Skip to content

Commit 0e78c01

Browse files
author
REDMOND\chanwan
committed
Add usage detail markdown file
1 parent 8ca0304 commit 0e78c01

File tree

3 files changed

+124
-46
lines changed

3 files changed

+124
-46
lines changed

src/ResourceManager/Consumption/ChangeLog.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
## Version 0.3.2
2323
* Set minimum dependency of module to PowerShell 5.0
24-
* Remove parameter InvoiceName on Cmdlet Get-AzureRmConsumptionUsageDetail
2524
* Add new parameters Expand, ResourceGroup, InstanceName, InstanceId, Tags, and Top on Cmdlet Get-AzureRmConsumptionUsageDetail
2625

2726
## Version 0.3.1

src/ResourceManager/Consumption/Commands.Consumption/Cmdlets/UsageDetails/GetAzureRmConsumptionUsageDetail.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class GetAzureRmConsumptionUsageDetail : AzureConsumptionCmdletBase
2929
{
3030
const int MaxNumberToFetch = 1000;
3131

32-
[Parameter(Mandatory = false, HelpMessage = "Name of a specific billing period to get the usage details that associate with.", ParameterSetName = Constants.ParameterSetNames.BillingPeriodItemParameterSet)]
32+
[Parameter(Mandatory = false, HelpMessage = "Name of a specific billing period to get the usage details that associate with.")]
3333
[ValidateNotNullOrEmpty]
3434
public string BillingPeriodName { get; set; }
3535

@@ -75,7 +75,7 @@ public class GetAzureRmConsumptionUsageDetail : AzureConsumptionCmdletBase
7575
[ValidateNotNull]
7676
public int? Top { get; set; }
7777

78-
[Parameter(Mandatory = false, HelpMessage = "Name of a specific invoice to get the usage details that associate with.", ParameterSetName = Constants.ParameterSetNames.InvoiceItemParameterSet)]
78+
[Parameter(Mandatory = false, HelpMessage = "Name of a specific invoice to get the usage details that associate with.")]
7979
[ValidateNotNullOrEmpty]
8080
public string InvoiceName { get; set; }
8181

src/ResourceManager/Consumption/Commands.Consumption/help/Get-AzureRmConsumptionUsageDetail.md

Lines changed: 122 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,11 @@ Get usage details of the subscription.
1212

1313
## SYNTAX
1414

15-
### Subscription (Default)
1615
```
17-
Get-AzureRmConsumptionUsageDetail [-MaxCount <Int32>] [-IncludeMeterDetails] [-IncludeAdditionalProperties]
18-
[-StartDate <DateTime>] [-EndDate <DateTime>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
19-
```
20-
21-
### Invoice
22-
```
23-
Get-AzureRmConsumptionUsageDetail -InvoiceName <String> [-MaxCount <Int32>] [-IncludeMeterDetails]
24-
[-IncludeAdditionalProperties] [-StartDate <DateTime>] [-EndDate <DateTime>]
25-
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
26-
```
27-
28-
### BillingPeriod
29-
```
30-
Get-AzureRmConsumptionUsageDetail -BillingPeriodName <String> [-MaxCount <Int32>] [-IncludeMeterDetails]
31-
[-IncludeAdditionalProperties] [-StartDate <DateTime>] [-EndDate <DateTime>]
32-
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
16+
Get-AzureRmConsumptionUsageDetail [-BillingPeriodName <String>] [-Expand <String>] [-IncludeMeterDetails]
17+
[-IncludeAdditionalProperties] [-StartDate <DateTime>] [-EndDate <DateTime>] [-ResourceGroup <String>]
18+
[-InstanceName <String>] [-InstanceId <String>] [-Tags <String>] [-MaxCount <Int32>] [-Top <Int32>]
19+
[-InvoiceName <String>] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3320
```
3421

3522
## DESCRIPTION
@@ -38,25 +25,25 @@ The **Get-AzureRmConsumptionUsageDetail** cmdlet gets usage details of the subsc
3825
## EXAMPLES
3926

4027
### Example 1
41-
```
42-
PS C:\> Get-AzureRmConsumptionUsageDetail -IncludeMeterDetails -InvoiceName 201704-117283130069214
28+
```powershell
29+
PS C:\> Get-AzureRmConsumptionUsageDetail -Expand MeterDetails -Top 10
4330
```
4431

45-
Get usage details of the invoice with specified name, and include MeterDetails property in the result.
32+
Get top 10 records of usage details with expand of MeterDetails in the result.
4633

4734
### Example 2
48-
```
49-
PS C:\> Get-AzureRmConsumptionUsageDetail -IncludeAdditionalProperties -BillingPeriodName 201704-1
35+
```powershell
36+
PS C:\> Get-AzureRmConsumptionUsageDetail -StartDate 2017-10-02 -EndDate 2017-10-05 -Top 10
5037
```
5138

52-
Get usage details of the billing period with specified name, and include AdditionalProperties property in the result.
39+
Get top 10 records of usage details with date range in the result.
5340

5441
### Example 3
55-
```
56-
PS C:\> Get-AzureRmConsumptionUsageDetail -StartDate 2017-01-17 -EndDate 2017-01-19
42+
```powershell
43+
PS C:\> Get-AzureRmConsumptionUsageDetail -BillingPeriodName 201710 -InstanceName 1c2052westus -Top 10
5744
```
5845

59-
Get usage details of the subscription that is between 2017-01-17 to 2017-01-19.
46+
Get top 10 records of usage details of BillingPeriodName with InstanceName filter in the result.
6047

6148
## PARAMETERS
6249

@@ -65,18 +52,18 @@ Name of a specific billing period to get the usage details that associate with.
6552

6653
```yaml
6754
Type: String
68-
Parameter Sets: BillingPeriod
69-
Aliases:
55+
Parameter Sets: (All)
56+
Aliases:
7057

71-
Required: True
58+
Required: False
7259
Position: Named
7360
Default value: None
7461
Accept pipeline input: False
7562
Accept wildcard characters: False
7663
```
7764
7865
### -DefaultProfile
79-
The credentials, account, tenant, and subscription used for communication with azure
66+
The credentials, account, tenant, and subscription used for communication with Azure.
8067
8168
```yaml
8269
Type: IAzureContextContainer
@@ -91,12 +78,27 @@ Accept wildcard characters: False
9178
```
9279
9380
### -EndDate
94-
The end date (in UTC) of the usages.
81+
The end date (in UTC) of the usages to filter.
9582
9683
```yaml
9784
Type: DateTime
9885
Parameter Sets: (All)
99-
Aliases:
86+
Aliases:
87+
88+
Required: False
89+
Position: Named
90+
Default value: None
91+
Accept pipeline input: False
92+
Accept wildcard characters: False
93+
```
94+
95+
### -Expand
96+
Expand the usages based on MeterDetails, or AdditionalProperties.
97+
98+
```yaml
99+
Type: String
100+
Parameter Sets: (All)
101+
Aliases:
100102

101103
Required: False
102104
Position: Named
@@ -111,7 +113,7 @@ Include additional properties in the usages.
111113
```yaml
112114
Type: SwitchParameter
113115
Parameter Sets: (All)
114-
Aliases:
116+
Aliases:
115117

116118
Required: False
117119
Position: Named
@@ -126,7 +128,37 @@ Include meter details in the usages.
126128
```yaml
127129
Type: SwitchParameter
128130
Parameter Sets: (All)
129-
Aliases:
131+
Aliases:
132+
133+
Required: False
134+
Position: Named
135+
Default value: None
136+
Accept pipeline input: False
137+
Accept wildcard characters: False
138+
```
139+
140+
### -InstanceId
141+
The instance id of the usages to filter.
142+
143+
```yaml
144+
Type: String
145+
Parameter Sets: (All)
146+
Aliases:
147+
148+
Required: False
149+
Position: Named
150+
Default value: None
151+
Accept pipeline input: False
152+
Accept wildcard characters: False
153+
```
154+
155+
### -InstanceName
156+
The instance name of the usages to filter.
157+
158+
```yaml
159+
Type: String
160+
Parameter Sets: (All)
161+
Aliases:
130162

131163
Required: False
132164
Position: Named
@@ -140,10 +172,10 @@ Name of a specific invoice to get the usage details that associate with.
140172
141173
```yaml
142174
Type: String
143-
Parameter Sets: Invoice
144-
Aliases:
175+
Parameter Sets: (All)
176+
Aliases:
145177

146-
Required: True
178+
Required: False
147179
Position: Named
148180
Default value: None
149181
Accept pipeline input: False
@@ -156,7 +188,22 @@ Determine the maximum number of records to return.
156188
```yaml
157189
Type: Int32
158190
Parameter Sets: (All)
159-
Aliases:
191+
Aliases:
192+
193+
Required: False
194+
Position: Named
195+
Default value: None
196+
Accept pipeline input: False
197+
Accept wildcard characters: False
198+
```
199+
200+
### -ResourceGroup
201+
The resource group of the usages to filter.
202+
203+
```yaml
204+
Type: String
205+
Parameter Sets: (All)
206+
Aliases:
160207

161208
Required: False
162209
Position: Named
@@ -166,12 +213,42 @@ Accept wildcard characters: False
166213
```
167214
168215
### -StartDate
169-
The start date (in UTC) of the usages.
216+
The start date (in UTC) of the usages to filter.
170217
171218
```yaml
172219
Type: DateTime
173220
Parameter Sets: (All)
174-
Aliases:
221+
Aliases:
222+
223+
Required: False
224+
Position: Named
225+
Default value: None
226+
Accept pipeline input: False
227+
Accept wildcard characters: False
228+
```
229+
230+
### -Tags
231+
The tag of the usages to filter.
232+
233+
```yaml
234+
Type: String
235+
Parameter Sets: (All)
236+
Aliases:
237+
238+
Required: False
239+
Position: Named
240+
Default value: None
241+
Accept pipeline input: False
242+
Accept wildcard characters: False
243+
```
244+
245+
### -Top
246+
Determine the maximum number of records to return.
247+
248+
```yaml
249+
Type: Int32
250+
Parameter Sets: (All)
251+
Aliases:
175252

176253
Required: False
177254
Position: Named
@@ -181,17 +258,19 @@ Accept wildcard characters: False
181258
```
182259
183260
### CommonParameters
184-
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
261+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
262+
For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
185263
186264
## INPUTS
187265
188266
### None
189267
268+
190269
## OUTPUTS
191270
192-
### System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Consumption.Models.PSUsageDetail, Microsoft.Azure.Commands.Consumption, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]]
271+
### System.Collections.Generic.List`1[[Microsoft.Azure.Commands.Consumption.Models.PSUsageDetail, Microsoft.Azure.Commands.Consumption, Version=0.3.2.0, Culture=neutral, PublicKeyToken=null]]
272+
193273

194274
## NOTES
195275

196276
## RELATED LINKS
197-

0 commit comments

Comments
 (0)