How do I programmatically access the Azure Management Service "operations log"? - azure

Whenever an active operation is issued via Azure Management Service (previously known as Management API) such as creating a new deployment of a cloud service or scaling it up (using "update deployment" operation) two entries appear in the "operations log" in Azure Management Portal. One entry is for operation being started and the other is for operation completing (successfully or not).
Can this log be accesses programmatically, perhaps via Management Service?

I believe what you're after is List Subscription Operations. REST API documentation for the same can be found here: https://msdn.microsoft.com/en-us/library/azure/gg715318.aspx.
I'm not 100% sure about it but if you were to use Azure Management Library, SubscriptionOperations class is the one that you would use. Source code for the same can be found here: https://github.com/Azure/azure-sdk-for-net/blob/master/src/ServiceManagement/Management/Management/Generated/ListSubscriptions/SubscriptionOperations.cs.

Related

Pass Azure connection to console app in Azure DevOps pipeline

I have a custom console application that needs access to some Azure services (KeyVault, VM management, etc.).
I need to call this console app within a task in an Azure DevOps pipeline.
How can I pass an Azure service connection and use it from the application?
I thought that some information should be accessible in an Azure PowerShell task, but I can't find enough reference.
You may need to create a service principle and access the your azure subscription with this service principle.
Please refer document here to create a service and assign it to a role with the right permission to access your subscription.
If you would like to create service principle with azure cli, please refer steps here
To use the service principle in your console app. You can refer to this example.
Check here for more information about Azure Rest api. For Azure .net sdk please refer here
Well, it would depend on whether the specific build/release task that you're using supports passing Service Connection as an argument. Looking at the Azure Powershell task reference, I can see that azureSubscription parameter is accepted as an input to the task, which should let you configure your subscription.
Hope this addresses your query!

Azure Analysis service deployment using Azure DevOps

I am working on Azure Analysis service directly from portal.azure.com. Instead i want AAS be save as some file in git repo and deployed is managed through Azure DevOps. Not sure if this possible? How to proceed further on this
Currently, Azure Analysis Service don’t support implementing using Azure Devops.
I would request you to provide the feedback here:
https://feedback.azure.com/forums/556165-azure-analysis-services
All of the feedback you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure.
You could have a script task make a REST call to Azure from Azure DevOps, building the URL and payload from code, say passing in parameters, or by utilising a variable group.

Does Azure Cloud Service Publishing Profile Exists?

I need to assign publish permission to one of my developers so that he should be able to publish to only one cloud service & do not affect others.
Azure websites have these concepts called download publishing profile.
I could not find anything similar for cloud service. Can it be
achieved?
As you know Azure Management Portal does not have any role defined where we could map a user account login to manage a set of resources (say cloud service 1 & 2)
It is not possible as of today. It seems that it should be possible with Resource Groups and Role Based Access Control (RBAC) however currently cloud services can't be added in resource groups and assigned RBAC.
One way you could achieve this is have a custom application consuming Service Management API and implement your own RBAC in that application. However it is still a "hack" and not proper solution.
Why don't you try using "publish from source control"? When the developer checks in it will auto publish the code.
I believe the new portal will allow the creation of roles for publishing profiles; it already allows adding additional users to your organization; but to get what you want for now; publishing from source code should do the trick.

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.

How can I allow other users to deploy to my Azure cloud services?

I created an empty Azure cloud service and I want to allow other developers to deploy to it. So far the only route I can see is adding the developers as Azure subscription administrators. I would rather give them more specific access to the cloud services only.
No such functionality exist today which will allow you to grant/revoke permissions at the cloud service level. Once a developer is provided access to the subscription, they would have access to all the resources under that subscription.
There's a REST API behind cloud service deployments and all the tools (including Windows Azure Portal and Visual Studio) consume this API for creating deployments. One possible solution would be to build your own solution consuming this API. In this solution you will implement access control based on your requirements so that when your user use this service, they will only see the cloud service they're assigned to and can only manage that cloud service. There's a managed library for consuming this API. You can find more information here: http://www.bradygaster.com/post/getting-started-with-the-windows-azure-management-libraries.
It seems that if the original developer downloads the publish profile from Azure (it's an xml file that with a .PublishSettings extension), you can copy the userPWD from that file, give it to another developer and they can paste it into the password field in the Connection section of the Publish dialog.
The userPWD is a string that looks something like this:
EFFCLfDqDKHlXcA2YDZPvX4BZXWFaobxaLN0aPJd4HCfa8WxlqEkt2yywBsx

Resources