azure-docs-sdk-java/docs-ref-services/preview/app-service.md

2.3 KiB

title description keywords ms.date ms.topic ms.devlang ms.service manager
Azure App Service libraries for Java Automat deployment of web apps on Azure App Service using the Azure management APIs. Azure, Java, SDK, API, web apps , mobile , App Service 07/09/2017 reference java appservice douge

Azure App Service libraries for Java

Overview

Deploy and manage websites, web applications, and REST APIs with Azure App Service.

To get started with Azure App Service, see Create your first Java web app in Azure.

Management API

Deploy, scale, and configure applications in Azure App Service with the management API.

Add a dependency to your Maven pom.xml file to use the management API in your project.

<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-mgmt-appservice</artifactId>
    <version>1.3.0</version>
</dependency>

[!div class="nextstepaction"] Explore the Management APIs

Example

Deploy a webapp from a Docker image into an Azure Web App running on Linux.

WebApp app = azure.webApps().define("newLinuxWebApp")
    .withExistingLinuxPlan(myLinuxAppServicePlan)
    .withExistingResourceGroup("myResourceGroup")
    .withPrivateDockerHubImage("username/my-java-app")
    .withCredentials("dockerHubUser","dockerHubPassword")
    .withAppSetting("PORT","8080").
    .create();

Samples

Deploy a web app from FTP or GitHub
Swap between app versions with deployment slots
Configure a custom domain
Scale a web app across multiple regions

Explore more sample Java code for Azure App Service you can use in your apps.