diff --git a/.azure-pipelines/client.test.yml b/.azure-pipelines/client.test.yml
new file mode 100644
index 0000000000000..a65978881ffab
--- /dev/null
+++ b/.azure-pipelines/client.test.yml
@@ -0,0 +1,28 @@
+parameters:
+ name: ''
+ vmImage: ''
+
+jobs:
+- job: ${{ format('Test_{0}', parameters.name) }}
+ dependsOn:
+ - 'Build'
+ pool:
+ vmImage: ${{ parameters.vmImage }}
+
+ steps:
+ - script: |
+ mvn jetty:run-forked -Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode -f pom.client.xml
+ displayName: 'Start Jetty'
+
+ - task: Maven@3
+ displayName: 'Run tests'
+ inputs:
+ mavenPomFile: $(pomFile)
+ options: '--batch-mode' #hides dependencies download progress from CI output
+ mavenOptions: '-Xmx3072m -Dorg.slf4j.simpleLogger.defaultLogLevel=error -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
+ javaHomeOption: 'JDKVersion'
+ jdkVersionOption: '1.8'
+ jdkArchitectureOption: 'x64'
+ publishJUnitResults: true
+ testResultsFiles: '**/TEST-*.xml'
+ goals: 'test'
diff --git a/.azure-pipelines/client.yml b/.azure-pipelines/client.yml
new file mode 100644
index 0000000000000..ef88514a34152
--- /dev/null
+++ b/.azure-pipelines/client.yml
@@ -0,0 +1,46 @@
+trigger:
+- master
+
+jobs:
+- job: 'Build'
+
+ pool:
+ vmImage: 'ubuntu-16.04'
+
+ steps:
+ - task: Maven@3
+ displayName: 'Build and Package'
+ inputs:
+ mavenPomFile: $(pomFile)
+ goals: 'checkstyle:check javadoc:jar source:jar package'
+ options: '--batch-mode -Dmaven.test.skip=true'
+ mavenOptions: '-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
+ javaHomeOption: 'JDKVersion'
+ jdkVersionOption: '1.8'
+ jdkArchitectureOption: 'x64'
+ publishJUnitResults: false
+
+ - powershell: |
+ # use sources files as a marker to find POM files so we can copy them to the output. The sources.jar file is generally
+ # in a target folder next to the pom.xml file so $_.Directory.Parent should get us the folder that contains the POM.
+ dir -r -i *-sources.jar | % { copy (Join-Path $_.Directory.Parent.FullName "pom.xml") (Join-Path $(Build.ArtifactStagingDirectory) $_.Name.Replace("-sources.jar",".pom")) }
+ dir -r -i *.jar | % { copy $_ $(Build.ArtifactStagingDirectory) }
+ displayName: 'Copy JAR and POM files to artifact staging'
+
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish'
+
+- template: client.test.yml
+ parameters:
+ name: Linux
+ vmImage: 'ubuntu-16.04'
+
+- template: client.test.yml
+ parameters:
+ name: macOS
+ vmImage: 'macOS-10.13'
+
+- template: client.test.yml
+ parameters:
+ name: Windows
+ vmImage: 'vs2017-win2016'
diff --git a/README.md b/README.md
index 727a56c9d301a..43a115ee3ef5f 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,12 @@
-[![Build Status](https://travis-ci.org/Azure/azure-libraries-for-java.svg?style=flat-square&label=build)](https://travis-ci.org/Azure/azure-libraries-for-java)
-
> :warning: *NOTE: The **Azure Libraries for Java** project (resource management APIs with fluent interface design pattern) has moved to http://github.com/azure/azure-libraries-for-java, so please log issues for that project in that new repository. This repository is now dedicated to other, auto-generated, non-management Azure SDKs only.*
# Azure SDKs for Java
+| Component | Build Status |
+| --------- | ------------ |
+| Management Libraries | [![Build Status](https://travis-ci.org/Azure/azure-sdk-for-java.svg?branch=master)](https://travis-ci.org/Azure/azure-sdk-for-java) |
+| Client Libraries | [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/azure-sdk-for-java.client)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=17) |
+
:+1: [Try Azure for FREE](http://go.microsoft.com/fwlink/?LinkId=330212)
This repository contains Azure SDKs enabling the programmatic *consumption* of miscellaneous Azure services (i.e. *not management* - for that see http://github.com/azure/azure-libraries-for-java)
diff --git a/api-specs.json b/api-specs.json
index 2187614d8f1cb..a942a45d0c703 100644
--- a/api-specs.json
+++ b/api-specs.json
@@ -3,6 +3,10 @@
"source": "specification/applicationinsights/resource-manager/readme.md",
"args": "--multiapi --fluent"
},
+ "applicationinsights/data-plane": {
+ "source": "specification/applicationinsights/data-plane/readme.md",
+ "args": "--payload-flattening-threshold=1"
+ },
"appservice/resource-manager": {
"source": "specification/web/resource-manager/readme.md",
"args": "--multiapi --fluent",
@@ -36,6 +40,14 @@
},
"containerregistry/resource-manager": {
"source": "specification/containerregistry/resource-manager/readme.md",
+ "args": "--multiapi=true --fluent=true"
+ },
+ "datalakeanalytics/resource-manager": {
+ "source": "specification/datalake-analytics/resource-manager/readme.md",
+ "args": "--multiapi --fluent"
+ },
+ "datalakestore/resource-manager": {
+ "source": "specification/datalake-store/resource-manager/readme.md",
"args": "--multiapi --fluent"
},
"dns/resource-manager": {
@@ -50,6 +62,10 @@
"source": "specification/eventgrid/data-plane/readme.md",
"args": "--multiapi"
},
+ "hdinsight/resource-manager": {
+ "source": "specification/hdinsight/resource-manager/readme.md",
+ "args": "--multiapi --fluent"
+ },
"iotcentral/resource-manager": {
"source": "specification/iotcentral/resource-manager/readme.md",
"args": "--multiapi --fluent",
@@ -68,10 +84,18 @@
"source": "specification/keyvault/resource-manager/readme.md",
"args": "--multiapi --fluent"
},
+ "loganalytics/data-plane": {
+ "source": "specification/operationalinsights/data-plane/readme.md",
+ "args": "--payload-flattening-threshold=1 --override-client-name=LogAnalyticsDataClient"
+ },
"logic/resource-manager": {
"source": "specification/logic/resource-manager/readme.md",
"args": "--multiapi --fluent"
},
+ "notificationhubs/resource-manager": {
+ "source": "specification/notificationhubs/resource-manager/readme.md",
+ "args": "--multiapi --fluent"
+ },
"mediaservices/resource-manager": {
"source": "specification/mediaservices/resource-manager/readme.md",
"args": "--multiapi --fluent"
diff --git a/applicationinsights/data-plane/README.md b/applicationinsights/data-plane/README.md
new file mode 100644
index 0000000000000..15885629d7289
--- /dev/null
+++ b/applicationinsights/data-plane/README.md
@@ -0,0 +1,50 @@
+# Azure Application Insights
+
+This project provides client tools or utilities in Java that make it easy to query data in [Azure Application Insights](https://azure.microsoft.com/en-us/services/application-insights/). For reference documentation on classes and models, please see the [Azure SDK for Java reference](https://docs.microsoft.com/en-us/java/api/overview/azure/?view=azure-java-stable).
+
+Azure Application Insights provides SDKs for telemtry collection and enables deep analytics via a [rich query language](https://docs.loganalytics.io/index). This SDK provides query access to data already stored in Application Insights. To start monitoring a Java application, take a look at the [quickstart](https://docs.microsoft.com/en-us/azure/application-insights/app-insights-java-quick-start).
+
+## Examples
+
+Please see [here](src/main/java/com/microsoft/azure/applicationinsights/query/samples) for code examples using this SDK.
+
+## Download
+
+### Latest release
+
+To get the binaries of the official Microsoft Azure Log Analytics SDK as distributed by Microsoft, reade for use within your project, you can use Maven.
+
+```xml
+
+ com.microsoft.azure
+ azure-applicationinsights-query
+ LATEST
+
+```
+
+## Prerequisites
+
+- A Java Developer Kit (JDK), v 1.7 or later
+- Maven
+
+## Help and Issues
+
+If you encounter any bugs with these SDKs, please file issues via [Issues](https://github.com/Azure/azure-sdk-for-java/issues) or checkout [StackOverflow for Azure Java SDK](http://stackoverflow.com/questions/tagged/azure-java-sdk).
+
+## Contribute Code
+
+If you would like to become an active contributor to this project please follow the instructions provided in [Microsoft Azure Projects Contribution Guidelines](http://azure.github.io/guidelines.html).
+
+1. Fork it
+2. Create your feature branch (`git checkout -b my-new-feature`)
+3. Commit your changes (`git commit -am 'Add some feature'`)
+4. Push to the branch (`git push origin my-new-feature`)
+5. Create new Pull Request
+
+## More information
+- [Azure Java SDKs](https://docs.microsoft.com/java/azure/)
+- If you don't have a Microsoft Azure subscription you can get a FREE trial account [here](http://go.microsoft.com/fwlink/?LinkId=330212)
+
+---
+
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
\ No newline at end of file
diff --git a/applicationinsights/data-plane/pom.xml b/applicationinsights/data-plane/pom.xml
new file mode 100644
index 0000000000000..7a9e7b65ab7d5
--- /dev/null
+++ b/applicationinsights/data-plane/pom.xml
@@ -0,0 +1,164 @@
+
+
+ 4.0.0
+ com.microsoft.azure
+ azure-applicationinsights-query
+ 1.0.0-Preview-1
+ jar
+ Microsoft Azure SDK for Application Insights Query API
+ This package contains Microsoft Application Insights SDK for retrieving metrics, events, and running queries.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+ 1.6.3
+ record
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+ ${runtime.version}
+
+
+ junit
+ junit
+ 4.12
+ test
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ ${runtime.version}
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ ${runtime.version}
+ test-jar
+ test
+
+
+ com.microsoft.azure
+ azure-arm-client-runtime
+ ${runtime.version}
+
+
+
+
+
+ org.codehaus.mojo
+ properties-maven-plugin
+ 1.0.0
+
+
+ generate-resources
+
+ write-project-properties
+
+
+
+ ${project.build.outputDirectory}/maven.properties
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+
* Copyright (c) Microsoft Corporation. All rights reserved.
+
* Licensed under the MIT License. See License.txt in the project root for
+
* license information.
+
*/
+ ]]>
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.20
+
+ false
+
+ **/Test*.java
+ **/*Test.java
+ **/*Tests.java
+ **/*TestCase.java
+
+
+ ${testMode}
+
+
+
+
+
+
diff --git a/applicationinsights/data-plane/samples/pom.xml b/applicationinsights/data-plane/samples/pom.xml
new file mode 100644
index 0000000000000..9336ce554fa19
--- /dev/null
+++ b/applicationinsights/data-plane/samples/pom.xml
@@ -0,0 +1,76 @@
+
+
+ 4.0.0
+ com.microsoft.azure
+ azure-applicationinsights-query-sample
+ 1.0.0-Preview-1
+ jar
+ Microsoft Azure SDK for Application Insights Query Sample
+ This package contains Microsoft Application Insights Query SDK Sample.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+ UTF-8
+
+ 1.6.3
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ com.microsoft.azure
+ azure-applicationinsights-query
+ ${version}
+
+
+ com.microsoft.azure
+ azure-client-authentication
+ ${runtime.version}
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+
+ 1.7
+
+
+ com.microsoft.azure.management.apigeneration.LangDefinitionProcessor
+
+
+ true
+ true
+
+ true
+ true
+
+
+
+
+
+
\ No newline at end of file
diff --git a/applicationinsights/data-plane/samples/src/main/java/com/microsoft/azure/applicationinsights/query/samples/ApplicationInsightsClientExample.java b/applicationinsights/data-plane/samples/src/main/java/com/microsoft/azure/applicationinsights/query/samples/ApplicationInsightsClientExample.java
new file mode 100644
index 0000000000000..4beac5489e35c
--- /dev/null
+++ b/applicationinsights/data-plane/samples/src/main/java/com/microsoft/azure/applicationinsights/query/samples/ApplicationInsightsClientExample.java
@@ -0,0 +1,81 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ */
+package com.microsoft.azure.applicationinsights.query.samples;
+
+import java.util.ArrayList;
+import java.util.List;
+import com.microsoft.azure.AzureEnvironment;
+import com.microsoft.azure.applicationinsights.query.implementation.ApplicationInsightsDataClientImpl;
+import com.microsoft.azure.applicationinsights.query.models.QueryBody;
+import com.microsoft.azure.applicationinsights.query.models.MetricId;
+import com.microsoft.azure.applicationinsights.query.models.MetricsResult;
+import com.microsoft.azure.applicationinsights.query.models.MetricsResultsItem;
+import com.microsoft.azure.applicationinsights.query.models.MetricsPostBodySchema;
+import com.microsoft.azure.applicationinsights.query.models.MetricsPostBodySchemaParameters;
+import com.microsoft.azure.applicationinsights.query.models.EventType;
+import com.microsoft.azure.applicationinsights.query.models.EventsResult;
+import com.microsoft.azure.applicationinsights.query.models.EventsResults;
+import com.microsoft.azure.applicationinsights.query.models.QueryResults;
+import com.microsoft.azure.applicationinsights.query.models.Column;
+import com.microsoft.azure.credentials.ApplicationTokenCredentials;
+
+/**
+ * Basic query example
+ *
+ */
+public class ApplicationInsightsClientExample
+{
+ public static void main( String[] args )
+ {
+ // ApplicationTokenCredentials work well for service principal authentication
+ ApplicationTokenCredentials credentials = new ApplicationTokenCredentials(
+ "",
+ "",
+ "",
+ AzureEnvironment.AZURE
+ );
+
+ // New up client. Accepts credentials, or a pre-authenticated restClient
+ ApplicationInsightsDataClientImpl client = new ApplicationInsightsDataClientImpl(credentials);
+
+ // Prepare information for query
+ String query = "availabilityResults | take 1";
+ String appId = "";
+ String eventId = "";
+
+ // POST parameters for multiple metrics
+ List parameters = new ArrayList();
+ parameters.add(new MetricsPostBodySchema().withId("1").withParameters(new MetricsPostBodySchemaParameters().withMetricId(MetricId.AVAILABILITY_RESULTSAVAILABILITY_PERCENTAGE)));
+ parameters.add(new MetricsPostBodySchema().withId("2").withParameters(new MetricsPostBodySchemaParameters().withMetricId(MetricId.AVAILABILITY_RESULTSDURATION)));
+
+ // Execute log query
+ QueryResults queryResults = client.querys().execute(appId, new QueryBody().withQuery(query));
+
+ // Metrics
+ MetricsResult metricResultSingle = client.metrics().get(appId, MetricId.AVAILABILITY_RESULTSAVAILABILITY_PERCENTAGE);
+ List metricResultMultiple = client.metrics().getMultiple(appId, parameters);
+ Object metadata = client.metrics().getMetadata(appId);
+
+ // Events
+ EventsResults eventsResultByType = client.events().getByType(appId, EventType.AVAILABILITY_RESULTS);
+ EventsResults eventsResult = client.events().get(appId, EventType.AVAILABILITY_RESULTS, eventId);
+
+ // Process and print results
+ List