Advertisement
Guest User

Untitled

a guest
Jun 7th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. String userName = "<user-name>";
  2. String password = "<password>";
  3. String resourceGroupName = "<resource-group-name>";
  4. String name = "<webapp-name>";
  5.  
  6. ServiceClientCredentials credentials = new BasicAuthenticationCredentials(userName, password);
  7. WebSiteManagementClient webSiteManagementClient = new WebSiteManagementClientImpl(credentials);
  8. HostingEnvironmentsOperations hostingEnvironmentsOperations = webSiteManagementClient.getHostingEnvironmentsOperations();
  9. ServiceResponse<AddressResponse> serviceResponse = hostingEnvironmentsOperations.getHostingEnvironmentVips(resourceGroupName, name);
  10.  
  11. AddressResponse addressResponse = (AddressResponse) serviceResponse.getBody();
  12. String internalIp = addressResponse.getInternalIpAddress();
  13.  
  14. <dependency>
  15. <groupId>com.microsoft.azure</groupId>
  16. <artifactId>azure-svc-mgmt-websites</artifactId>
  17. <version>0.9.2</version>
  18. </dependency>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement