Repository navigation
Getting VM Sizes with Their Costs #8637
Description
Activity
- addedcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.MgmtThis issue is related to a management-plane library.This issue is related to a management-plane library.Service AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.
on Nov 14, 2019 For #1, please use the following example for getting the SKUs list for a specific region using the filter mechanism: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/Microsoft.Compute/stable/2019-04-01/examples/ListAvailableResourceSkusForARegion.json
For #2, the end-to-end cost support is not available yet. This section is reserved for future use, but we do not have an ETA for when it will be available. The mechanism to get pricing for the SKU is not consistent across the various channels in which Azure can be purchased, and that consistency needs to be in place before we can connect to this consistent pricing system via the SKUs API.
Please let me know if this answers your questions.
Closing this now due to no other questions.
Has cost api's ever been implemented?
The cost API is available, but it is not directly integrated into the SKUs API. The primary issue is that there are multiple price points for each ARM VM SKU. Here is a summary of the retail pricing API: https://learn.microsoft.com/en-us/rest/api/cost-management/retail-prices/azure-retail-prices.
An example of a query for D64s_v5 in West US excluding reservations would be:
https://prices.azure.com/api/retail/prices?$filter=serviceName eq 'Virtual Machines' and armRegionName eq 'westus2' and armSkuName eq 'Standard_D64s_v5' and unitOfMeasure eq '1 Hour'- locked and limited conversation to collaborators
on Jun 15, 2023
I have the following environment:
When I try to use
listfromComputeManagementClient.virtual_machine_sizes, I see in the doctring that the method is deprecated and I should use "Resources Skus" instead, pointing to its REST API.When I change the command to
ComputeManagement.resource_skus.list, I see that its signature is different (i.e.,virtual_machine_sizes.listexpectslocationas the first parameter whereasresource_skus.listexpectsfilter). I have two problems:location? The new API returns an iterable with objects having alocationsfield that expects/spits out a list of strings, but I could not get the new API to work usingfilter.costsfield set toNone. Is there any way to get the costs (also related to VM size should contain pricing information. azure-cli#7356)?