We have a requirement to register the name of the cloud service in which the web role is deployed.We get the role identifier and role name from the RoleEnvironment class in the Azure ServiceRuntime library. But do not find the name of the cloud service.
You cannot find this information with the class RoleEnvironment. For this you need to use Service Management API. Basically, this is an attempt to get the deployment identifier from the class RoleEnvironment, and then call the Service Management API operations for
RoleEnvironment
Service Management API
.
API Service Management, Azure Management Library REST-. , REST API: http://gauravmantri.com/2012/03/16/programmatically-finding-deployment-slot-from-code-running-in-windows-azure/.
Azure Management Library
Source: https://habr.com/ru/post/1546777/More articles:HashMap does not call Object.equals? - javaRadio button in tag label in laravel blade - phpQObject instance pool - c ++How to check dropdown list in Laravel PHP? - phpcreating a new terminal and recording it in the stadium - cТранзакция внутри функции plpgsql - plpgsqlWPF property SelectedItem in nested DataGrid in UserControl - wpfWPF UserControl - SelectedItem Usercontrol DataGrid for binding to ItemSource for DataGrid outside UserControl - c #Vim C ++ (Qt, C) developing powerful plugins - c ++Qt Screenshot Application - How to select a screen area - qtAll Articles