reconcile master branch with aug 1 release

This commit is contained in:
Robert Outlaw 2017-08-01 14:52:56 -07:00
Родитель 7191ae451a
Коммит c80a4b6224
34 изменённых файлов: 1172 добавлений и 477 удалений

Просмотреть файл

@ -0,0 +1,13 @@
| | |
|---------|---------|
| [Integrating Azure AD into a Java web application][1] | Set up OAuth2 authentication in a Java web app.
| [Calling the Azure AD Graph API in a web application][2] | Read directory data ane execute queries from the Azure AD Graph API |
| [Integrating Azure AD into a Java command line using username and password][3] | Obtain a JWT access token through OAuth 2.0, then use the access token to authenticate with a Azure AD protected web API. |
| [Manage users, groups, And roles with the Graph API][4] | Manage users, groups, roles, and service principals with the Graph API using the management API.
| [Manage Service Principals][5] | Create a service principal for an application, assign it a role, and use the service principal to access resources in the subscription |
[1]: https://azure.microsoft.com/resources/samples/active-directory-java-webapp-openidconnect/
[2]: https://azure.microsoft.com/resources/samples/active-directory-java-graphapi-web/
[3]: https://azure.microsoft.com/resources/samples/active-directory-java-native-headless/
[4]: https://azure.microsoft.com/resources/samples/aad-java-browse-graph-and-manage-roles/
[5]: https://azure.microsoft.com/resources/samples/aad-java-manage-service-principals/

Просмотреть файл

@ -0,0 +1,11 @@
| | |
|---------|---------|
| [Manage Azure Container Registries][1] | Create a new Azure Container registry and add an new image. |
| [Manage Azure Container Service][2] | Create an Azure Container Service with Kubernetes orchestration. |
| [Deploy an image from Azure Container Registry into a new Linux Web App][3] | Deploy a Docker image running Tomcat to a new web app running in Azure App Service for Linux. |
| [Deploy an image into Azure Container Service and Kubernetes][4] | Deploy a Docker image from Azure Container Registry into Azure Container Service with Kubernetes orchestration |
[1]: https://azure.microsoft.com/resources/samples/acr-java-manage-azure-container-registry/
[2]: https://azure.microsoft.com/resources/samples/acs-java-manage-azure-container-service/
[3]: hhttps://azure.microsoft.com/resources/samples/app-service-java-deploy-image-from-acr-to-linux/
[4]: https://azure.microsoft.com/resources/samples/aad-java-browse-graph-and-manage-roles/

Просмотреть файл

@ -0,0 +1,9 @@
[Configure Azure SQL Database with the management API][1]
[Deploy WordPress powered by SQL Database][4]
[Scale SQL Database across multiple Azure regions][2]
[Manage shared SQL database workloads with elastic pools][3]
[1]: https://github.com/Azure-Samples/sql-database-java-manage-db
[2]: https://github.com/Azure-Samples/sql-database-java-manage-sql-databases-across-regions
[3]: ../java-sdk-manage-sql-elastic-pools.md
[4]: https://github.com/Azure-Samples/app-service-java-manage-data-connections-for-web-apps

Просмотреть файл

