How to Upgrade/Downgrade Azure Database Programmatically - azure

I'm wanting to upgrade or downgrade an Azure Database programmatically. Effectively, I'm wanting to increase or decrease the DTUs.
Azure CLI has az sql db update which is able to be used.
Azure REST API has documentation for this.
Azure SDK for .NET ???
I can't seem to find anything for Azure SDK for .NET. I've looked through all the documentation but must be missing it.
Can anyone give me any examples of how this is done with Azure SDK for .NET?

Related

How to create Azure Search Index using Azure CLI?

I am unable to find a way to use Azure CLI to create Azure Search index, I was able to create Azure Search service though.
Does any one know if there is way to create Azure Search Index using Azure CLI.
Data operations, including the management of indexes, are not currently (as of June 2021) exposed through the control plane command-line interface. Once you have a service provisioned, you can use the REST APIs exposed by that service to manage indexes, ingest data, and process queries. There are examples of calling the REST APIs from PowerShell here. You can also use the Azure SDK client libraries for .NET, JavaScript, Python, or Java.

Is it possible to create a new Azure Search Service with Azure Search SDK?

I am writing a admin back end to manage our Azure search stuff and I was wondering if there is a way to use Azure Search SDK to create a new Azure Search Service on Azure portal? I don't see anything in the examples on the official Azure search site.
It is possible to programmatically create Azure Search services in a few different ways:
Azure Search Management SDK
.NET
.NET (fluent)
Python
Ruby
Java (fluent)
Go
PowerShell
Management REST API
Azure Resource Manager Templates (example)
Documentation coverage for these is somewhat patchy currently. There are samples for the REST API and .NET Fluent SDK and reference documentation for some of the above.
No, you can't use Azure Search SDK to create a new Search Service. This SDK is to manage data in an existing Search Service.
To create a Search Service programmatically, you will need to use Azure Search Management library. You can read more about this here: https://learn.microsoft.com/en-us/dotnet/api/overview/azure/search?view=azure-dotnet#management-library.

Is there a Nuget package to create Azure Function Apps?

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?
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 services) and new Function Apps can be provisioned using PowerShell, the Azure CLI, the ARM API or directly through the portal.
Under the "Get Started" section of the documentation I've linked to, you can find more information on how to create and manage templates.
I hope this helps!
As far as I know, there is no Nuget Package for you to do this. Per my understanding, you could leverage ARM template to create your Azure Function App.
You could try to follow the issue & code sample on GitHub about deploying Azure Function Apps with ARM to create the Azure Function App in multiple geographic locations as expected.
Also, you could follow this tutorial about deploying your resources to Azure with Resource Manager templates via Azure Power Shell.

Is Azure Management Library deprecated in favor of Azure Resource Manager?

For Azure automation we used Management Libraries in order to provision Cloud Services & BLOB Storage along with SQL Database. This seem to be no longer maintained. Shall we stop using this in production?
Need to provision:
Azure Web APP
SQL Database
BLOB
Azure Search Index
Any authoritative information on the recommended approach now, would be much helpful. Thanks.
As you may already know Azure Management Library is a wrapper over Azure Service Management API (ASM) which provided a REST based interface to manage the underlying infrastructure. Old Azure Portal (https://management.azure.com) makes use of ASM API.
Azure Resource Manager API (ARM) is the new REST based intefface to manage underlying infrastructure. ARM is more robust, feature rich and will be used going forward. New Azure Portal (https://portal.azure.com) makes use of ARM API.
Eventually old portal will be removed and you should be able to do all the things on the new portal. When that will happen is not generally known (someone from Azure product team will be able to comment on that). Until then, both ASM and ARM will be supported and after that ASM will be removed (or not supported).
General recommendation would be to start using ARM API wherever possible. Only use ASM API for the features that have not been ported to ARM API. You mentioned that you are using Azure Web APP, SQL Database, BLOB, and Azure Search Index. To the best of my knowledge, all of these are supported in ARM so the recommendation would be to use that instead of ASM. In fact, I think Azure Search is only supported via ARM and not ASM.
I can't find any information on which the currently advised library to use is.
However, a few weeks ago Simpler Azure Management Libraries for .NET was released into preview. It might be worth checking it out and keeping an eye on it for the future.
At the moment it seems only capable of managing Azure Virtual Machines, Virtual Machine Scale Sets, Storage, Networking, Resource Manager, Key Vault and Batch. However, since this is a preview, MS is asking developers to provide feedback and what they would like to see support next.

Has Any one tried in Deploying the package programatically in Azure

Has Any one tried implementing deployment of Azure CSPKG deployment programmatically using Service Management REST API. Please share with me any guideline or website which explain me clearly. Especially I Want my Web ROle to deploy the Worker ROle where package is in Azure blob storage.
Check out this article by Neil Mackenzie. This covers working with the REST API to perform deployments. Also, you could check out the code that is used under the hood by the Windows Azure PowerShell cmdlets by looking in the code on GitHub.

Resources