I wish to use the Azure Pricing REST API. It lists several fields:
Filters are supported for the following fields:
armRegionName, Location, meterId, meterName, productid, skuId, productName, skuName,
serviceName, serviceId, serviceFamily, priceType, armSkuName
Where do I find information about what these fields mean?
Is there a way to find the productName, skuName, etc. of a virtual machine that I have created on Azure?
Where do I find information about what these fields mean?
The Azure Retail Prices overview has a description of all the fields.
Is there a way to find the productName, skuName, etc. of a virtual machine that I have created on Azure?
Locate the VM in the Azure portal and check Overview > Size. The size, e.g. Standard D2s v3, corresponds with the (arm)SkuName property returned by the API. Note that the portal doesn't include all the details, so you could try Azure CLI, e.g. az resource show -g MyResourceGroup -n MyVm --resource-type "Microsoft.Compute/virtualMachines", to display more details of the specified resource.
What are you trying to accomplish?
From my best guess:
armRegionName - thats a id of region that you will use in ARM templates and Azure APis.
Location - thats a human readable name of region
meterId - Thats an id of how it will show up in your or consumption reports
meterName - same as above but human readable
productid - As I understand thats service + license. VM + Windows or + MSSQL
productName - same as above
skuId: Thats I believe and ID from Microsoft's license or contract entities
skuName: same as above
serviceId: Id of sub group of Service Family
serviceName: just a sub group of Service Family: Virtual Machines and etc
serviceFamily: just a group of services like Compute, Storage and etc
priceType - same as Type with values: DevTestConsumption, Reservation, Consumption
armSkuName - thats VM id that you will see in ARM templates or should use in Azure API calls.
Related
I want to create an Azure Policy for storage accounts. During the creation of a storage account, it will count the number of storage accounts in the subscription which has a specific tag (like env:dev). If the number of this count exceeds 10, It should deny the creation of that storage account.
How I can count the number of storage account which has certain tag inside an Azure Policy declaration?
That is not something you can do using Azure Policy.
Even though the approach seems valid, the count operator is meant to be used with [*] aliases - see official documentation. One could think of scanning Microsoft.Subscription aliases, but running the command az provider show --namespace Microsoft.Subscription --expand "resourceTypes/aliases" --query "resourceTypes[].aliases[].name", what you get as an output is so far not extensive :
[
"Microsoft.Subscription/SubscriptionDefinitions/subscriptionId",
"Microsoft.Subscription/SubscriptionDefinitions/subscriptionDisplayName",
"Microsoft.Subscription/SubscriptionDefinitions/offerType",
"Microsoft.Subscription/SubscriptionDefinitions/etag",
"Microsoft.Subscription/aliases/subscriptionId"
]
Also, the way the policy engine works wouldn't allow you to count the number of instances meeting a particular rule : each ARM component is scanned individually and compared to the rules defined in the policy. You cannot see "all Storage Accounts in a given scope" - each one is scanned without the whole picture being seen at any point. That is why I started with looking if the Subscription object had something like a Resources [*] alias.
I am working on building out a report that will help team members make decisions on VM types for Azure deployments. One of the data points I'm being asked to provide is the "Expected network bandwidth" for each type. (See this link for an example of the metric)
In the Virtual Machine Sizes REST API, there is no mention of expected network bandwidth. Where can I get that information? Is there another API that I can hit to get more detailed information about virtual machine SKUs?
The information that is returned from that API looks like this:
{
"name": "Standard_B1ls",
"numberOfCores": 1,
"osDiskSizeInMB": 1047552,
"resourceDiskSizeInMB": 4096,
"memoryInMB": 512,
"maxDataDiskCount": 2
}
You can use resource sku list rest api to get more details on the sku .
GET https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/skus?api-version=2019-04-01
I tested the above and I could see more details like IOPS and No. of Nic's etc , but there is no expected network bandwidth.
I tried to check with az cli as well , but it seems its not possible to get expected bandwidth from anywhere.
az vm list-skus -l eastus2 --size Standard_A1_v2
Reference:
Resource Skus - List - REST API (Azure Compute) | Microsoft Docs
az vm | Microsoft Docs
I have a sponsored Azure subscription thanks to our partnership with Microsoft.
I have the ability to export usage from a dedicated web Site (Azure SponsorShip).
Unfortunately in the CSV file I received, I have only ResourceGUID and not ResourceId... And I don't know how to match these Ids.
Any ideas to find the Id related to a Resource Guid?
Thanks.
Resource GUID is different which denotes the Deployment GUID of the service. To get the breakdown of which resources are actually contributing towards the costs.
If you refer to the page Understand your bill for Microsoft Azure, you can see the description for the "Resource GUID" property:
The billed meter identifier. This is used as the identifier used to
price billing usage.
If you'd like to manually know the resource name which you are being billed for you can log into the Azure Account Center, click "Billing History" and download the usage details for the current period. This information is being updated daily, and you even get usage information with a daily breakdown
Here is the link for the resources of template format for the creation of azure automation account.
what is sku , sku.family and sku.capacity for automation account?
https://learn.microsoft.com/en-us/azure/templates/microsoft.automation/automationaccounts/jobschedules
Normally we can create the azure automation without sku.family and sku.capacity properties.But what are the possible values that can be passed to these resources for creation of arm template.
What could be the sku.family and its corresponding sku.capacity that can be passed????
What is the use of sku.family and sku.capacity in general for azure Resources ???
As you mentioned that link, we can find Sku object as pic.
Also we can get information about an automation account ,For a Free Sku, there is a response as below:
"properties":{
"sku":{
"name":"Free",
"family":null,
"capacity":null
},
Moreover, you can get more details from this relevant schema for Automation
https://raw.githubusercontent.com/Azure/azure-resource-manager-schemas/master/schemas/2015-10-31/Microsoft.Automation.json
Hope this helps.
In Azure Automation, SKU-Family and SKU-Capacity are unrequired and are more or less placeholders - "null" accepted.
SKu-name is the only required property of type "SKuNameEnum" with 2 possible values: "Basic" & "Free"
Here are 2 sample responses showing all 3 SKU object properties and you will notice family & capacity are both "null"
For your reference, there's a public facing API Browser page (in preview) that enumerates all supported REST APIs including API properties, description, usage and response samples. Simply enter the Azure service you would like to explore in the dropdown and drill through the listed APIs. In most cases, It includes a "Tryit" workflow to test the API call.
Hope this helps.
I downloaded AutoScale from
http://blog.maartenballiauw.be/post/2011/03/21/Windows-Azure-and-scaling-how-(NET).aspx
and followed the instructions there.
I added it as reference to my existing azure project. But I am not sure what exactly I should pass as the user defined parameters for the 6 parameters required for auto scale.
I want to only change the instance count of my worker role depending on the number of documents to be processed.
Those parameters are all from the management API and the Silverlight Management UI
There are several more samples/tools for the Management API available - e.g. http://archive.msdn.microsoft.com/azurecmdlets/Wiki/View.aspx?title=Getting%20Started&version=1
There's also a commercial third party service available to assist - see paraleap.com
Maarten's tool has parameters:
Console.WriteLine(" AutoScale.exe <certificatefile> <subscriptionid> <servicename> <rolename> <slot> <instancecount>");
To generate the certificate file, see the instructions from that cmdlet article or see the instructions in http://blogs.msdn.com/b/avkashchauhan/archive/2010/12/30/handling-issue-csmanage-cannot-establish-secure-connection-to-management-core-windows-net.aspx
The subscription ID is available via the silverlight azure management UI
the ServiceName and RoleName are what you choose when you create the service in the UI and when you create the role in code
the Slot is "Production" or "Staging"
the instanceCount is how many instances you want to run