question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if youā€™re still stuck at the end, weā€™re happy to hop on a call to see how we can help out.

Is there a way to enable AHUB on a SqlVirtualMachine using .NET SDK?

See original GitHub issue

I have an azure function that enables AHUB on regular Virtual Machines. However , now i need to apply this to SqlVirtualMachines but i donā€™t see any Library to manage SqlVirtualMachines in the API Reference nor any example of how to work with SqlVirtualMachines using .Net SDK.

Iā€™m currently using fluent libraries to manage Virtual Machines Microsoft.Azure.Management.Fluent(1.33.0) .Net Core Microsoft Visual Studio Enterprise 2019 Version 16.5.3

Azure.IAuthenticated authenticatedClient = Azure.Authenticate(restClient, tenantId);
JObject eventJson = JObject.Parse(myQueueItem);
string subscriptionId = Convert.ToString(eventJson["data"]["subscriptionId"]);
string virtualMachineResourceId = Convert.ToString(eventJson["data"]["resourceUri"]);
IAzure environment = authenticatedClient.WithSubscription(subscriptionId);               
// Get the virtual machine
IVirtualMachine virtualMachine = environment.VirtualMachines.GetById(virtualMachineResourceId);
virtualMachine.Update().WithLicenseType("Windows_Server");
virtualMachine.Update().Apply();

Is there a way to do this but with SqlVirtualMachines?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
weidongxu-microsoftcommented, May 11, 2020

@mirandavj Fluent .NET SDK does not support SqlVirtualMachine. https://github.com/Azure/azure-rest-api-specs/tree/master/specification/sqlvirtualmachine/resource-manager

@isra-fel Do you know other .NET SDK support it?

0reactions
isra-felcommented, May 25, 2020

Thanks for pointing that out Vinicio! Iā€™ve opened #12274 to our SQL VM team about the missing doc. You can track the progress there if interested. šŸ˜

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure Hybrid Benefit for SQL Server on Azure Virtual ...
Today, we are revealing a new, simple way to activate SQL Server AHB on Azure VM with SQL VM Resource Provider. SQL VM...
Read more >
Sql Virtual Machines - Get - REST API (Azure SQL VM)
You can obtain this value from the Azure Resource Manager API or the portal. sqlVirtualMachineName. path, True. string. Name of the SQL virtual...
Read more >
Audit and Enable Azure Hybrid Benefit using Azure Policy
Azure Hybrid Benefit can significantly reduce your IaaS costs in Azure by utilizing your existing software licenses. However, how do youĀ ...
Read more >
How to Enable Azure Hybrid Benefit for Windows ... - YouTube
Azure is the most cost-effective cloud destination for your Windows Server VMs with savings up to 80 percent. Learn how to use Azure...
Read more >
Introducing Microsoft SQL Server 2019
Boston-based Cloud and Data Center and Data Plaform Dual MVP Allan Hirt has been working with SQL Server since 1992 and clustering in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found