Skip to content

Getting VM Sizes with Their Costs #8637

Closed
@aytekinar

Description

I have the following environment:

~> pip list | grep azure
azure-cli-core         2.0.76   
azure-cli-nspkg        3.0.4    
azure-cli-telemetry    1.0.4    
azure-common           1.1.23   
azure-mgmt-compute     9.0.0    
azure-mgmt-monitor     0.7.0    
azure-mgmt-resource    4.0.0    
azure-nspkg            3.0.2    
msrestazure            0.6.2    

When I try to use list from ComputeManagementClient.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.list expects location as the first parameter whereas resource_skus.list expects filter). I have two problems:

  1. How can I use the new API to fetch the sizes in a given location? The new API returns an iterable with objects having a locations field that expects/spits out a list of strings, but I could not get the new API to work using filter.
  2. The new API's returned objects have their costs field set to None. Is there any way to get the costs (also related to VM size should contain pricing information. azure-cli#7356)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

ComputeCompute - VMMgmtThis issue is related to a management-plane library.Service AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions