How to create Azure Search Index using Azure CLI? - azure

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.

Related

How to get the keys of Azure Bing Maps API for Enterprise using Powershell?

I have seen that two keys generated for an Azure Bing Maps API. I want to retrieve those two keys using Powershell. Do we have any commands to get this to be done.
I don't think there is any way to do that with the Bing Maps accounts via Azure Marketplace. Since you are using Azure, you might want to take a look at Azure Maps. It is a native Azure service and supports ARM templates and all the other standard Azure admin type services.
https://azure.com/maps
https://learn.microsoft.com/en-us/azure/azure-maps/
https://azuremapscodesamples.azurewebsites.net/index.html

How do I authenticate against Azure (subscription) from an external program

I am trying to develop a web application using which I want to be able to connect to my Azure subscription, read all my resources and display those back on my app. I only need the name, IP and resource type. I know I can authenticate against Azure using PowerShell but not quite sure how I achieve this using PHP.
Most Azure service REST APIs have client libraries that provide a native interface for using Azure services.
.NET
Java
Node.js
Python
Azure CLI 2.0 SDK
We do not have a client library for PHP. I would recommend call the Azure REST API from PHP to accomplish the task you are looking at.
https://learn.microsoft.com/en-us/rest/api/azure/
Authentication is also discussed in the link above.

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 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.

Create Azure Management Site

Can we create a sites that can:
showing available VMs;
deallocate VMs;
show pings.
I prefer using Node, but other language is accepted.
Currently, I'm monitoring using azure-cli. But, I'm asked to create a more user friendly UI.
Most of the operations that you can perform on the azure portal can be done using azure management api and powershell azure commandlets.
Azure management API are REST based and hence can be consumed from any platform that supports http.
Sample to start and stop VM - http://code.msdn.microsoft.com/windowsapps/How-to-start-deallocated-c23b7cbe
Likewise you can write your own program to do the required management activities.

Resources