Skip to content

Commit fba9a5f

Browse files
committed
[Consumption] Update to API 2024-08-01 with refined args and examples
- Update consumption commands to API 2024-08-01. - Expose --budget-name as --name/-n on budget show/delete/create/update. - Move --start-date/--end-date and --etag to default arg group on budget create/update. - Rename --e-tag to --etag. - Add curated examples for budget, marketplace, pricesheet, usage, and reservation detail/summary list commands. - Strip swagger markdown link from 'usage list' help to satisfy aaz md verification.
1 parent 3c77193 commit fba9a5f

33 files changed

Lines changed: 2344 additions & 24 deletions

File tree

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
# [Command] _consumption budget create_
22

3-
Create operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
3+
Create operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
44

55
## Versions
66

77
### [2018-01-31](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9idWRnZXRzL3t9/2018-01-31.xml) **Preview**
88

99
<!-- mgmt-plane /subscriptions/{}/providers/microsoft.consumption/budgets/{} 2018-01-31 -->
10+
11+
### [2024-08-01](/Resources/mgmt-plane/L3tzY29wZX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9idWRnZXRzL3t9/2024-08-01.xml) **Stable**
12+
13+
<!-- mgmt-plane /{scope}/providers/microsoft.consumption/budgets/{} 2024-08-01 -->
14+
15+
#### examples
16+
17+
- Create a monthly cost budget
18+
```bash
19+
consumption budget create -n my-budget --amount 100 --category Cost --time-grain Monthly --start-date 2025-01-01T00:00:00Z --end-date 2025-12-31T00:00:00Z --scope subscriptions/00000000-0000-0000-0000-000000000000
20+
```

Commands/consumption/budget/_delete.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,14 @@ Delete operation to delete a budget.
77
### [2018-01-31](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9idWRnZXRzL3t9/2018-01-31.xml) **Preview**
88

99
<!-- mgmt-plane /subscriptions/{}/providers/microsoft.consumption/budgets/{} 2018-01-31 -->
10+
11+
### [2024-08-01](/Resources/mgmt-plane/L3tzY29wZX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9idWRnZXRzL3t9/2024-08-01.xml) **Stable**
12+
13+
<!-- mgmt-plane /{scope}/providers/microsoft.consumption/budgets/{} 2024-08-01 -->
14+
15+
#### examples
16+
17+
- DeleteBudget
18+
```bash
19+
consumption budget delete --scope subscriptions/00000000-0000-0000-0000-000000000000 --name TestBudget
20+
```
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
# [Command] _consumption budget list_
22

3-
List budgets for an Azure subscription.
3+
List all budgets for the defined scope.
44

55
## Versions
66

77
### [2018-01-31](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9idWRnZXRz/2018-01-31.xml) **Preview**
88

99
<!-- mgmt-plane /subscriptions/{}/providers/microsoft.consumption/budgets 2018-01-31 -->
1010
<!-- mgmt-plane /subscriptions/{}/resourcegroups/{}/providers/microsoft.consumption/budgets 2018-01-31 -->
11+
12+
### [2024-08-01](/Resources/mgmt-plane/L3tzY29wZX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9idWRnZXRz/2024-08-01.xml) **Stable**
13+
14+
<!-- mgmt-plane /{scope}/providers/microsoft.consumption/budgets 2024-08-01 -->
15+
16+
#### examples
17+
18+
- BudgetsList
19+
```bash
20+
consumption budget list --scope subscriptions/00000000-0000-0000-0000-000000000000
21+
```
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
# [Command] _consumption budget show_
22

3-
Get the budget for a subscription by budget name.
3+
Get the budget for the scope by budget name.
44

55
## Versions
66

77
### [2018-01-31](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9idWRnZXRzL3t9/2018-01-31.xml) **Preview**
88

99
<!-- mgmt-plane /subscriptions/{}/providers/microsoft.consumption/budgets/{} 2018-01-31 -->
10+
11+
### [2024-08-01](/Resources/mgmt-plane/L3tzY29wZX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9idWRnZXRzL3t9/2024-08-01.xml) **Stable**
12+
13+
<!-- mgmt-plane /{scope}/providers/microsoft.consumption/budgets/{} 2024-08-01 -->
14+
15+
#### examples
16+
17+
- Budget
18+
```bash
19+
consumption budget show --scope subscriptions/00000000-0000-0000-0000-000000000000 --budget-name TestBudget
20+
```
Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,25 @@
11
# [Command] _consumption budget update_
22

3-
Update operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
3+
Update operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
44

55
## Versions
66

77
### [2018-01-31](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9idWRnZXRzL3t9/2018-01-31.xml) **Preview**
88

99
<!-- mgmt-plane /subscriptions/{}/providers/microsoft.consumption/budgets/{} 2018-01-31 -->
10+
11+
### [2024-08-01](/Resources/mgmt-plane/L3tzY29wZX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9idWRnZXRzL3t9/2024-08-01.xml) **Stable**
12+
13+
<!-- mgmt-plane /{scope}/providers/microsoft.consumption/budgets/{} 2024-08-01 -->
14+
15+
#### examples
16+
17+
- Update budget amount
18+
```bash
19+
consumption budget update --scope subscriptions/00000000-0000-0000-0000-000000000000 --name TestBudget --amount 200
20+
```
21+
22+
- Update budget end date
23+
```bash
24+
consumption budget update --scope subscriptions/00000000-0000-0000-0000-000000000000 --name TestBudget --end-date 2026-12-31T00:00:00Z
25+
```

