Azure / Azure/azure-powershell

Add Support for Azure Retail Prices API

Open
#14,596 8 comments 0 reactions 1 assignee Claimed by @dcaro View on GitHub
act-codegen-extensibility-squad Cost Management - Billing customer-reported feature-request Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

## Support for Azure Retail Prices API

Microsoft recently announced the creation of an API to provide retail pricing information:

[Azure Retail Prices overview](https://docs.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices)

It would be very useful to have PowerShell programmatic support for this API so we don't need to all independently implement our own REST queries directly into the API.

## Proposed implementation details

Since pricing is a common feature to many different resources, as support is added it seems sensible to add new pricing-based cmdlets to the appropriate modules.

It would also be useful to get pricing for "related resources" but this starts a slippery slope of what qualifies as "related" (e.g. VMs have related storage by way of attached managed disks.)

### Example VM retail pricing query

`Get-AzVMCost`: Would take any of the usual methods of specifying a VM and provide the appropriate cost for that VM. Would default to the non-Windows non-Spot pay-as-you-go VM price. Cmdlet parameters would allow for including Windows in the pricing query, spot instances, or reserved instances based.

Other examples:

* `Get-AzVMCost -Reserved 1`: 1 year reserved price
* `Get-AzVMCost -Reserved 3`: 3 year reserved price
* `Get-AzVMCost -Spot`: current spot price

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.