Skip to content

Commit

Permalink
CodeGen from PR 13306 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 0db0e958ef1f2d0925567a36da789a1661f01b1f into 086ecb27ae443eb8bc47bfa3ff3331da6d5e7de9
  • Loading branch information
SDKAuto committed Mar 15, 2021
1 parent 8e62058 commit cf7ade5
Show file tree
Hide file tree
Showing 60 changed files with 5,277 additions and 197 deletions.
3 changes: 2 additions & 1 deletion sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2021-03-15)

- Azure Resource Manager Kusto client library for Java. This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2021-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0-beta.1 (2020-12-18)

Expand Down
20 changes: 18 additions & 2 deletions sdk/kusto/azure-resourcemanager-kusto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,21 @@

Azure Resource Manager Kusto client library for Java.

This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2020-09-18. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2021-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.

If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.

Thank you in advance for your collaboration. We really appreciate your time!

## Documentation

Various documentation is available to help you get started

- [API reference documentation][docs]

## Getting started

Expand All @@ -18,7 +32,7 @@ This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Ku
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-kusto</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -75,6 +89,8 @@ For details on contributing to this repository, see the [contributing guide](htt
1. Create new Pull Request

<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/identity/azure-identity
Expand Down
7 changes: 6 additions & 1 deletion sdk/kusto/azure-resourcemanager-kusto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Kusto Management</name>
<description>This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2020-09-18. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt</description>
<description>This package contains Microsoft Azure SDK for Kusto Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2021-01.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down Expand Up @@ -41,6 +41,11 @@
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.14.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-management</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@
import com.azure.resourcemanager.kusto.implementation.DatabasesImpl;
import com.azure.resourcemanager.kusto.implementation.KustoManagementClientBuilder;
import com.azure.resourcemanager.kusto.implementation.OperationsImpl;
import com.azure.resourcemanager.kusto.implementation.OperationsResultsImpl;
import com.azure.resourcemanager.kusto.implementation.ScriptsImpl;
import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfigurations;
import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignments;
import com.azure.resourcemanager.kusto.models.Clusters;
import com.azure.resourcemanager.kusto.models.DataConnections;
import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignments;
import com.azure.resourcemanager.kusto.models.Databases;
import com.azure.resourcemanager.kusto.models.Operations;
import com.azure.resourcemanager.kusto.models.OperationsResults;
import com.azure.resourcemanager.kusto.models.Scripts;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
Expand All @@ -56,12 +60,16 @@ public final class KustoManager {

private DatabasePrincipalAssignments databasePrincipalAssignments;

private Scripts scripts;

private AttachedDatabaseConfigurations attachedDatabaseConfigurations;

private DataConnections dataConnections;

private Operations operations;

private OperationsResults operationsResults;

private final KustoManagementClient clientObject;

private KustoManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Expand Down Expand Up @@ -180,17 +188,31 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");

StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder
.append("azsdk-java")
.append("-")
.append("com.azure.resourcemanager.kusto")
.append("/")
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
.append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.name"))
.append("; ")
.append(Configuration.getGlobalConfiguration().get("os.version"))
.append("; auto-generated)");
} else {
userAgentBuilder.append(" (auto-generated)");
}

if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List<HttpPipelinePolicy> policies = new ArrayList<>();
policies
.add(
new UserAgentPolicy(
null,
"com.azure.resourcemanager.kusto",
"1.0.0-beta.1",
Configuration.getGlobalConfiguration()));
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
Expand Down Expand Up @@ -244,6 +266,14 @@ public DatabasePrincipalAssignments databasePrincipalAssignments() {
return databasePrincipalAssignments;
}

/** @return Resource collection API of Scripts. */
public Scripts scripts() {
if (this.scripts == null) {
this.scripts = new ScriptsImpl(clientObject.getScripts(), this);
}
return scripts;
}

/** @return Resource collection API of AttachedDatabaseConfigurations. */
public AttachedDatabaseConfigurations attachedDatabaseConfigurations() {
if (this.attachedDatabaseConfigurations == null) {
Expand All @@ -269,6 +299,14 @@ public Operations operations() {
return operations;
}

/** @return Resource collection API of OperationsResults. */
public OperationsResults operationsResults() {
if (this.operationsResults == null) {
this.operationsResults = new OperationsResultsImpl(clientObject.getOperationsResults(), this);
}
return operationsResults;
}

/**
* @return Wrapped service client KustoManagementClient providing direct access to the underlying auto-generated API
* implementation, based on Azure REST API.
Expand Down
Loading

0 comments on commit cf7ade5

Please sign in to comment.