@ -1,114 +0,0 @@
---
title: Azure for Java developers - Tutorials, API Reference | Microsoft Docs
description: Tools, SDKs, tutorials, and samples to help you create and deploy Java apps to Azure.
keywords: Azure, Java, SDK, API
author: rloutlaw
ms.author: routlaw
manager: douge
layout: LandingPage
ms.date: 06/13/2017
ms.topic: article
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: multiple
---
# Azure for Java developers
<ul class="cardsY panelContent">
<li>
<a href="java-azure-tools.md">
<div class="cardSize">
<div class="cardPadding">
<div class="card" style="height: 84px">
<div class="cardImageOuter" style="margin-top: 12px">
<div class="cardImage">
<img src="https://docs.microsoft.com/media/common/i_tools.svg" alt="" />
</div>
</div>
<div class="cardText">
<h3 style="margin-bottom: 0; font-size: 24px">Tools</h3>
<p style="font-size: 1rem">Download Azure tools and plug-ins</p>
</div>
</div>
</div>
</div>
</a>
</li>
<li>
<a href="java-sdk-azure-install.md">
<div class="cardSize">
<div class="cardPadding">
<div class="card" style="height: 84px">
<div class="cardImageOuter" style="margin-top: 12px">
<div class="cardImage">
<img src="https://docs.microsoft.com/media/common/i_reference.svg" alt="" />
</div>
</div>
<div class="cardText">
<h3 style="margin-bottom: 0; font-size: 24px">Libraries</h3>
<p style="font-size: 1rem">Use services and manage Azure resources</p>
</div>
</div>
</div>
</div>
</a>
</li>
<li>
<a href="/azure/virtual-machines/linux/tutorial-jenkins-github-docker-cicd">
<div class="cardSize">
<div class="cardPadding">
<div class="card" style="height: 84px">
<div class="cardImageOuter" style="margin-top: 12px">
<div class="cardImage">
<img src="https://docs.microsoft.com/media/common/i_deploy.svg" alt="" />
</div>
</div>
<div class="cardText">
<h3 style="margin-bottom: 0; font-size: 24px">Jenkins CI/CD</h3>
<p style="font-size: 1rem">Use Jenkins to deploy apps to Azure</p>
</div>
</div>
</div>
</div>
</a>
</li>
</ul>
## 5-Minute Quickstarts
Learn how to build Java apps with Azure services.
<ul class="noBullet">
<li><a href="https://docs.microsoft.com/azure/app-service-web/app-service-web-get-started-java">Deploy a Java webapp</a></li>
<li><a href="https://docs.microsoft.com/azure/sql-database/sql-database-connect-query-java">Connect to Azure SQL Database</a></li>
<li><a href="/azure/mysql/connect-java">Connect to Azure Database for MySQL</a></li>
<li><a href="/azure/postgresql/connect-java">Connect to Azure Database for PostgreSQL</a></li>
<li><a href="https://docs.microsoft.com/azure/cosmos-db/create-documentdb-java">Build a NoSQL app with CosmosDB</a></li>
</ul>
## Management APIs
Install our easy-to-use fluent [Java APIs](java-sdk-azure-install.md#management) to manage Azure resources.
```java
VirtualMachine linuxVM = azure.virtualMachines().define("myAzureVM")
.withRegion(region)
.withExistingResourceGroup("sampleResourceGroup")
.withNewPrimaryNetwork("10.0.0.0/28")
.withPrimaryPrivateIpAddressDynamic()
.withoutPrimaryPublicIpAddress()
.withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS)
.withRootUsername(userName)
.withSsh(key)
.create();
```
[Get started with the Azure management libraries for Java](java-sdk-azure-get-started.md)
## Step-by-Step Tutorials
Learn how to use Azure services in your Java apps.
<ul class="noBullet">
<li><a href="https://docs.microsoft.com/azure/app-service-web/app-service-web-tutorial-java-mysql">Create an web app with Spring Boot and MySQL</a></li>
</ul>

Просмотреть файл

@ -0,0 +1,77 @@
### YamlMime:YamlDocument
documentType: LandingData
title: Azure for Java developers
metadata:
document_id: 1152a217-eb0e-45e9-b01b-bd27080d615e
title: Azure for Java developers - Tutorials, API Reference
description: Get started developing apps with Azure using the resources below to find great tutorials and tools for Java developers.
keywords: Azure, Java, SDK, API, Maven, Spring
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 07/13/2017
ms.topic: article
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: multiple
sections:
- items:
- type: markdown
text: |
Get started developing apps with Azure using the resources below to find great tutorials and tools for Java developers.
- items:
- type: list
style: cards
className: cardsM
columns: 2
items:
- href: https://docs.microsoft.com/azure/app-service-web/app-service-web-get-started-java
html: <p>Deploy your first web app to Azure</p>
image:
src: https://docs.microsoft.com/media/common/i_get-started.svg
title: Get Started
- href: https://azure.microsoft.com/resources/samples/?platform=java&view=azure-java
html: <p>Azure code samples using Java</p>
image:
src: https://docs.microsoft.com/media/common/i_code-samples.svg
title: Code Samples
- href: java-azure-tools.md
html: <p>Developer tools</p>
image:
src: https://docs.microsoft.com/media/common/i_download-install.svg
title: SDK &amp; Tools
- href: java-sdk-azure-install.md
html: <p>Azure Libraries for Java</p>
image:
src: https://docs.microsoft.com/media/common/i_api-reference.svg
title: API Reference
- title: 5-Minute Quickstarts
items:
- type: paragraph
text: 'Learn how to build Java apps with Azure services.'
- type: list
style: cards
className: cardsM
columns: 3
items:
- image:
src: https://docs.microsoft.com/azure/media/index/app-service-web.svg
title: Deploy your first web app to Azure
href: https://docs.microsoft.com/azure/app-service-web/app-service-web-get-started-java
- image:
src: https://docs.microsoft.com/azure/media/index/MySQL.svg
title: Connect to Azure Database for MySQL
href: https://docs.microsoft.com/azure/mysql/connect-java
- image:
src: https://docs.microsoft.com/azure/media/index/cosmosdb.svg
title: Build a web app with Cosmos DB
href: https://docs.microsoft.com/azure/cosmos-db/create-documentdb-java
- title: Samples
items:
- type: list
style: unordered
items:
- html: <a href="https://github.com/Azure-Samples/mysql-spring-boot-todo">Create a web app with Spring Boot and MySQL</a>
- html: <a href="https://azure.microsoft.com/resources/samples/storage-blob-java-getting-started/">Azure Blob Storage with Java</a>
- html: <a href="https://azure.microsoft.com/resources/samples/azure-cosmos-db-mongodb-java-getting-started/">Connect to Azure Cosmos DB with the MongoDB API</a>

Просмотреть файл

@ -1,5 +1,5 @@
---
title: Azure tools for Java developers | Microsoft Docs
title: Tools for Azure Java developers | Microsoft Docs
description: IDE integrations, emulators, resource explorers, and command-line interfaces for Java developers working on Azure.
author: rloutlaw
manager: douge

Просмотреть файл

@ -0,0 +1,20 @@
---
title: Java samples for Azure Container Service
description: Get sample code for working with Azure Container Service from your Java apps.
keywords: Azure, Java, SDK, API, Kubernetes, containers, Docker, ACS, registry, images
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 07/31/2017
ms.topic: article
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: multiple
---
# Java samples for Azure Container Service
The following table links to Java source you can use to create and configure applications running in containers.
[!INCLUDE [java-container-samples](includes/java-container-samples.md)]

Просмотреть файл

@ -25,8 +25,6 @@ This guide walks you through setting up a development environment with an Azure
- [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (included in Azure Cloud Shell)
- [Maven 3](http://maven.apache.org/download.cgi) (included in Azure Cloud Shell)
[!INCLUDE [azure-cloud-shell](../docs-ref-conceptual/includes/azure-shell.md)]
## Set up authentication
Your Java application needs read and create permissions in your Azure subscription to run the sample code in this tutorial. Create a service principal and configure your application to run with its credentials. Service principals provide a way to create a non-interactive account associated with your identity to which you grant only the privileges your app needs to run.

Просмотреть файл

@ -45,7 +45,7 @@ Integrate Azure services to add functionality to your apps using these libraries
<a name="azure-storage"></a>
### [Azure Storage](https://docs.microsoft.com/azure/storage/storage-introduction)
### [Azure Storage](/azure/storage/storage-introduction)
Data storage and messaging for your applications.
@ -53,15 +53,15 @@ Data storage and messaging for your applications.
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage</artifactId>
<version>5.2.0</version>
<version>5.4.0</version>
</dependency>
```
[Samples](https://github.com/Azure/azure-storage-java/tree/master/microsoft-azure-storage-samples/src/com/microsoft/azure/storage) | [Reference](https://docs.microsoft.com/java/api/overview/azure/storage) | [GitHub](https://github.com/Azure/azure-storage-java) | [Release Notes](https://github.com/Azure/azure-storage-java/blob/master/ChangeLog.txt)
[Samples](https://github.com/Azure/azure-storage-java/tree/master/microsoft-azure-storage-samples/src/com/microsoft/azure/storage) | [Reference](/java/api/overview/azure/storage) | [GitHub](https://github.com/Azure/azure-storage-java) | [Release Notes](https://github.com/Azure/azure-storage-java/blob/master/ChangeLog.txt)
<a name="sql-database"></a>
### [SQL Database](https://docs.microsoft.com/azure/sql-database/sql-database-technical-overview)
### [SQL Database](/azure/sql-database/sql-database-technical-overview)
JDBC driver for Azure SQL Database.
@ -73,7 +73,7 @@ JDBC driver for Azure SQL Database.
</dependency>
```
[Samples](https://docs.microsoft.com/sql/connect/jdbc/step-3-proof-of-concept-connecting-to-sql-using-java) | [Reference](https://docs.microsoft.com/java/api/overview/azure/sql) | [GitHub](https://github.com/Microsoft/mssql-jdbc) | [Release Notes](https://github.com/Microsoft/mssql-jdbc/blob/master/CHANGELOG.md)
[Samples](/sql/connect/jdbc/step-3-proof-of-concept-connecting-to-sql-using-java) | [Reference](/java/api/overview/azure/sql) | [GitHub](https://github.com/Microsoft/mssql-jdbc) | [Release Notes](https://github.com/Microsoft/mssql-jdbc/blob/master/CHANGELOG.md)
<a name="redis-cache"></a>
@ -91,11 +91,11 @@ Low-latency, high-performance key-value store.
</dependency>
```
[Samples](https://docs.microsoft.com/azure/redis-cache/cache-java-get-started) | [Reference](http://xetorthio.github.io/jedis) | [GitHub](https://github.com/xetorthio/jedis) | [Release Notes](https://github.com/xetorthio/jedis/releases)
[Samples](/azure/redis-cache/cache-java-get-started) | [Reference](http://xetorthio.github.io/jedis) | [GitHub](https://github.com/xetorthio/jedis) | [Release Notes](https://github.com/xetorthio/jedis/releases)
<a name="documentdb"></a>
### [CosmosDB](https://docs.microsoft.com/azure/documentdb/documentdb-introduction)
### [Cosmos DB](/azure/documentdb/documentdb-introduction)
Scalable NoSQL database with JSON documents and a SQL or JavaScript query syntax.
@ -103,31 +103,31 @@ Scalable NoSQL database with JSON documents and a SQL or JavaScript query syntax
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-documentdb</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
</dependency>
```
[Samples](https://docs.microsoft.com/azure/documentdb/documentdb-java-application) | [Reference](http://azure.github.io/azure-documentdb-java/) | [GitHub](https://github.com/Azure/azure-documentdb-java) | [Release Notes](https://github.com/Azure/azure-documentdb-java/blob/master/changelog.md)
[Samples](/azure/documentdb/documentdb-java-application) | [Reference](http://azure.github.io/azure-documentdb-java/) | [GitHub](https://github.com/Azure/azure-documentdb-java) | [Release Notes](https://github.com/Azure/azure-documentdb-java/blob/master/changelog.md)
<a name="servicebus"></a>
### [Service Bus](https://docs.microsoft.com/azure/service-bus-messaging/service-bus-fundamentals-hybrid-solutions)
### [ServiceBus](/azure/service-bus-messaging/service-bus-messaging-overview)
Java Message Service (JMS) support through [AMQP](https://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol) to connect your applications.
Service Bus is an enterprise-class, transactional messaging platform service.
```XML
<dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>qpid-jms-client</artifactId>
<version>0.23.0</version>
</dependency>
```
```XML
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-servicebus</artifactId>
<version>1.0.0</version>
</dependency>
```
[Reference](http://docs.oracle.com/javaee/7/api/javax/jms/package-summary.html) | [Sample](https://github.com/apache/qpid-jms/tree/0.20.0/qpid-jms-examples) | [GitHub](https://github.com/apache/qpid-jms) | [Release Notes](https://qpid.apache.org/releases/index.html)
[Samples](https://github.com/Azure/azure-service-bus/tree/master/samples/Java) | [Reference](https://docs.microsoft.com/java/api/overview/azure/servicebus) | [GitHub](https://github.com/azure/azure-service-bus-java) | [Release Notes](https://github.com/Azure/azure-service-bus-java)
<a name="azuread"></a>
### [Azure Active Directory](https://docs.microsoft.com/azure/active-directory/active-directory-whatis)
### [Azure Active Directory](/azure/active-directory/active-directory-whatis)
Identity management and secure sign-in for your applications.
@ -139,11 +139,11 @@ Identity management and secure sign-in for your applications.
</dependency>
```
[Samples](https://github.com/Azure-Samples?utf8=%E2%9C%93&q=active%20directory%20&type=&language=java) | [Reference](https://docs.microsoft.com/java/api/overview/azure/activedirectory) | [GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-java) | [Release Notes](https://github.com/AzureAD/azure-activedirectory-library-for-javaT-)
[Samples](https://github.com/Azure-Samples?utf8=%E2%9C%93&q=active%20directory%20&type=&language=java) | [Reference](/java/api/overview/azure/activedirectory) | [GitHub](https://github.com/AzureAD/azure-activedirectory-library-for-java) | [Release Notes](https://github.com/AzureAD/azure-activedirectory-library-for-javaT-)
<a name="keyvault"></a>
### [Key Vault](https://docs.microsoft.com/azure/key-vault)
### [Key Vault](/azure/key-vault)
Safely access keys and secrets from your applications.
@ -155,11 +155,11 @@ Safely access keys and secrets from your applications.
</dependency>
```
[Samples](https://github.com/Azure-Samples/key-vault-java-manage-key-vaults) | [Reference](https://docs.microsoft.com/java/api/overview/azure/keyvault) | [GitHub](https://github.com/Azure/azure-keyvault-java) | [Release Notes](https://github.com/Azure/azure-keyvault-java)
[Samples](https://github.com/Azure-Samples/key-vault-java-manage-key-vaults) | [Reference](/java/api/overview/azure/keyvault) | [GitHub](https://github.com/Azure/azure-keyvault-java) | [Release Notes](https://github.com/Azure/azure-keyvault-java)
<a name="eventhub"></a>
### [Event Hub](https://docs.microsoft.com/azure/event-hubs/event-hubs-what-is-event-hubs)
### [Event Hub](/azure/event-hubs/event-hubs-what-is-event-hubs)
High-throughput event and telemetry handling for your instrumentation or IoT scenarios.
@ -167,15 +167,15 @@ High-throughput event and telemetry handling for your instrumentation or IoT sce
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-eventhubs</artifactId>
<version>0.14.0</version>
<version>0.14.4</version>
</dependency>
```
[Samples](https://github.com/Azure/azure-event-hubs/tree/master/samples#java) | [Reference](https://docs.microsoft.com/java/api/overview/azure/eventhub) | [GitHub](https://github.com/azure/azure-event-hubs-java) | [Release Notes](https://github.com/Azure/azure-event-hubs-java)
[Samples](https://github.com/Azure/azure-event-hubs/tree/master/samples#java) | [Reference](/java/api/overview/azure/eventhub) | [GitHub](https://github.com/azure/azure-event-hubs-java) | [Release Notes](https://github.com/Azure/azure-event-hubs-java)
<a name="iotservice"></a>
### [IoT Service](https://docs.microsoft.com/azure/iot-hub/)
### [IoT Service](/azure/iot-hub/)
Manage identities, send messages, and get feedback from devices registered with your IoT hub.
@ -183,15 +183,15 @@ Manage identities, send messages, and get feedback from devices registered with
<dependency>
<groupId>com.microsoft.azure.sdk.iot</groupId>
<artifactId>iot-service-client</artifactId>
<version>1.4.20</version>
<version>1.7.23</version>
</dependency>
```
[Samples](https://github.com/Azure/azure-iot-sdk-java/tree/master/service/iot-service-samples) | [Reference](https://docs.microsoft.com/java/api/overview/azure/iot) | [GitHub](https://github.com/Azure/azure-iot-sdk-java) | [Release Notes](https://github.com/Azure/azure-iot-sdk-java/blob/master/readme.md)
[Samples](https://github.com/Azure/azure-iot-sdk-java/tree/master/service/iot-service-samples) | [Reference](/java/api/overview/azure/iot) | [GitHub](https://github.com/Azure/azure-iot-sdk-java) | [Release Notes](https://github.com/Azure/azure-iot-sdk-java/blob/master/readme.md)
<a name="iotdevice"></a>
### [IoT Device](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide)
### [IoT Device](/azure/iot-hub/iot-hub-devguide)
Send a message to an IoT hub from your device.
@ -199,15 +199,15 @@ Send a message to an IoT hub from your device.
<dependency>
<groupId>com.microsoft.azure.sdk.iot</groupId>
<artifactId>iot-device-client</artifactId>
<version>1.1.27</version>
<version>1.3.32</version>
</dependency>
```
[Samples](https://github.com/Azure/azure-iot-sdk-java/tree/master/device/iot-device-samples) | [Reference](https://docs.microsoft.com/java/api/overview/azure/iot) | [GitHub](https://github.com/Azure/azure-iot-sdk-java) | [Release Notes](https://github.com/Azure/azure-iot-sdk-java/blob/master/readme.md)
[Samples](https://github.com/Azure/azure-iot-sdk-java/tree/master/device/iot-device-samples) | [Reference](/java/api/overview/azure/iot) | [GitHub](https://github.com/Azure/azure-iot-sdk-java) | [Release Notes](https://github.com/Azure/azure-iot-sdk-java/blob/master/readme.md)
<a name="datalake"></a>
### [Data Lake Store](https://docs.microsoft.com/azure/data-lake-store/data-lake-store-overview)
### [Data Lake Store](/azure/data-lake-store/data-lake-store-overview)
Capture data of any size and shape into a single location for performing analytics.
@ -219,11 +219,11 @@ Capture data of any size and shape into a single location for performing analyti
</dependency>
```
[Samples](https://github.com/Azure-Samples/data-lake-store-java-upload-download-get-started) | [Reference](https://docs.microsoft.com/java/api/overview/azure/datalakestore) | [GitHub](https://github.com/Azure/azure-data-lake-store-java) | [Release Notes](https://github.com/Azure/azure-data-lake-store-java/blob/master/CHANGES.md)
[Samples](https://github.com/Azure-Samples/data-lake-store-java-upload-download-get-started) | [Reference](/java/api/overview/azure/datalakestore) | [GitHub](https://github.com/Azure/azure-data-lake-store-java) | [Release Notes](https://github.com/Azure/azure-data-lake-store-java/blob/master/CHANGES.md)
<a name="appinsights"></a>
### [AppInsights](https://docs.microsoft.com/azure/application-insights/app-insights-overview)
### [AppInsights](/azure/application-insights/app-insights-overview)
Track usage, add telemetry, and monitor your web apps.
@ -231,15 +231,15 @@ Track usage, add telemetry, and monitor your web apps.
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-web</artifactId>
<version>1.0.7</version>
<version>1.0.8</version>
</dependency>
```
[Samples](https://docs.microsoft.com/azure/application-insights/app-insights-java-get-started) | [Reference](https://docs.microsoft.com/java/api/overview/azure/appinsights) | [GitHub](https://github.com/Microsoft/ApplicationInsights-Java) | [Release Notes](https://github.com/Microsoft/ApplicationInsights-Java#to-upgrade-to-the-latest-sdk)
[Samples](/azure/application-insights/app-insights-java-get-started) | [Reference](/java/api/overview/azure/appinsights) | [GitHub](https://github.com/Microsoft/ApplicationInsights-Java) | [Release Notes](https://github.com/Microsoft/ApplicationInsights-Java#to-upgrade-to-the-latest-sdk)
<a name="batch"></a>
### [Batch](https://docs.microsoft.com/azure/batch)
### [Batch](/azure/batch)
Run large-scale parallel and high-performance computing applications efficiently in the cloud.
@ -251,7 +251,7 @@ Run large-scale parallel and high-performance computing applications efficiently
</dependency>
```
[Samples](https://github.com/azure/azure-batch-samples) | [Reference](https://docs.microsoft.com/java/api/overview/azure/batch) | [GitHub](https://github.com/azure/azure-batch-sdk-for-java) | [Release Notes](https://github.com/Azure/azure-batch-sdk-for-java/blob/master/README.md)
[Samples](https://github.com/azure/azure-batch-samples) | [Reference](/java/api/overview/azure/batch) | [GitHub](https://github.com/azure/azure-batch-sdk-for-java) | [Release Notes](https://github.com/Azure/azure-batch-sdk-for-java/blob/master/README.md)
<a name="management"></a>
@ -267,4 +267,4 @@ Create, update, and delete Azure resources from your application code.
</dependency>
```
[Samples](https://github.com/Azure/azure-sdk-for-java#sample-code) | [Reference](https://docs.microsoft.com/java/api/overview/azure/) | [GitHub](https://github.com/Azure/azure-sdk-for-java) | [Release Notes](java-sdk-azure-release-notes.md)
[Samples](https://github.com/Azure/azure-sdk-for-java#sample-code) | [Reference](/java/api/overview/azure/) | [GitHub](https://github.com/Azure/azure-sdk-for-java) | [Release Notes](java-sdk-azure-release-notes.md)

Просмотреть файл

@ -0,0 +1,20 @@
---
title: Java samples for Azure Active Directory
description: Get sample code for working with Azure Active Directory from your Java apps.
keywords: Azure, Java, SDK, API, active directory, Azure AD, AAD, security, log in, authentication, SSO, SAML
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 07/31/2017
ms.topic: article
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: multiple
---
# Java samples for Azure Active Directory
The following table links to Java source you can use to access and work with Azure Active Directory(AD) in your apps.
[!INCLUDE [java-vm-samples](includes/java-aad-samples.md)]

Просмотреть файл

@ -1,32 +1,35 @@
- name: Azure for Java developers
href: index.md
href: index.yml
items:
- name: Overview
href: java-sdk-azure-overview.md
- name: Tools
href: java-azure-tools.md
- name: Get started with Azure libraries
href: java-sdk-azure-get-started.md
- name: Authentication
href: java-sdk-azure-authenticate.md
- name: Quickstarts
- name: Java Quickstarts
expanded: true
items:
- name: Web Apps
href: https://docs.microsoft.com/azure/app-service-web/app-service-web-get-started-java
href: /azure/app-service-web/app-service-web-get-started-java
- name: SQL Database
href: https://docs.microsoft.com/azure/sql-database/sql-database-connect-query-java
href: /azure/sql-database/sql-database-connect-query-java
- name: MySQL
href: /azure/mysql/connect-java
- name: PostgreSQL
href: /azure/postgresql/connect-java
- name: CosmosDB
href: https://docs.microsoft.com/azure/cosmos-db/create-documentdb-java
- name: Tutorials
- name: Cosmos DB
href: /azure/cosmos-db/create-documentdb-java
- name: Get started with Java
href: java-sdk-azure-get-started.md
- name: Tools
href: java-azure-tools.md
- name: Java Tutorials
items:
- name: "Spring Boot + MySQL"
href: https://docs.microsoft.com/azure/app-service-web/app-service-web-tutorial-java-mysql
- name: How-To
href: /azure/app-service-web/app-service-web-tutorial-java-mysql
- name: How-To Articles
items:
- name: Management API
items:
- name: Authentication
href: java-sdk-azure-authenticate.md
- name: Concepts
href: java-sdk-azure-concepts.md
- name: Spring Boot
items:
- name: Deploy with Docker and Kubernetes
@ -37,7 +40,7 @@
maintainContext: true
- name: Deploy with Maven
href: java-quickstart-maven-webapps.md
- name: Samples
- name: Java Code Samples
items:
- name: Virtual machines
href: java-sdk-azure-virtual-machine-samples.md
@ -45,8 +48,9 @@
href: java-sdk-azure-web-apps-samples.md
- name: SQL Database
href: java-sdk-azure-sql-database-samples.md
- name: Security
href: java-sdk-azure-security-samples.md
- name: Containers
href: java-sdk-azure-containers-samples.md
- name: All Java samples
href: https://azure.microsoft.com/resources/samples/?platform=java
- name: Concepts
href: java-sdk-azure-concepts.md

Просмотреть файл

@ -1,6 +1,7 @@
- name: Reference
- name: API Reference
uid: azure.java.sdk.landingpage.reference
landingPageType: Root
expanded: true
items:
- name: Active Directory
uid: azure.java.sdk.landingpage.services.activedirectory
@ -22,7 +23,7 @@
- com.microsoft.azure.management.appservice
- name: AppInsights
uid: azure.java.sdk.landingpage.services.appinsights
landingPageType: Service
href: ~/docs-ref-services/appinsights.md
items:
- name: Client library
uid: azure.java.sdk.landingpage.services.appinsights.Client library
@ -195,7 +196,7 @@
- com.microsoft.azure.batch.protocol.models
- name: CDN
uid: azure.java.sdk.landingpage.services.cdn
landingPageType: Service
href: ~/docs-ref-services/cdn.md
items:
- name: Management API
uid: azure.java.sdk.landingpage.services.cdn.Management API
@ -230,7 +231,7 @@
- com.microsoft.azure.documentdb.internal.routing
- name: Data Lake Analytics
uid: azure.java.sdk.landingpage.services.datalakeanalytics
landingPageType: Service
href: ~/docs-ref-services/datalakeanalytics.md
items:
- name: Management API
uid: azure.java.sdk.landingpage.services.datalakeanalytics.Management API
@ -260,7 +261,7 @@
items:
- name: Management API
uid: azure.java.sdk.landingpage.services.dns.Management API
landingPageType: Service
href: ~/docs-ref-services/dns.md
children:
- com.microsoft.azure.management.dns
- com.microsoft.azure.management.dns.implementation
@ -337,7 +338,7 @@
- com.microsoft.azure.management
- name: Networking
uid: azure.java.sdk.landingpage.services.networking
landingPageType: Service
href: ~/docs-ref-services/network.md
items:
- name: Managment API
uid: azure.java.sdk.landingpage.services.networking.Managment API
@ -358,7 +359,7 @@
- com.microsoft.azure.management.redis.implementation
- name: Resources
uid: azure.java.sdk.landingpage.services.resources
landingPageType: Service
href: ~/docs-ref-services/resources.md
items:
- name: Management API
uid: azure.java.sdk.landingpage.services.resources.Management API
@ -444,7 +445,7 @@
- com.microsoft.azure.storage.table
- name: Traffic Manager
uid: azure.java.sdk.landingpage.services.trafficmanager
landingPageType: Service
href: ~/docs-ref-services/trafficmanager.md
items:
- name: Management API
uid: azure.java.sdk.landingpage.services.trafficmanager.Management API

Просмотреть файл

@ -5,8 +5,8 @@ keywords: Azure, Java, SDK, API, SQL, authentication, AAD, Active Directory , Gr
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 05/17/2017
ms.topic: article
ms.date: 07/11/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
@ -17,18 +17,15 @@ ms.service: active-directory
## Overview
Sign-on users to web apps and control access to API and applications with Azure Active Directory. The [Azure Active Directory authentication library (ADAL) for Java](https://github.com/AzureAD/azure-activedirectory-library-for-java) provides a Java interface to set up OAuth2, OpenID Connect, and Active Directory Graph API authentication flows and provides support for single sign-on with [SAML 2.0](https://docs.microsoft.com/azure/active-directory/develop/active-directory-saml-protocol-reference).
Sign-on users and control access to applications and APIs with [Azure Active Directory](/azure/active-directory/active-directory-whatis).
The management libraries provide an interface to configure [role based access control](https://docs.microsoft.com/azure/active-directory/role-based-access-control-what-is) and assign identities (such as users and [service principals](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects)) to those roles.
To get started with Azure AD, see [Java web app sign-in and sign-out with Azure AD](/azure/active-directory/develop/active-directory-devquickstarts-webapp-java).
- [Client library](http://javadoc.io/doc/com.microsoft.azure/adal4j/1.2.0)
- [Management API](https://docs.microsoft.com/java/api/overview/azure/activedirectory/managementapi)
## Client library
## Import the libraries
Configure OAuth2, OpenID Connect, or Active Directory Graph authentication and [SAML 2.0](https://docs.microsoft.com/azure/active-directory/develop/active-directory-saml-protocol-reference) single-sign on with the [Azure Active Directory authentication library (ADAL) for Java](https://github.com/AzureAD/azure-activedirectory-library-for-java).
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
### Client
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
@ -38,23 +35,13 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
</dependency>
```
### Management
### Example
```XML
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-mgmt-graph-rbac</artifactId>
    <version>1.1.2</version>
</dependency>
```
## Example
Retrieve a JSON Web Token for a user in your an Active Directory tenant using Azure Active Directory's [Graph API](https://docs.microsoft.com/azure/active-directory/develop/active-directory-graph-api). This token can then be used to authenticate the user with a web API or application.
Retrieve a JSON Web Token (JWT) for a user in your an Active Directory tenant using Azure Active Directory's [Graph API](https://docs.microsoft.com/azure/active-directory/develop/active-directory-graph-api). This token can then be used to authenticate the user with an application or API.
```java
ExecutorService service = Executors.newFixedThreadPool(1);
AuthenticationContext context = ew AuthenticationContext(AUTHORITY, false, service);
AuthenticationContext context = new AuthenticationContext(AUTHORITY, false, service);
Future<AuthenticationResult> future = context.acquireToken(
"https://graph.windows.net", YOUR_TENANT_ID, username, password,
null);
@ -64,12 +51,45 @@ System.out.println("Refresh Token - " + result.getRefreshToken());
System.out.println("ID Token - " + result.getIdToken());
```
## Management API
Configure [role based access control](/azure/active-directory/role-based-access-control-what-is) and assign identities (such as users and [service principals](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects)) to those roles with the management API.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-mgmt-graph-rbac</artifactId>
    <version>1.1.2</version>
</dependency>
```
### Example
Create a new service principal and assign it the Contributor role.
```java
ServicePrincipal sp = Azure.servicePrincipals().define(spName)
.withNewApplication("http://" + spName)
.create();
RoleAssignment roleAssignment2 = authenticated.roleAssignments()
.define("contribRoleAssignment")
.forServicePrincipal(sp)
.withBuiltInRole(BuiltInRole.CONTRIBUTOR)
.withSubscriptionScope("862f67bc-d3ae-4243-bec7-3da6dca77717")
.create();
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/activedirectory/managementapi)
## Samples
| | |
|--|--|
| [Java web app sign-in and sign-out with Azure AD](https://docs.microsoft.com/azure/active-directory/develop/active-directory-devquickstarts-webapp-java) | Sign users in and out of your web apps with the ADAL4J library.
| [Access an API with Azure AD using a command line app](https://docs.microsoft.com/azure/active-directory/develop/active-directory-devquickstarts-headless-java) | Sign a user in from a command line app and use their credentials to access a web API using OAuth 2.0 |
| [Access Active Directory Graph API from your Java app](https://azure.microsoft.com/resources/samples/active-directory-java-graphapi-web/) | Query user information from your Java web app using the Active Directory Graph API |
[Manage groups, users, and roles](https://github.com/Azure-Samples/aad-java-browse-graph-and-manage-roles)
[Sign-in and sign-out users in a Java web app](https://github.com/Azure-Samples/active-directory-java-webapp-openidconnect)
[Access an API with Azure AD using a command line app](https://github.com/Azure-Samples/active-directory-java-native-headless)
[Call the Active AD Graph API from your Java web app](https://github.com/Azure-Samples/active-directory-java-graphapi-web/)
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
Explore more [sample Java code for Azure AD](https://azure.microsoft.com/en-us/resources/samples/?term=active+directory&platform=java) you can use in your apps.

Просмотреть файл

@ -0,0 +1,54 @@
---
title: Azure Application Insights libraries for Java
description: Reference documentation for the Java management API for Azure Appplication Insights
keywords: Azure, Java, SDK, API, AppInsights, telemetry, diagnostics, trace, logs, performance
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 07/21/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: appinsights
---
# Azure Application Insights libraries for Java
## Overview
Detect, triage, and diagnose issues in your web apps and services with [Application Insights](/azure/application-insights/app-insights-overview).
To get started with Application Insights, see [Get started with Application Insights in a Java web project](/azure/application-insights/app-insights-java-get-started).
## Client library
Add telemetry to track events, exceptions, and user metrics in your apps with the Application Insights client library.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-web</artifactId>
<version>1.0.8</version>
</dependency>
```
### Example
Create a new metric entry and record a value for it.
```java
MetricTelemetry sample = new MetricTelemetry();
sample.setName("metric name");
sample.setValue(42.3);
telemetryClient.TrackMetric(sample);
```
> [!div class="nextstepaction"]
> [Explore the Client APIs](/java/api/overview/azure/appinsights/clientlibrary)
## Samples
Explore more [sample Java code for Application Insights](https://azure.microsoft.com/en-us/resources/samples/?term=insights&platform=java) you can use in your apps.

Просмотреть файл

@ -1,12 +1,12 @@
---
title: Azure App Service libraries for Java
description:
description: Automat deployment of web apps on Azure App Service using the Azure management APIs.
keywords: Azure, Java, SDK, API, web apps , mobile , App Service
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 05/17/2017
ms.topic: article
ms.date: 07/09/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
@ -17,11 +17,15 @@ ms.service: appservice
## Overview
Deploy, manage, and scale web apps, APIs, and mobile apps running in [Azure App Service](https://docs.microsoft.com/azure/app-service) from your Java code using the management libraries. The management libraries also provide a Java interface for automating app configuration as an alternative to using the Azure Portal or [CLI](https://docs.microsoft.com/cli/azure/install-azure-cli).
Deploy and manage websites, web applications, and REST APIs with [Azure App Service](/azure/app-service).
## Import the libraries
To get started with Azure App Service, see [Create your first Java web app in Azure](/azure/app-service-web/app-service-web-get-started-java).
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
## Management API
Deploy, scale, and configure applications in Azure App Service with the management API.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
@ -31,9 +35,12 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
</dependency>
```
## Example
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure)
Deploy a webapp from a Docker Hub image into Azure Web App on Linux.
### Example
Deploy a webapp from a Docker image into an Azure Web App running on Linux.
```java
WebApp app = azure.webApps().define("newLinuxWebApp")
@ -42,28 +49,19 @@ WebApp app = azure.webApps().define("newLinuxWebApp")
.withPrivateDockerHubImage("username/my-java-app")
.withCredentials("dockerHubUser","dockerHubPassword")
.withAppSetting("PORT","8080").
create();
.create();
```
## Samples
| **Create an app** ||
|---|---|
| [Create a web app and deploy from FTP or GitHub][1] | Deploy web apps from local Git, FTP, and continuous integration from GitHub. |
| [Manage web app deployment slots][2] | Create a web app and deploy to staging slots, and then swap deployments between slots. |
| **Configure app** ||
| [Configure a custom domain][3] | Create a web app with a custom domain and self-signed SSL certificate. |
| **Scale apps** ||
| [Scale a web app across multiple regions][4] | Scale a web app in three different geographical regions and make them available through a single endpoint using Azure Traffic Manager. |
| **Connect app to resources** ||
| [Connect to a storage account][5] | Create an Azure storage account and add the storage account connection string to the app settings. |
| [Connect to a SQL database][6] | Create a web app and SQL database, and then add the SQL database connection string to the app settings. |
[Deploy a web app from FTP or GitHub][1]
[Swap between app versions with deployment slots][2]
[Configure a custom domain][3]
[Scale a web app across multiple regions][4]
Explore more [sample Java code for Azure App Service](https://azure.microsoft.com/resources/samples/?platform=java&term=appservice) you can use in your apps.
[1]: ../docs-ref-conceptual/java-sdk-configure-webapp-sources.md
[2]: https://azure.microsoft.com/resources/samples/app-service-java-manage-staging-and-production-slots-for-web-apps/
[3]: https://azure.microsoft.com/resources/samples/app-service-java-manage-web-apps-with-custom-domains/
[4]: https://azure.microsoft.com/resources/samples/app-service-java-scale-web-apps-on-linux/
[5]: https://azure.microsoft.com/resources/samples/app-service-java-manage-storage-connections-for-web-apps/
[6]: https://azure.microsoft.com/resources/samples/app-service-java-manage-data-connections-for-web-apps/
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.

Просмотреть файл

@ -17,15 +17,15 @@ ms.service: batch
## Overview
The Azure Batch client libraries let you configure compute nodes and pools, define tasks and configure them to run in jobs, and set up a job manager to control and monitor job execution. [Learn more](https://docs.microsoft.com/en-us/azure/batch/batch-api-basics) about using these objects to run large-scale parallel compute solutions.
Run large-scale parallel and high-performance computing applications efficiently in the cloud with [Azure Batch](/azure/batch/batch-technical-overview).
Use the Azure Batch management libraries to create and delete batch accounts, read and regenerate batch account keys, and manage batch account storage.
To get started with Azure Batch, see [Create a Batch account with the Azure portal](/azure/batch/batch-account-create-portal).
## Import the libraries
## Client library
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
The Azure Batch client libraries let you configure compute nodes and pools, define tasks and configure them to run in jobs, and set up a job manager to control and monitor job execution. [Learn more](/azure/batch/batch-api-basics) about using these objects to run large-scale parallel compute solutions.
### Client library
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
@ -35,7 +35,29 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
</dependency>
```
### Management
### Example
Set up a pool of Linux compute nodes in a batch account:
```java
// create the batch client for an account using its URI and keys
BatchClient client = BatchClient.open(new BatchSharedKeyCredentials("https://fabrikambatch.eastus.batch.azure.com", "fabrikambatch", batchKey));
// configure a pool of VMs to use
VirtualMachineConfiguration configuration = new VirtualMachineConfiguration();
configuration.withNodeAgentSKUId("batch.node.ubuntu 16.04");
client.poolOperations().createPool(poolId, poolVMSize, configuration, poolVMCount);
```
> [!div class="nextstepaction"]
> [Explore the Client APIs](/java/api/overview/azure/batch/clientlibrary)
## Management API
Use the Azure Batch management libraries to create and delete batch accounts, read and regenerate batch account keys, and manage batch account storage.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
@ -45,23 +67,31 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
</dependency>
```
## Example
### Example
Set up a pool of Linux compute nodes in a batch account:
Create an Azure Batch account and configure a new application and Azure storage account for it.
```java
// create the batch client for an account using its URI and keys
BatchClient client = BatchClient.open(new BatchSharedKeyCredentials(batchUri, batchAccount, batchKey));
// configure a pool of VMs to use
VirtualMachineConfiguration configuration = new VirtualMachineConfiguration();
configuration.withNodeAgentSKUId("batch.node.ubuntu 16.04");
client.poolOperations().createPool(poolId, poolVMSize, configuration, poolVMCount);
BatchAccount batchAccount = azure.batchAccounts().define("newBatchAcct")
.withRegion(Region.US_EAST)
.withNewResourceGroup("myResourceGroup")
.defineNewApplication("batchAppName")
.defineNewApplicationPackage(applicationPackageName)
.withAllowUpdates(true)
.withDisplayName(applicationDisplayName)
.attach()
.withNewStorageAccount("batchStorageAcct")
.create();
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/batch/managementapi)
## Samples
[!INCLUDE [java-sql-samples](../docs-ref-conceptual/includes/batch.md)]
[Manage Batch accounts][1]
Explore more [sample Java code for Azure Batch](https://azure.microsoft.com/resources/samples/?platform=java&term=batch) you can use in your apps.
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
[1]: https://github.com/Azure-Samples/batch-java-manage-batch-accounts

67
docs-ref-services/cdn.md Normal file
Просмотреть файл

@ -0,0 +1,67 @@
---
title: Azure CDN libraries for Java
description: Reference documentation for the Java CDN management libraries
keywords: Azure, Java, SDK, API, content, distribution, network, CDN
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 07/11/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: cdn
---
# Azure CDN libraries for Java
## Overview
Cache static web content at strategically placed locations to provide maximum throughput for users with [Azure Content Delivery Network](/azure/cdn/cdn-overview) (CDN).
To get started with Azure CDN, see [Getting started with Azure CDN](/azure/cdn/cdn-create-new-endpoint).
## Management API
Create CDN profiles, define endpoints, and add content to the CDN using the management API.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-mgmt-cdn</artifactId>
<version>1.1.2</version>
</dependency>
```
### Example
Create a CDN profile, assign endpoints, and load content into the CDN.
```java
CdnProfile profile = azure.cdnProfiles().define("testCDN")
.withRegion(Region.US_EAST)
.withNewResourceGroup()
.withStandardVerizonSku()
.withNewEndpoint("webAppHostname1")
.withNewEndpoint("webAppHostname2")
.create();
List<String> contentList = new ArrayList<String>();
contentList.add("/client.js");
contentList.add("/media/fabrikam_logo.png");
for (CdnEndpoint endpoint : profile.endpoints().values()) {
endpoint.loadContent(contentList);
}
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/cdn/managementapi)
## Samples
[Manage CDNs with Java](https://github.com/Azure-Samples/cdn-java-manage-cdn)
Explore more [sample Java code for Azure CDN](https://azure.microsoft.com/resources/samples/?platform=java&term=cdn) you can use in your apps.

Просмотреть файл

@ -1,63 +1,70 @@
---
title: Azure CosmosDB libraries for Java
description: Reference documentation for the Java client libraries for CosmosDB
keywords: Azure, Java, SDK, API, SQL, database, PostGres,CosmosDB, NoSQL
title: Azure Cosmos DB libraries for Java
description: Reference documentation for the Java client libraries for Azure Cosmos DB
keywords: Azure, Java, SDK, API, SQL, database, MongoDB, Cosmos DB, NoSQL, DocumentDB
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 05/17/2017
ms.topic: article
ms.date: 07/10/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: cosmosdb
---
# Azure CosmosDB libraries for Java
# Azure Cosmos DB libraries for Java
## Overview
Use CosmosDB in your Java applications to store and query JSON documents in a NoSQL data store.
Store and query key-value, JSON document, graph, and columnar data in a globally distributed database with [Cosmos DB](/azure/cosmos-db/introduction).
Learn more about [Azure CosmosDB](https://docs.microsoft.com/en-us/azure/cosmos-db/introduction)
To get started with Cosmos DB, see [Azure Cosmos DB: Build an API app with Java and the Azure portal](/azure/cosmos-db/create-documentdb-java).
## Import the libraries
## Client library
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
Connect to Cosmos DB using the [DocumentDB](/azure/cosmos-db/documentdb-introduction) client library to work with JSON data with [SQL query syntax](/azure/cosmos-db/documentdb-sql-query).
### Client library
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the Cosmos DB client library in your project.
```XML
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-documentdb</artifactId>
<version>1.11.0</version>
<version>1.12.0</version>
</dependency>
```
## Example
### Example
Find matching documents in CosmosDB using a SQL-like query interface:
Select matching JSON documents in Cosmos DB using SQL query syntax.
```java
List<Document> results = documentClient
.queryDocuments(
"dbs/" + DATABASE_ID + "/colls/" + COLLECTION_ID,
"SELECT * FROM myCollection WHERE myCollection.email = 'allen [at] contoso.com'",
null).getQueryIterable().toList();
DocumentClient client = new DocumentClient(new DocumentClient("https://contoso.documents.azure.com:443",
"contosoCosmosDBKey",
new ConnectionPolicy(),
ConsistencyLevel.Session);
List<Document> results = client.queryDocuments("dbs/" + DATABASE_ID + "/colls/" + COLLECTION_ID,
"SELECT * FROM myCollection WHERE myCollection.email = 'allen [at] contoso.com'",
null)
.getQueryIterable()
.toList();
```
> [!div class="nextstepaction"]
> [Explore the Client APIs](/java/api/overview/azure/cosmosdb/clientlibrary)
## Samples
| **Cosmos DB** ||
| [Develop a Java app using Azure CosmosDB's MongoDB API][2] | Sample Java application that connects to Azure Cosmos DB with the MongoDB API |
| [Develop a Java app using Azure CosmosDB's Graph API][3] | Store and access data from a Java application using the Graph API in Cosmos DB |
| [Develop a Java app using Azure CosmosDB's DocumentDB API][4] | Use Azure Cosmos DB with the DocumentDB API to store and access data from a Java application |
[Develop a Java app using Azure Cosmos DB MongoDB API][2]
[Develop a Java app using Azure Cosmos DB Graph API][3]
[Develop a Java app using Azure Cosmos DB DocumentDB API][4]
Explore more [sample Java code for Azure Cosmos DB](https://azure.microsoft.com/resources/samples/?platform=java&term=cosmos) you can use in your apps.
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
[2]: https://azure.microsoft.com/resources/samples/azure-cosmos-db-mongodb-java-getting-started/
[3]: https://azure.microsoft.com/resources/samples/azure-cosmos-db-graph-java-getting-started/
[4]: https://azure.microsoft.com/resources/samples/azure-cosmos-db-documentdb-java-getting-started/
[2]: https://github.com/Azure-Samples/azure-cosmos-db-mongodb-java-getting-started
[3]: https://github.com/Azure-Samples/azure-cosmos-db-graph-java-getting-started
[4]: https://github.com/Azure-Samples/azure-cosmos-db-documentdb-java-getting-started

Просмотреть файл

@ -17,15 +17,16 @@ ms.service: data-lake-store
## Overview
Read and write to files stored in Data Lake Store with buffered streams, get and set file permissions and metadata, and create, delete, and rename files or directories in a Data Lake Store.
Capture data of any size, type, and ingestion speed in a single place for analytics with [Azure Data Lake Store](/azure/data-lake-store/data-lake-store-overview).
Use the Azure Data Lake Store management libraries to manage accounts, firewall rules, and trusted identity providers.
To get started with Data Lake Store, see [Get started with Azure Data Lake Store using Java](/azure/data-lake-store/data-lake-store-get-started-java-sdk).
## Import the libraries
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
## Client library
### Client library
Read and write files, set permissions and metadata, and manage files and directories in Data Lake Store with the client library.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
@ -35,23 +36,12 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
</dependency>
```
### Management
```XML
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-mgmt-datalake-store</artifactId>
    <version>1.1.2</version>
</dependency>
```
## Example
Create a Data Lake client from a fully qualified domain name and OAuth2 access token, then create a new file and write to it.
Create a Data Lake client from a fully qualified domain name and OAuth2 access token, then create a file in Data Lake and write to it.
```java
//
AccessTokenProvider provider = new ClientCredsTokenProvider(authTokenEndpoint, clientId, clientKey);
// AccessTokenProvider provider = new ClientCredsTokenProvider(authTokenEndpoint, clientId, clientKey);
ADLStoreClient client = ADLStoreClient.createClient(accountFQDN, provider);
// create directory
@ -68,9 +58,32 @@ for (int i = 1; i <= 10; i++) {
out.close();
```
> [!div class="nextstepaction"]
> [Explore the Client APIs](/java/api/overview/azure/datalakestore/clientlibrary)
## Management API
Use the management API to manage Data Lake Store accounts, firewall rules, and trusted identity providers.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-mgmt-datalake-store</artifactId>
    <version>1.0.0-beta1.3</version>
</dependency>
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/datalakestore/managementapi)
## Samples
[!INCLUDE [java-datalake-samples](../docs-ref-conceptual/includes/datalake.md)]
[Azure Data Lake Get Started][1]
[1]: https://github.com/Azure-Samples/data-lake-store-java-upload-download-get-started
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
Explore more [sample Java code for Azure Data Lake Store](https://azure.microsoft.com/resources/samples/?platform=java&term=lake) you can use in your apps.

Просмотреть файл

@ -0,0 +1,72 @@
---
title: Azure Data Lake Analytics libraries for Java
description: Reference documentation for the Java Data Lake Analytics libraries
keywords: Azure, Java, SDK, API, big data, data lake
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 06/21/2017
ms.topic: article
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: data-lake-store
---
# Azure Data Lake Analytics libraries for Java
## Overview
Run big data analysis jobs that scale to massive data sets with [Azure Data Lake Analytics](/azure/data-lake-analytics/data-lake-analytics-overview).
To get started with Azure Data Lake Analytics, see [Get started with Azure Data Lake Analytics using Java SDK](/azure/data-lake-analytics/data-lake-analytics-get-started-java-sdk).
## Management API
Use the management API to manage Data Lake Analytics accounts, jobs, policies, and catalogs.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-mgmt-datalake-analytics</artifactId>
    <version>1.0.0-beta1.3</version>
</dependency>
```
## Example
Submit a new U-SQL job to Data Lake Analytics.
```java
// authenticate with service principal credentials
ApplicationTokenCredentials creds = new ApplicationTokenCredentials(_clientId, _tenantId, _clientSecret, null);
DataLakeAnalyticsJobManagementClient adlaJobClient = new DataLakeAnalyticsJobManagementClientImpl(creds);
// set up job parameters
UUID jobId = java.util.UUID.randomUUID();
USqlJobProperties properties = new USqlJobProperties();
properties.setScript("@input = EXTRACT Data string FROM \"/input1.csv\" USING Extractors.Csv(); OUTPUT @input TO @\"/output1.csv\" USING Outputters.Csv();");
JobInformation parameters = new JobInformation();
parameters.setName("testJob");
parameters.setJobId(jobId);
parameters.setType(JobType.USQL);
parameters.setProperties(properties);
// create the job
JobInformation jobInfo = adlaJobClient.getJobOperations().create(accountName, jobId, parameters).getBody();
```
> [!div class="nextstepaction"]
> [Explore the Client APIs](/java/api/overview/azure/datalakeanalytics/managementapi)
## Samples
[Azure Data Lake Analytics using Java SDK][1]
[1]: https://docs.microsoft.com/en-us/azure/data-lake-analytics/data-lake-analytics-get-started-java-sdk
View the [complete list](https://azure.microsoft.com/resources/samples/?platform=java&term=analytics) of Azure Data Lake Analytics samples.

58
docs-ref-services/dns.md Normal file
Просмотреть файл

@ -0,0 +1,58 @@
---
title: Azure DNS libraries for Java
description: Reference documentation for the Azure DNS Java management libraries
keywords: Azure, Java, SDK, API, domains, DNS, name, service, domain name service
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 07/11/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: dns
---
# Azure Traffic Manager libraries for Java
## Overview
Provide domain name resolution and manage your DNS records using the same credentials, APIs, tools, and billing as your other Azure services with [Azure DNS](/azure/dns/dns-overview).
To get started with Azure DNS, see [Get started with Azure DNS using the Azure CLI 2.0](/azure/dns/dns-getstarted-cli).
## Management API
Create DNS zones and add records to zones with the management API.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-mgmt-dns</artifactId>
<version>1.1.2</version>
</dependency>
```
### Example
Create a root DNS zone and add a `www` CNAME record in an existing resource group.
```java
DnsZone rootDnsZone = azure.dnsZones().define("contoso.com")
.withExistingResourceGroup("myResourceGroup")
.create();
rootDnsZone = rootDnsZone.update()
.withCNameRecordSet("www", "172.30.241.20")
.apply();
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/dns/managementapi)
## Samples
[Host and manage your domains with Azure DNS](https://github.com/Azure-Samples/dns-java-host-and-manage-your-domains)
Explore more [sample Java code for Azure DNS](https://azure.microsoft.com/resources/samples/?platform=java&term=dns) you can use in your apps.

Просмотреть файл

@ -10,26 +10,29 @@ ms.topic: article
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: data-lake-store
ms.service: event-hub
---
# Azure Event Hub libraries for Java
## Overview
Send events to an Azure Event Hub and consume and process events from an Event Hub using the Event Hub client library.
Collect and manage millions of events per second from connected IoT devices and applications with [Azure Event Hubs](/azure/event-hubs/event-hubs-what-is-event-hubs).
## Import the libraries
To get started with Azure Event Hubs, see [Receive events from Azure Event Hubs using Java](/azure/event-hubs/event-hubs-java-get-started-receive-eph).
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
### Client library
## Client library
Send events to an Azure Event Hub and consume and process events from an Event Hub using the Event Hubs client library.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-eventhubs</artifactId>
    <version>0.14.0</version>
    <version>0.14.3</version>
</dependency>
```
@ -46,9 +49,17 @@ EventHubClient ehClient = EventHubClient.createFromConnectionStringSync(connStr.
ehClient.sendSync(sendEvent);
```
> [!div class="nextstepaction"]
> [Explore the Client APIs](/java/api/overview/azure/eventhub/clientlibrary)
## Samples
[!INCLUDE [java-eventhub-samples](../docs-ref-conceptual/includes/eventhub.md)]
[Write to Event Hub via JMS and read from Apache Storm][1]
[Read and write from EventHubs using a hybrid .NET/Java topology][2]
[1]: https://github.com/Azure-Samples/event-hubs-java-storm-sender-jms-receiver
[2]: https://github.com/Azure-Samples/hdinsight-dotnet-java-storm-eventhub
Explore more [sample Java code for Azure Event Hubs](https://azure.microsoft.com/resources/samples/?platform=java&term=event) you can use in your apps.
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.

Просмотреть файл

@ -5,7 +5,7 @@ keywords: Azure, Java, SDK, API, event, IoT, streams, devices, iot hub
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 06/21/2017
ms.date: 07/20/2017
ms.topic: article
ms.prod: azure
ms.technology: azure
@ -15,34 +15,41 @@ ms.service: iot-hub
# Azure IoT libraries for Java
## Overview
Connect, monitor, and control Internet of Things assets with [Azure IoT Hub](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-what-is-iot-hub).
Register devices and send messages from the cloud to registered devices using the IoT Service library. Send messages to the cloud and receive messages on devices using the IoT Device library.
To get started with Azure IoT Hub, see [Connect your device to your IoT hub using Java](/azure/iot-hub/iot-hub-java-java-getstarted).
## Import the libraries
## IoT Service library
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
Register devices and send messages from the cloud to registered devices using the IoT Service library.
### IoT Service library
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
<groupId>com.microsoft.azure.sdk.iot</groupId>
<artifactId>iot-service-client</artifactId>
<version>1.4.20</version>
<version>1.6.23</version>
</dependency>
```
### Iot Device library
## Iot Device library
Send messages to the cloud and receive messages on devices using the IoT Device library.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
<groupId>com.microsoft.azure.sdk.iot</groupId>
<artifactId>iot-device-client</artifactId>
<version>1.1.27</version>
<version>1.3.31</version>
</dependency>
```
> [!div class="nextstepaction"]
> [Explore the Client APIs](/java/api/overview/azure/iot/clientlibrary)
## Example
Send a message from Azure IoT Hub to a device.
@ -66,9 +73,10 @@ catch (ExecutionException e) {
}
```
## Samples
[!INCLUDE [java-iot-samples](../docs-ref-conceptual/includes/iot.md)]
[IoT Device samples](https://github.com/Azure/azure-iot-sdk-java/tree/master/device/iot-device-samples)
[IoT Service samples](https://github.com/Azure/azure-iot-sdk-java/tree/master/service/iot-service-samples)
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
Explore more [sample Java code for Azure IoT](https://azure.microsoft.com/resources/samples/?platform=java&term=iot) you can use in your apps.

Просмотреть файл

@ -5,7 +5,7 @@ keywords: Azure, Java, SDK, API, keyvault, secure, keys, secrets, vault
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 06/22/2017
ms.date: 07/20/2017
ms.topic: article
ms.prod: azure
ms.technology: azure
@ -17,15 +17,15 @@ ms.service: keyvault
## Overview
Safeguard and manage cryptographic keys and secrets used by cloud applications and services with [Azure Key Vault](/azure/key-vault/).
To get started with Azure Key Vault, see [Get started with Azure Key Vault](/azure/key-vault/key-vault-get-started).
## Client library
Create, update, and delete keys and secrets in Azure Key Vault with the client libraries.
Use the Azure Key Vault management libraries to create key vaults, authorize applications, and manage permissions.
## Import the libraries
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
### Client library
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
@ -35,16 +35,6 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
</dependency>
```
### Management
```XML
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-mgmt-keyvault</artifactId>
    <version>1.1.2</version>
</dependency>
```
## Example
Retrieve a [JSON web key](https://tools.ietf.org/html/draft-ietf-jose-json-web-key-18) from a Key Vault.
@ -55,9 +45,47 @@ KeyBundle returnedKeyBundle = getKey(vaultUrl, keyName);
JsonWebKey jsonKey = returnedKeyBundle.key();
```
> [!div class="nextstepaction"]
> [Explore the Client APIs](/java/api/overview/azure/keyvault/clientlibrary)
## Management API
Use the Azure Key Vault management libraries to create key vaults, authorize applications, and manage permissions.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-mgmt-keyvault</artifactId>
    <version>1.1.2</version>
</dependency>
```
## Example
Authorize and application running with [service principal](/azure/azure-resource-manager/resource-group-create-service-principal-portal) `clientId` to list and retrieve secrets from a key vault.
```java
vault1 = vault1.update()
.defineAccessPolicy()
.forServicePrincipal(clientId)
.allowKeyAllPermissions()
.allowSecretPermissions(SecretPermissions.GET)
.allowSecretPermissions(SecretPermissions.LIST)
.attach()
.apply();
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/keyvault/managementapi)
## Samples
[!INCLUDE [java-keyvault-samples](../docs-ref-conceptual/includes/keyvault.md)]
[Manage Key Vaults][1]
[1]: https://github.com/Azure-Samples/key-vault-java-manage-key-vaults
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
Explore more [sample Java code for Azure Key Vault](https://azure.microsoft.com/resources/samples/?platform=java&term=key+vault) you can use in your apps.

Просмотреть файл

@ -17,15 +17,15 @@ ms.service: mysql
## Overview
The recommended client library for accessing Azure Database for MySQL is the open-source [JDBC driver](https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference.html). Use the JDBC driver to connect to the database and execute SQL statements directly or through data access frameworks like [Spring Data JPA](http://projects.spring.io/spring-data-jpa/) and [Hibernate](http://hibernate.org/orm/).
[Azure Database for MySQL](/azure/sql-database/sql-database-technical-overview) is a relational database service based on the open source [MySQL](https://www.mysql.com/) Server engine.
Learn more about [Azure Database for MySQL](https://docs.microsoft.com/azure/MySQL/)
To get started with Azure Database for MySQL, see [Use Java to connect and query data](/azure/mysql/connect-java).
## Import the libraries
## Client JBDC driver
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
Connect to Azure Database for MySQL from your applications using the open-source [MySQL JDBC driver](https://dev.mysql.com/downloads/connector/j/). You can use the [Java JDBC API](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) to directly connect to the database or use data access frameworks that interact with the database through JDBC such as [Hibernate](http://hibernate.org/).
### JDBC driver
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client JDBC driver in your project.
```XML
<dependency>
@ -41,19 +41,17 @@ Connect to Azure Database for MySQL using JDBC and select all records in the sal
```java
String url = String.format("jdbc:mysql://fabrikamysql.mysql.database.azure.com:3306/fabrikamdb?verifyServerCertificate=true&useSSL=true&requireSSL=false");
Connection connection = null;
try {
connection = DriverManager.getConnection(url, "frank@fabrikamysql", "aBcDeFgHiJkL");
Connection conn = DriverManager.getConnection(url, "frank@fabrikamysql", "aBcDeFgHiJkL");
String selectSql = "SELECT * FROM SALES";
Statement statement = connection.createStatement();
Statement statement = conn.createStatement();
ResultSet resultSet = statement.executeQuery(selectSql);
}
```
## Samples
| | |
|--|--|
| [Design a MySQL database using the Azure CLI](https://docs.microsoft.com/azure/mysql/tutorial-design-database-using-cli) | Create an Azure Database for MySQL ,configure firewall rules, and connect to the database with the psql utility.
[Build a Java and MySQL web app](/azure/app-service-web/app-service-web-tutorial-java-mysql)
[Design a MySQL database using the Azure CLI](/azure/mysql/tutorial-design-database-using-cli)
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
Explore more [sample Java code for Azure Database for MySQL](https://azure.microsoft.com/resources/samples/?platform=java&term=mysql) you can use in your apps.

Просмотреть файл

@ -0,0 +1,63 @@
---
title: Azure Network libraries for Java
description: Reference documentation for the Java Azure Network management libraries
keywords: Azure, Java, SDK, API, networking, load balancing, vnet , subnet
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 07/20/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: networking
---
# Azure Network libraries for Java
## Overview
Connect Azure resources, filter and balance traffic, and manage routing with [Azure Networking](/azure/networking/networking-overview).
To get started with Azure Networking, see [Create your first virtual network](/azure/virtual-network/virtual-network-get-started-vnet-subnet).
## Management API
Create and manage Azure [virtual networks](/azure/virtual-network/virtual-networks-overview) , [ExpressRoutes](/azure/expressroute/) , and [Application Gateways](/azure/application-gateway/) with the management API.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-mgmt-network</artifactId>
<version>1.1.2</version>
</dependency>
```
### Example
Create a new virtual network with a single subnet.
```java
Network virtualNetwork1 = azure.networks().define(vnetName1)
.withRegion(Region.US_EAST)
.withExistingResourceGroup("myResourceGroup")
.withAddressSpace("192.168.0.0/16")
.defineSubnet("myVirtualNetwork")
.withAddressPrefix("192.168.2.0/24")
.attach()
.create();
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/networking/managementapi)
## Samples
[Manage virtual networks](https://github.com/Azure-Samples/network-java-manage-virtual-network)
[Manage network interfaces](https://github.com/Azure-Samples/network-java-manage-network-interface)
[Manage Application Gateways](https://github.com/Azure-Samples/application-gateway-java-manage-simple-application-gateways)
[Manage internet facing load balancers](https://github.com/Azure-Samples/network-java-manage-internet-facing-load-balancers)
Explore more [sample Java code for Azure Networking](https://azure.microsoft.com/resources/samples/?platform=java&term=network) you can use in your apps.

Просмотреть файл

@ -17,15 +17,15 @@ ms.service: postgresql
## Overview
The recommended client library for accessing Azure Database for PostgreSQL is the open-source [JDBC driver](https://jdbc.postgresql.org/documentation/publicapi/index.html). Use the JDBC driver to connect to the database and execute SQL statements directly or through data access frameworks like [Spring Data JPA](http://projects.spring.io/spring-data-jpa/) and [Hibernate](http://hibernate.org/orm/).
[Azure Database for PostgreSQL](/azure/sql-database/sql-database-technical-overview) is a relational database service in Azure built for developers based on the community version of open source [PostgreSQL](https://www.postgresql.org/) database engine.
Learn more about [Azure Database for PostgreSQL](https://docs.microsoft.com/azure/postgresql/)
To get started with Azure Database for PostgreSQL, see [Use Java to connect and query data](/azure/postgresql/connect-java).
## Import the libraries
## Client JDBC driver
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
Connect to Azure Database for PostgreSQL from your applications using the open-source [PostgreSQL JDBC driver](https://jdbc.postgresql.org/). You can use the [Java JDBC API](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) to directly connect to the database or use data access frameworks that interact with the database through JDBC such as [Hibernate](http://hibernate.org/).
### JDBC driver
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client JDBC driver in your project.
```XML
<dependency>
@ -52,8 +52,6 @@ try {
## Samples
| | |
|--|--|
| [Design a PostgreSQL database using the Azure CLI](https://docs.microsoft.com/azure/postgresql/tutorial-design-database-using-azure-cli) | Create an Azure Database for PostgreSQL ,configure firewall rules, and connect to the database with the psql utility.
[Design a PostgreSQL database using the Azure CLI](https://docs.microsoft.com/azure/postgresql/tutorial-design-database-using-azure-cli)
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
Explore more [sample Java code for Azure Database for PostgreSQL](https://azure.microsoft.com/resources/samples/?platform=java&term=postgres) you can use in your apps.

Просмотреть файл

@ -5,8 +5,8 @@ keywords: Azure, Java, SDK, API, cache, redis, web cache, key-value, in-memory
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 05/17/2017
ms.topic: article
ms.date: 07/11/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
@ -17,18 +17,15 @@ ms.service: redis-cache
## Overview
Azure Redis Cache is based on the popular open source [Redis](https://redis.io/) cache. It gives you access to a secure, dedicated Redis cache, managed by Microsoft and accessible from your Azure apps.
Azure Redis Cache is a secure, distributed key-value store based on the popular open source [Redis](https://redis.io/) cache.
Redis is an advanced key-value store, where keys can contain data structures such as strings, hashes, lists, sets, and sorted sets. Redis supports a set of atomic operations on these data types.
To get started with Azure Redis Cache, see [How to use Azure Redis Cache with Java](/azure/redis-cache/cache-java-get-started).
- [Client library](http://xetorthio.github.io/jedis/ )
- [Management API](https://docs.microsoft.com/java/api/overview/azure/rediscache/managementapi)
## Client library
## Import the libraries
Connect to Azure Redis Cache and store and retrieve values from the cache using the open-source [Jedis](https://github.com/xetorthio/jedis) client.
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
### Client
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
@ -39,7 +36,20 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
</dependency>
```
### Management
## Example
Connect to Azure Redis and insert a string into the cache.
```java
JedisShardInfo shardInfo = new JedisShardInfo("<name>.redis.cache.windows.net", 6380, useSsl);
shardInfo.setPassword("<key>"); /* Use your access key. */
Jedis jedis = new Jedis(shardInfo);
jedis.set("foo", "bar");
```
## Management API
Create and scale Azure Redis resources and manage access keys to with the management API.
```XML
<dependency>
@ -51,16 +61,20 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
## Example
Add an item to a Redis cache and then retrieve it.
Create a new Azure Redis Cache in the [two-node standard tier](https://azure.microsoft.com/services/cache/).
```java
JedisShardInfo shardInfo = new JedisShardInfo("<name>.redis.cache.windows.net", 6380, useSsl);
shardInfo.setPassword("<key>"); /* Use your access key. */
Jedis jedis = new Jedis(shardInfo);
jedis.set("foo", "bar");
String value = jedis.get("foo");
RedisCache cache = azure.redisCaches().define(redisCacheName1)
.withRegion(Region.US_CENTRAL)
.withNewResourceGroup(rgName)
.withStandardSku();
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/rediscache/managementapi)
## Samples
Explore [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
[Manage Azure Redis Cache](https://github.com/Azure-Samples/redis-java-manage-cache)
Explore more [sample Java code for Azure Redis Cache](https://azure.microsoft.com/resources/samples/?platform=java&term=redis) you can use in your apps.

Просмотреть файл

@ -0,0 +1,58 @@
---
title: Azure Resource Manager libraries for Java
description: Reference documentation for the Java Resource Manager libraries
keywords: Azure, Java, SDK, API, resource groups, arm, resource manager
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 06/21/2017
ms.topic: article
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: data-lake-store
---
# Azure Resource Manager libraries for Java
## Overview
Deploy, monitor, and manage resources in groups with [Azure Resource Manager](https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-overview).
## Management API
Use the management API to create resource groups and deploy resources from templates.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-mgmt-resources</artifactId>
    <version>1.1.2</version>
</dependency>
```
## Example
Create a new resource group in the Azure Eastern US region.
```java
ResourceGroup resourceGroup = azure.resourceGroups().define("myResourceGroup")
.withRegion(Region.US_EAST)
.create();
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/resources/managementapi)
## Samples
[Manage Azure Resource Groups with Java][1]
[Deploy resources using an ARM template][2]
[1]: https://github.com/Azure-Samples/resources-java-manage-resource-group
[2]: https://github.com/Azure-Samples/resources-java-deploy-using-arm-template
View the [complete list](https://azure.microsoft.com/resources/samples/?platform=java&term=resource) of Azure Resource Manager samples.

Просмотреть файл

@ -5,8 +5,8 @@ keywords: Azure, Java, SDK, API, messaging, amqp, qpid, JMS, pubsub, pub-sub, me
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 05/17/2017
ms.topic: article
ms.date: 07/11/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
@ -17,26 +17,58 @@ ms.service: service-bus
## Overview
Microsoft Azure Service Bus supports a set of cloud-based, message-oriented middleware technologies including reliable message queuing and durable publish/subscribe messaging. Client libraries are available that work with the Java Messaging Service (JMS) 2.0 specification.
Connect applications through reliable messaging with [Azure Service Bus](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview).
- [Client library](https://qpid.apache.org/components/jms/index.html)
- [Management API](https://docs.microsoft.com/en-us/java/api/overview/azure/servicebus/managementapi)
To get started with Azure Service Bus, see [How to use Service Bus queues](/azure/service-bus-messaging/service-bus-java-how-to-use-queue).
## Import the libraries
## Client library
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
Connect to Service Bus, send messages, and publish and subscribe to topics with the [Java Messaging Service API](https://docs.oracle.com/javaee/7/api/javax/jms/package-summary.html) using the open-source [Apache QPID JMS](https://qpid.apache.org/components/jms/index.html) library.
### Client library
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
<groupId>org.apache.qpid</groupId>
<artifactId>qpid-jms-client</artifactId>
<version>0.23.0</version>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-servicebus</artifactId>
<version>0.9.7</version>
</dependency>
```
### Management API
## Example
Send a random number in a message to a queue.
```java
// Configure JNDI environment using a properties file in the classpath
Hashtable<String, String> env = new Hashtable<String, String>();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory");
env.put(Context.PROVIDER_URL, "servicebus.properties");
Context context = new InitialContext(env);
// create the connection
ConnectionFactory cf = (ConnectionFactory) context.lookup("servicebus");
connection = cf.createConnection();
sendSession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
sender = sendSession.createProducer(queue);
// send a random message
TextMessage message = sendSession.createTextMessage();
message.setText("Test AMQP message from JMS");
long randomMessageID = randomGenerator.nextLong() >>>1;
message.setJMSMessageID("ID:" + randomMessageID);
sender.send(message);
```
> [!div class="nextstepaction"]
> [Explore the Client APIs](/java/api/overview/azure/servicebus/clientlibrary)
## Management API
Create and manage namespaces, topics, queues, and subscriptions with the management API.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
@ -48,20 +80,27 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
## Example
Send a random number in a message to a queue.
Create a topic in a new Service Bus namespace.
```java
private void sendMessage() throws JMSException {
TextMessage message = sendSession.createTextMessage();
message.setText("Test AMQP message from JMS");
long randomMessageID = randomGenerator.nextLong() >>>1;
message.setJMSMessageID("ID:" + randomMessageID);
sender.send(message);
System.out.println("Sent message with JMSMessageID = " + message.getJMSMessageID());
}
ServiceBusNamespace serviceBusNamespace = azure.serviceBusNamespaces()
.define("newSBNamespace")
.withRegion(Region.US_EAST)
.withNewResourceGroup("myResourceGroup")
.withSku(NamespaceSku.PREMIUM_CAPACITY1)
.create();
Topic topic = serviceBusNamespace.topics().define("mySBTopic")
.withSizeInMB(2048)
.create();
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/servicebus/managementapi)
## Samples
Explore [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
[Manage Service Bus queues](https://github.com/Azure-Samples/service-bus-java-manage-queue-with-basic-features)
[Create and subscribe to Service Bus topics](https://github.com/Azure-Samples/service-bus-java-manage-publish-subscribe-with-basic-features)
Explore more [sample Java code for Azure Service Bus](https://azure.microsoft.com/resources/samples/?platform=java&term=bus) you can use in your apps.

Просмотреть файл

@ -1,34 +1,32 @@
---
title: Azure SQL Database libraries for Java
description:
description: Connect to Azure SQL database using the JDBC driver or mangement Azure SQL database instances with the management API.
keywords: Azure, Java, SDK, API, SQL, database , JDBC
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 05/17/2017
ms.topic: article
ms.date: 07/05/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: appservice
ms.service: sql-database
---
# Azure SQL Database libraries for Java
## Overview
Work with data stored in [Azure SQL Database](https://docs.microsoft.com/azure/sql-database/sql-database-technical-overview) from Java with the Azure SQL database JDBC driver. The driver can be used to issue SQL queries directly from your code through JDBC or through data access frameworks like [Spring Data JPA](http://projects.spring.io/spring-data-jpa/) and [Hibernate](http://hibernate.org/orm/).
[Azure SQL Database](/azure/sql-database/sql-database-technical-overview) is a relational database service using the Microsoft SQL Server engine that supports table, JSON, spatial, and XML data.
The management libraries provide an interface to create, manage, and scale Azure SQL Database deployments from your Java code. Set up and manage databases in [elastic pools](https://docs.microsoft.com/en-us/azure/sql-database/sql-database-elastic-pool) to share resources and configure databases across multiple regions from your code.
To get started with Azure SQL Database, see [Azure SQL Database: Use Java to connect and query data](/azure/sql-database/sql-database-connect-query-java).
- [Client library](https://docs.microsoft.com/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server)
- [Management API](https://docs.microsoft.com/java/api/overview/azure/sql/managementapi)
## Client JDBC driver
## Import the libraries
Connect to Azure SQL Database from your applications using the [SQL Database JDBC driver](/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server). You can use the [Java JDBC API](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) to directly connect with the database or use data access frameworks that interact with the database through JDBC such as [Hibernate](http://hibernate.org/).
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client JDBC driver in your project.
### JDBC driver
```XML
<dependency>
@ -38,7 +36,25 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
</dependency>
```
### Management
### Example
Connect to SQL database and select all records in a table using JDBC.
```java
String connectionString = "jdbc:sqlserver://fabrikam.database.windows.net:1433;database=fiber;user=raisa;password=testpass;encrypt=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;";
try {
Connection conn = DriverManager.getConnection(connectionString);
Statement statement = conn.createStatement();
ResultSet resultSet = statement.executeQuery("SELECT * FROM SALES");
}
```
## Management API
Create and manage Azure SQL Database resources in your subscription with the management API.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
@ -48,24 +64,25 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
</dependency>
```
## Example
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/sql/managementapi)
Connect to a Azure SQL database and select all records in the sales table.
### Example
Create a SQL Database resource and restrict access to a range of IP addresses using a firewall rule.
```java
String url = String.format("jdbc:sqlserver://%s.database.windows.net:1433;database=%s;user=%s;password=%s;encrypt=true;hostNameInCertificate=*.database.windows.net;loginTimeout=30;", hostName, dbName, user, password);
Connection connection = null;
try {
connection = DriverManager.getConnection(url);
String selectSql = "SELECT * FROM SALES";
Statement statement = connection.createStatement();
ResultSet resultSet = statement.executeQuery(selectSql);
}
SqlServer sqlServer = azure.sqlServers().define(sqlDbName)
.withRegion(Region.US_EAST)
.withNewResourceGroup(resourceGroupName)
.withAdministratorLogin(administratorLogin)
.withAdministratorPassword(administratorPassword)
.withNewFirewallRule("172.16.0.0", "172.31.255.255")
.create();
```
## Samples
[!INCLUDE [java-sql-samples](../docs-ref-conceptual/includes/java-sql-samples.md)]
[!INCLUDE [java-sql-samples](../docs-ref-conceptual/includes/sql.md)]
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
Explore more [sample Java code for Azure SQL Database](https://azure.microsoft.com/resources/samples/?platform=java&term=SQL) you can use in your apps.

Просмотреть файл

@ -13,67 +13,90 @@ ms.devlang: java
ms.service: storage
---
# Azure Storage libraries
# Azure Storage libraries for Java
## Overview
Use the Azure Storage client libraries to:
Read and write files, blob (object) data, key-value pairs, and messages from your Java applications with [Azure Storage](/azure/storage/storage-introduction).
- Read and write objects and files from [Azure Blob storage](https://docs.microsoft.com/azure/storage/storage-java-how-to-use-blob-storage)
- Send and receive messages between cloud-connected applications with [Azure Queue storage](https://docs.microsoft.com/azure/storage/storage-java-how-to-use-queue-storage)
- Read and write large structured data with [Azure Table storage](https://docs.microsoft.com/azure/storage/storage-java-how-to-use-table-storage)
- Share storage between apps with [Azure File storage](https://docs.microsoft.com/azure/storage/storage-java-how-to-use-file-storage)
To get started with Azure Storage, see [How to use Blob storage from Java](/azure/storage/storage-java-how-to-use-blob-storage).
Create, update, and manage Azure Storage accounts and query and regenerate access keys from your Java code with the management libraries.
## Client library
## Import the libraries
Use [connection strings](/azure/storage/storage-create-storage-account#manage-your-storage-account) to connect to an Azure Storage account, then use the client libraries' classes and methods to work with blob, table, file, or queue storage.
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
### Client
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the client library in your project.
```XML
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-storage</artifactId>
<version>5.0.0</version>
<version>5.3.1</version>
</dependency>
```
### Management
### Example
Write a image file from the local file system into a new blob in an existing Azure Storage blob container.
```java
String storageConnectionString = "DefaultEndpointsProtocol=https;" +
"AccountName=fabrikamblobstorage;" +
"AccountKey=keyvalue;EndpointSuffix=core.windows.net";
CloudStorageAccount account = CloudStorageAccount.parse(storageConnectionString);
CloudBlobClient serviceClient = account.createCloudBlobClient();
CloudBlobContainer container = serviceClient.getContainerReference(blobContainer);
// write a blob from a local filesystem path to the container as logo.png
CloudBlockBlob blob = container.getBlockBlobReference("logo.png");
blob.uploadFromFile("/Users/raisa/fabrikam.png");
```
> [!div class="nextstepaction"]
> [Explore the Client APIs](/java/api/overview/azure/storage/clientlibrary)
## Management API
Crete and manage Azure Storage accounts and connection keys with the management API.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
dependency>
<dependency>
    <groupId>com.microsoft.azure</groupId>
    <artifactId>azure-mgmt-storage</artifactId>
    <version>1.1.2</version>
</dependency
```
## Example
### Example
Write a new blob to an existing storage container using a provided [storage account connection string](https://docs.microsoft.com/en-us/azure/storage/storage-configure-connection-string).
Create a new Azure Storage account in your subscription and retrieve its access keys.
```java
// create a CloudBlobClient to interact with
//the blob storage in this Azure Storage account
CloudStorageAccount account = CloudStorageAccount.parse(storageConnection);
CloudBlobClient serviceClient = account.createCloudBlobClient();
StorageAccount storageAccount = azure.storageAccounts().define(storageAccountName)
.withRegion(Region.US_EAST)
.withNewResourceGroup(rgName)
.create();
// Container name must be lower case.
CloudBlobContainer container = serviceClient.getContainerReference("testcontainer");
// write a blob to the container
CloudBlockBlob blob = container.getBlockBlobReference("newlogo.png");
blob.uploadFromFile("/Users/raisa/fabrikam.png");
// get a list of storage account keys related to the account
List<StorageAccountKey> storageAccountKeys = storageAccount.getKeys();
for(StorageAccountKey key : storageAccountKeys) {
System.out.println("Key name: " + key.keyName() + " with value "+ key.value());
}
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/storage/managementapi)
## Samples
| | |
|--|--|
| [Get started with Azure Blob Storage in Java](https://azure.microsoft.com/en-us/resources/samples/storage-blob-java-getting-started/) | Create, read, update, restrict access, and delete files and objects in Azure Storage. |
| [Get started with Azure Queue Storage in Java](https://azure.microsoft.com/en-us/resources/samples/storage-queue-java-getting-started/) | Insert, peek, retrieve and delete messages from Azure Storage queues. |
| [Manage Azure Storage accounts](https://docs.microsoft.com/java/azure/java-sdk-manage-storage-accounts) | Create, update , and delete storage accounts. Retrieve and regenerate storage account access keys.
[Manage Azure Storage accounts](../docs-ref-conceptual/java-sdk-manage-storage-accounts.md)
[Read and write objects to blob storage](https://github.com/Azure-Samples/storage-blob-java-getting-started)
[Read and write messages with queues](https://github.com/Azure-Samples/storage-queue-java-getting-started)
[Read files from blob storage in a web app](https://github.com/Azure-Samples/app-service-java-manage-storage-connections-for-web-apps-on-linux)
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
Explore more [sample Java code for Azure Storage](https://azure.microsoft.com/resources/samples/?platform=java&term=storage) you can use in your apps.

Просмотреть файл

@ -0,0 +1,61 @@
---
title: Azure Traffic Manager libraries for Java
description: Reference documentation for the Java Traffic Manager management libraries
keywords: Azure, Java, SDK, API, load balancing, load distribution, network, Traffic Manager
author: rloutlaw
ms.author: routlaw
manager: douge
ms.date: 07/11/2017
ms.topic: reference
ms.prod: azure
ms.technology: azure
ms.devlang: java
ms.service: traffic-manager
---
# Azure Traffic Manager libraries for Java
## Overview
Control the distribution of user traffic for service endpoints in different datacenters with [Azure Traffic Manager](/azure/traffic-manager/traffic-manager-overview).
To get started with Azure Traffic Manager, see [Create a Traffic Manager profile](/azure/traffic-manager/traffic-manager-create-profile).
## Management API
Create Traffic Manager profiles, define endpoints, and change the routing method with the management API.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-mgmt-trafficmanager</artifactId>
<version>1.1.2</version>
</dependency>
```
## Example
Create a Traffic Manager profile and assign a single endpoint.
```java
TrafficManagerProfile tmProfile = azure.trafficManagerProfiles().define("testTMProfile")
.withNewResourceGroup(Region.US_EAST)
.withLeafDomainLabel("testTMProfile")
.withPriorityBasedRouting()
.defineAzureTargetEndpoint("endpoint")
.toResourceId(webAppId)
.withRoutingPriority(1)
.attach()
.create();
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/trafficmanager/managementapi)
## Samples
[Balance web app traffic across multiple regions](https://github.com/Azure-Samples/traffic-manager-java-manage-profiles)
Explore more [sample Java code for Azure Traffic Manager](https://azure.microsoft.com/resources/samples/?platform=java&term=traffic) you can use in your apps.

Просмотреть файл

@ -17,11 +17,15 @@ ms.service: compute
## Overview
Define, configure, and deploy new Windows and Linux virtual machines and virtual machine scale sets from your code with the Azure management libraries for Java. The libraries also let start and stop existing virtual machines and attach or detach disks to stopped VMs in your subscription.
On-demand, scalable computing resources running Linux or Windows.
## Import the libraries
To get started with Azure virtual machines, see [Create a Linux virtual machine with the Azure portal](/azure/virtual-machines/linux/quick-create-portal).
Add a dependency to your Maven project's `pom.xml` file to use the libraries in your own project.
## Management API
Create, configure, and scale out Windows and Linux virtual machines in Azure from your code with the management API.
[Add a dependency](https://maven.apache.org/guides/getting-started/index.html#How_do_I_use_external_dependencies) to your Maven `pom.xml` file to use the management API in your project.
```XML
<dependency>
@ -31,9 +35,10 @@ Add a dependency to your Maven project's `pom.xml` file to use the libraries in
</dependency>
```
## Example
Create a new Linux virtual machine from a marketplace image in an existing Azure resource group.
Create a new Linux virtual machine in a new Azure resource group.
```java
VirtualMachine newLinuxVm = azure.virtualMachines().define(linuxVmName)
@ -42,15 +47,29 @@ VirtualMachine newLinuxVm = azure.virtualMachines().define(linuxVmName)
.withNewPrimaryNetwork("10.0.0.0/28")
.withPrimaryPrivateIpAddressDynamic()
.withoutPrimaryPublicIpAddress()
.withPopularWindowsImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS)
.withPopularLinuxImage(KnownLinuxVirtualMachineImage.UBUNTU_SERVER_16_04_LTS)
.withRootUsername(userName)
.withSshKey(key)
.withSize(VirtualMachineSizeTypes.STANDARD_D3_V2)
.create();
```
> [!div class="nextstepaction"]
> [Explore the Management APIs](/java/api/overview/azure/virtualmachines/managementapi)
## Samples
[!INCLUDE [java-vm-samples](../docs-ref-conceptual/includes/java-vm-samples.md)]
[Manage virtual machines][1]
[Manage virtual networks][6]
[Create a virtual machine from a custom image][2]
[Create virtual machines across regions in parallel][5]
[Create a virtual machine scale set with a load balancer][7]
Explore more [sample Java code](https://azure.microsoft.com/resources/samples/?platform=java) you can use in your apps.
[1]: ../docs-ref-conceptual/java-sdk-manage-virtual-machines.md
[2]: https://azure.microsoft.com/resources/samples/managed-disk-java-create-virtual-machine-using-custom-image/
[5]: ../docs-ref-conceptual/java-sdk-virtual-machines-in-parallel.md
[6]: ../docs-ref-conceptual/java-sdk-manage-virtual-networks.md
[7]: ../docs-ref-conceptual/java-sdk-manage-vm-scalesets.md
Explore more [sample Java code for Azure virtual machines](https://azure.microsoft.com/resources/samples/?platform=java&term=VM) you can use in your apps.