azure-management-api

Programmatically getting the list of azure virtual machine sizes

允我心安 提交于 2021-02-19 03:07:55
问题 I am new to Azure management libraries for .net. How can we enumerate VM instance sizes available with respect to subscription or in general using Azure Management libraries for .Net or Rest APIs? Please suggest. 回答1: You can get a list of VM sizes for a region by calling https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/{location}/vmSizes?api-version={api-version} As documented here - List all available virtual machine sizes in a region There

Programmatically getting the list of azure virtual machine sizes

痞子三分冷 提交于 2021-02-19 03:07:28
问题 I am new to Azure management libraries for .net. How can we enumerate VM instance sizes available with respect to subscription or in general using Azure Management libraries for .Net or Rest APIs? Please suggest. 回答1: You can get a list of VM sizes for a region by calling https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/{location}/vmSizes?api-version={api-version} As documented here - List all available virtual machine sizes in a region There

401 unauthorized Azure management api

戏子无情 提交于 2021-02-08 10:21:17
问题 I'm calling azure management api to get the list of instances in a Cloud Service. The following code works when fiddler is active and constantly returns 401 unauthorized when it's not going through fiddler. I'm unable to determine the reason. Without Fiddler, the token is correctly returned, therefore, I don't understand why I'm getting an unauthorized. private HostedService GetCloudServiceProperties(string serviceName) { if (_client == null) { GetClient(); } string serviceProperties = string

Azure API Management vs Logic Apps

久未见 提交于 2020-03-03 11:43:46
问题 New to Azure and would like to know what the difference between Azure API Management and Logic Apps is. Some pros and cons would be nice. Also what the costing for each of these is like. Thanks 回答1: Seems you want to know about Azure API Management and Azure Logic Apps Well let me help you what that actually are... Azure API Management Azure API Management allows organizations to publish APIs more securely, reliably, and at scale. Use API Management to drive API consumption among internal

How to access all tenants and subscriptions with a single login in Azure Management SDK

你。 提交于 2020-01-25 06:48:13
问题 I'm trying to use https://github.com/Azure/azure-libraries-for-net for authentication to Azure from a command-line application. My goal is to list all storage accounts in all tenants and all subscriptions using fluent libraries with no success. FromDevice method is actually working well, if I use common as tenant ID: AzureCredentials credentials = SdkContext.AzureCredentialsFactory.FromDevice( AzureCliClientId, "common", AzureEnvironment.AzureGlobalCloud, code => { Console.WriteLine(code

An api to get azure disk filtered according to the Sku tier

岁酱吖の 提交于 2020-01-25 05:04:21
问题 Can anyone suggest a REST API to fetch all the disks in a subscription according to the disk tier( eg- ultra,standard) and return a list of disks having the same tier. 回答1: As far as I know, there is no such API that could retrieve disks by disk tier(SKU) directly . You should filter the result yourself. If you are using .net , use Azure management SDK will be a way that much easier to get the result you need than using REST API. I write a simple console app for you, try the code below :

Azure API failed to authenticate the request

我只是一个虾纸丫 提交于 2020-01-16 01:05:20
问题 I am using the next code to get the token for Azure AD authentication errorMessage = ""; AuthenticationResult result = null; var context = new AuthenticationContext(String.Format(CultureInfo.InvariantCulture, ConfigurationManager.AppSettings["login"], ConfigurationManager.AppSettings["tenantId"]),false); ClientCredential clientCredential = new ClientCredential(ConfigurationManager.AppSettings["clientId"], ConfigurationManager.AppSettings["key"]); try { result = context.AcquireToken

Is there a Nuget package to create Azure Function Apps?

£可爱£侵袭症+ 提交于 2019-12-25 04:12:23
问题 I need to create multiple Azure Function apps in different geographic locations over and over, so I need to automate this. Doing this in the Portal isn't going to scale. I thought there would be a Nuget package for doing this, but I haven't found it yet. Any ideas on how to automate the creation of Azure Function Apps? 回答1: There isn't an Azure Functions specific NuGet package or API. Functions works with the standard Azure Resource Manager APIs (consistent with the way you manage other Azure