Commands/consumption/budget/readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Manage budgets for an Azure subscription.
55
## Commands
66

77
- [create](/Commands/consumption/budget/_create.md)
8-
: Create operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
8+
: Create operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
99

1010
- [create-with-rg](/Commands/consumption/budget/_create-with-rg.md)
1111
: Create operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
@@ -17,16 +17,16 @@ Manage budgets for an Azure subscription.
1717
: Delete operation to delete a budget.
1818

1919
- [list](/Commands/consumption/budget/_list.md)
20-
: List budgets for an Azure subscription.
20+
: List all budgets for the defined scope.
2121

2222
- [show](/Commands/consumption/budget/_show.md)
23-
: Get the budget for a subscription by budget name.
23+
: Get the budget for the scope by budget name.
2424

2525
- [show-with-rg](/Commands/consumption/budget/_show-with-rg.md)
2626
: Get the budget for a resource group under a subscription by budget name.
2727

2828
- [update](/Commands/consumption/budget/_update.md)
29-
: Update operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
29+
: Update operation to create or update a budget. You can optionally provide an eTag if desired as a form of concurrency control. To obtain the latest eTag for a given budget, perform a get operation prior to your put operation.
3030

3131
- [update-with-rg](/Commands/consumption/budget/_update-with-rg.md)
3232
: Update operation to create or update a budget. Update operation requires latest eTag to be set in the request mandatorily. You may obtain the latest eTag by performing a get operation. Create operation does not require eTag.
Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,31 @@
11
# [Command] _consumption marketplace list_
22

3-
List the marketplace for an Azure subscription within a billing period.
3+
List the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later.
44

55
## Versions
66

77
### [2018-01-31](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5iaWxsaW5nL2JpbGxpbmdwZXJpb2RzL3t9L3Byb3ZpZGVycy9taWNyb3NvZnQuY29uc3VtcHRpb24vbWFya2V0cGxhY2Vz/2018-01-31.xml) **Preview**
88

99
<!-- mgmt-plane /subscriptions/{}/providers/microsoft.billing/billingperiods/{}/providers/microsoft.consumption/marketplaces 2018-01-31 -->
1010
<!-- mgmt-plane /subscriptions/{}/providers/microsoft.consumption/marketplaces 2018-01-31 -->
11+
12+
### [2024-08-01](/Resources/mgmt-plane/L3tzY29wZX0vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9tYXJrZXRwbGFjZXM=/2024-08-01.xml) **Stable**
13+
14+
<!-- mgmt-plane /{scope}/providers/microsoft.consumption/marketplaces 2024-08-01 -->
15+
16+
#### examples
17+
18+
- List marketplaces for a subscription
19+
```bash
20+
consumption marketplace list --scope subscriptions/00000000-0000-0000-0000-000000000000
21+
```
22+
23+
- List marketplaces for a billing account
24+
```bash
25+
consumption marketplace list --scope providers/Microsoft.Billing/billingAccounts/123456
26+
```
27+
28+
- List marketplaces for a management group
29+
```bash
30+
consumption marketplace list --scope providers/Microsoft.Management/managementGroups/MyMgmtGroup
31+
```

Commands/consumption/marketplace/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Inspect the marketplace usage data of an Azure subscription within a billing per
55
## Commands
66

77
- [list](/Commands/consumption/marketplace/_list.md)
8-
: List the marketplace for an Azure subscription within a billing period.
8+
: List the marketplaces for a scope at the defined scope. Marketplaces are available via this API only for May 1, 2014 or later.
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
# [Command] _consumption pricesheet show_
22

3-
Show the price sheet for an Azure subscription within a billing period.
3+
Get the price sheet for a subscription. Price sheet is available via this API only for May 1, 2014 or later.
44

55
## Versions
66

77
### [2018-01-31](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5iaWxsaW5nL2JpbGxpbmdwZXJpb2RzL3t9L3Byb3ZpZGVycy9taWNyb3NvZnQuY29uc3VtcHRpb24vcHJpY2VzaGVldHMvZGVmYXVsdA==/2018-01-31.xml) **Preview**
88

99
<!-- mgmt-plane /subscriptions/{}/providers/microsoft.billing/billingperiods/{}/providers/microsoft.consumption/pricesheets/default 2018-01-31 -->
1010
<!-- mgmt-plane /subscriptions/{}/providers/microsoft.consumption/pricesheets/default 2018-01-31 -->
11+
12+
### [2024-08-01](/Resources/mgmt-plane/L3N1YnNjcmlwdGlvbnMve30vcHJvdmlkZXJzL21pY3Jvc29mdC5jb25zdW1wdGlvbi9wcmljZXNoZWV0cy9kZWZhdWx0/2024-08-01.xml) **Stable**
13+
14+
<!-- mgmt-plane /subscriptions/{}/providers/microsoft.consumption/pricesheets/default 2024-08-01 -->
15+
16+
#### examples
17+
18+
- PriceSheet
19+
```bash
20+
consumption pricesheet show
21+
```
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# [Group] _consumption pricesheet default_
2+
3+
Manage Default

0 commit comments

Comments
 (0)