Skip to content

Commit ff65080

Browse files
author
SDKAuto
committed
CodeGen from PR 17197 in Azure/azure-rest-api-specs
Merge 0f6fa81285fc40739f8943755d3f33deb03fc0bf into 24b1f9ed9a0768a55b14cced1761a40f7c12b6d2
1 parent 2a6d8bf commit ff65080

File tree

164 files changed

+3446
-1225
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+3446
-1225
lines changed

sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.4 (Unreleased)
3+
## 1.0.0-beta.1 (2022-02-14)
4+
5+
- 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-2022-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
46

57
### Features Added
68

sdk/kusto/azure-resourcemanager-kusto/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager Kusto client library for Java.
44

5-
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-08-27. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
5+
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-2022-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
66

77
## We'd love to hear your feedback
88

@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-kusto</artifactId>
35-
<version>1.0.0-beta.3</version>
35+
<version>1.0.0-beta.4</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

sdk/kusto/azure-resourcemanager-kusto/SAMPLE.md

Lines changed: 332 additions & 160 deletions
Large diffs are not rendered by default.

sdk/kusto/azure-resourcemanager-kusto/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<packaging>jar</packaging>
1414

1515
<name>Microsoft Azure SDK for Kusto Management</name>
16-
<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-08-27.</description>
16+
<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-2022-02.</description>
1717
<url>https://github.com/Azure/azure-sdk-for-java</url>
1818

1919
<licenses>

sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.azure.core.http.HttpClient;
99
import com.azure.core.http.HttpPipeline;
1010
import com.azure.core.http.HttpPipelineBuilder;
11+
import com.azure.core.http.HttpPipelinePosition;
1112
import com.azure.core.http.policy.AddDatePolicy;
1213
import com.azure.core.http.policy.HttpLogOptions;
1314
import com.azure.core.http.policy.HttpLoggingPolicy;
@@ -31,6 +32,7 @@
3132
import com.azure.resourcemanager.kusto.implementation.ManagedPrivateEndpointsImpl;
3233
import com.azure.resourcemanager.kusto.implementation.OperationsImpl;
3334
import com.azure.resourcemanager.kusto.implementation.OperationsResultsImpl;
35+
import com.azure.resourcemanager.kusto.implementation.OperationsResultsLocationsImpl;
3436
import com.azure.resourcemanager.kusto.implementation.PrivateEndpointConnectionsImpl;
3537
import com.azure.resourcemanager.kusto.implementation.PrivateLinkResourcesImpl;
3638
import com.azure.resourcemanager.kusto.implementation.ScriptsImpl;
@@ -43,6 +45,7 @@
4345
import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpoints;
4446
import com.azure.resourcemanager.kusto.models.Operations;
4547
import com.azure.resourcemanager.kusto.models.OperationsResults;
48+
import com.azure.resourcemanager.kusto.models.OperationsResultsLocations;
4649
import com.azure.resourcemanager.kusto.models.PrivateEndpointConnections;
4750
import com.azure.resourcemanager.kusto.models.PrivateLinkResources;
4851
import com.azure.resourcemanager.kusto.models.Scripts;
@@ -51,6 +54,7 @@
5154
import java.util.ArrayList;
5255
import java.util.List;
5356
import java.util.Objects;
57+
import java.util.stream.Collectors;
5458

5559
/**
5660
* Entry point to KustoManager. The Azure Kusto management API provides a RESTful set of web services that interact with
@@ -82,6 +86,8 @@ public final class KustoManager {
8286

8387
private OperationsResults operationsResults;
8488

89+
private OperationsResultsLocations operationsResultsLocations;
90+
8591
private final KustoManagementClient clientObject;
8692

8793
private KustoManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
@@ -218,7 +224,7 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
218224
.append("-")
219225
.append("com.azure.resourcemanager.kusto")
220226
.append("/")
221-
.append("1.0.0-beta.3");
227+
.append("1.0.0-beta.1");
222228
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
223229
userAgentBuilder
224230
.append(" (")
@@ -241,11 +247,24 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
241247
List<HttpPipelinePolicy> policies = new ArrayList<>();
242248
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
243249
policies.add(new RequestIdPolicy());
250+
policies
251+
.addAll(
252+
this
253+
.policies
254+
.stream()
255+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
256+
.collect(Collectors.toList()));
244257
HttpPolicyProviders.addBeforeRetryPolicies(policies);
245258
policies.add(retryPolicy);
246259
policies.add(new AddDatePolicy());
247260
policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
248-
policies.addAll(this.policies);
261+
policies
262+
.addAll(
263+
this
264+
.policies
265+
.stream()
266+
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
267+
.collect(Collectors.toList()));
249268
HttpPolicyProviders.addAfterRetryPolicies(policies);
250269
policies.add(new HttpLoggingPolicy(httpLogOptions));
251270
HttpPipeline httpPipeline =
@@ -358,6 +377,15 @@ public OperationsResults operationsResults() {
358377
return operationsResults;
359378
}
360379

380+
/** @return Resource collection API of OperationsResultsLocations. */
381+
public OperationsResultsLocations operationsResultsLocations() {
382+
if (this.operationsResultsLocations == null) {
383+
this.operationsResultsLocations =
384+
new OperationsResultsLocationsImpl(clientObject.getOperationsResultsLocations(), this);
385+
}
386+
return operationsResultsLocations;
387+
}
388+
361389
/**
362390
* @return Wrapped service client KustoManagementClient providing direct access to the underlying auto-generated API
363391
* implementation, based on Azure REST API.

sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/AttachedDatabaseConfigurationsClient.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ CheckNameResultInner checkNameAvailability(
4242
* @throws IllegalArgumentException thrown if parameters fail the validation.
4343
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4444
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
45-
* @return the result returned from a check name availability request.
45+
* @return the result returned from a check name availability request along with {@link Response}.
4646
*/
4747
@ServiceMethod(returns = ReturnType.SINGLE)
4848
Response<CheckNameResultInner> checkNameAvailabilityWithResponse(
@@ -59,7 +59,8 @@ Response<CheckNameResultInner> checkNameAvailabilityWithResponse(
5959
* @throws IllegalArgumentException thrown if parameters fail the validation.
6060
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6161
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
62-
* @return the list attached database configurations operation response.
62+
* @return the list attached database configurations operation response as paginated response with {@link
63+
* PagedIterable}.
6364
*/
6465
@ServiceMethod(returns = ReturnType.COLLECTION)
6566
PagedIterable<AttachedDatabaseConfigurationInner> listByCluster(String resourceGroupName, String clusterName);
@@ -73,7 +74,8 @@ Response<CheckNameResultInner> checkNameAvailabilityWithResponse(
7374
* @throws IllegalArgumentException thrown if parameters fail the validation.
7475
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
7576
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
76-
* @return the list attached database configurations operation response.
77+
* @return the list attached database configurations operation response as paginated response with {@link
78+
* PagedIterable}.
7779
*/
7880
@ServiceMethod(returns = ReturnType.COLLECTION)
7981
PagedIterable<AttachedDatabaseConfigurationInner> listByCluster(
@@ -104,7 +106,7 @@ AttachedDatabaseConfigurationInner get(
104106
* @throws IllegalArgumentException thrown if parameters fail the validation.
105107
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
106108
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
107-
* @return class representing an attached database configuration.
109+
* @return class representing an attached database configuration along with {@link Response}.
108110
*/
109111
@ServiceMethod(returns = ReturnType.SINGLE)
110112
Response<AttachedDatabaseConfigurationInner> getWithResponse(
@@ -120,9 +122,9 @@ Response<AttachedDatabaseConfigurationInner> getWithResponse(
120122
* @throws IllegalArgumentException thrown if parameters fail the validation.
121123
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
122124
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
123-
* @return class representing an attached database configuration.
125+
* @return the {@link SyncPoller} for polling of class representing an attached database configuration.
124126
*/
125-
@ServiceMethod(returns = ReturnType.SINGLE)
127+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
126128
SyncPoller<PollResult<AttachedDatabaseConfigurationInner>, AttachedDatabaseConfigurationInner> beginCreateOrUpdate(
127129
String resourceGroupName,
128130
String clusterName,
@@ -140,9 +142,9 @@ SyncPoller<PollResult<AttachedDatabaseConfigurationInner>, AttachedDatabaseConfi
140142
* @throws IllegalArgumentException thrown if parameters fail the validation.
141143
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
142144
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
143-
* @return class representing an attached database configuration.
145+
* @return the {@link SyncPoller} for polling of class representing an attached database configuration.
144146
*/
145-
@ServiceMethod(returns = ReturnType.SINGLE)
147+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
146148
SyncPoller<PollResult<AttachedDatabaseConfigurationInner>, AttachedDatabaseConfigurationInner> beginCreateOrUpdate(
147149
String resourceGroupName,
148150
String clusterName,
@@ -199,9 +201,9 @@ AttachedDatabaseConfigurationInner createOrUpdate(
199201
* @throws IllegalArgumentException thrown if parameters fail the validation.
200202
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
201203
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
202-
* @return the completion.
204+
* @return the {@link SyncPoller} for polling of long-running operation.
203205
*/
204-
@ServiceMethod(returns = ReturnType.SINGLE)
206+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
205207
SyncPoller<PollResult<Void>, Void> beginDelete(
206208
String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName);
207209

@@ -215,9 +217,9 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
215217
* @throws IllegalArgumentException thrown if parameters fail the validation.
216218
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
217219
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
218-
* @return the completion.
220+
* @return the {@link SyncPoller} for polling of long-running operation.
219221
*/
220-
@ServiceMethod(returns = ReturnType.SINGLE)
222+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
221223
SyncPoller<PollResult<Void>, Void> beginDelete(
222224
String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName, Context context);
223225

sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/ClusterPrincipalAssignmentsClient.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ CheckNameResultInner checkNameAvailability(
4444
* @throws IllegalArgumentException thrown if parameters fail the validation.
4545
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
4646
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
47-
* @return the result returned from a check name availability request.
47+
* @return the result returned from a check name availability request along with {@link Response}.
4848
*/
4949
@ServiceMethod(returns = ReturnType.SINGLE)
5050
Response<CheckNameResultInner> checkNameAvailabilityWithResponse(
@@ -77,7 +77,7 @@ Response<CheckNameResultInner> checkNameAvailabilityWithResponse(
7777
* @throws IllegalArgumentException thrown if parameters fail the validation.
7878
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
7979
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
80-
* @return a Kusto cluster principalAssignment.
80+
* @return a Kusto cluster principalAssignment along with {@link Response}.
8181
*/
8282
@ServiceMethod(returns = ReturnType.SINGLE)
8383
Response<ClusterPrincipalAssignmentInner> getWithResponse(
@@ -93,9 +93,9 @@ Response<ClusterPrincipalAssignmentInner> getWithResponse(
9393
* @throws IllegalArgumentException thrown if parameters fail the validation.
9494
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
9595
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
96-
* @return class representing a cluster principal assignment.
96+
* @return the {@link SyncPoller} for polling of class representing a cluster principal assignment.
9797
*/
98-
@ServiceMethod(returns = ReturnType.SINGLE)
98+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
9999
SyncPoller<PollResult<ClusterPrincipalAssignmentInner>, ClusterPrincipalAssignmentInner> beginCreateOrUpdate(
100100
String resourceGroupName,
101101
String clusterName,
@@ -113,9 +113,9 @@ SyncPoller<PollResult<ClusterPrincipalAssignmentInner>, ClusterPrincipalAssignme
113113
* @throws IllegalArgumentException thrown if parameters fail the validation.
114114
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
115115
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
116-
* @return class representing a cluster principal assignment.
116+
* @return the {@link SyncPoller} for polling of class representing a cluster principal assignment.
117117
*/
118-
@ServiceMethod(returns = ReturnType.SINGLE)
118+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
119119
SyncPoller<PollResult<ClusterPrincipalAssignmentInner>, ClusterPrincipalAssignmentInner> beginCreateOrUpdate(
120120
String resourceGroupName,
121121
String clusterName,
@@ -172,9 +172,9 @@ ClusterPrincipalAssignmentInner createOrUpdate(
172172
* @throws IllegalArgumentException thrown if parameters fail the validation.
173173
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
174174
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
175-
* @return the completion.
175+
* @return the {@link SyncPoller} for polling of long-running operation.
176176
*/
177-
@ServiceMethod(returns = ReturnType.SINGLE)
177+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
178178
SyncPoller<PollResult<Void>, Void> beginDelete(
179179
String resourceGroupName, String clusterName, String principalAssignmentName);
180180

@@ -188,9 +188,9 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
188188
* @throws IllegalArgumentException thrown if parameters fail the validation.
189189
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
190190
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
191-
* @return the completion.
191+
* @return the {@link SyncPoller} for polling of long-running operation.
192192
*/
193-
@ServiceMethod(returns = ReturnType.SINGLE)
193+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
194194
SyncPoller<PollResult<Void>, Void> beginDelete(
195195
String resourceGroupName, String clusterName, String principalAssignmentName, Context context);
196196

@@ -229,7 +229,8 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
229229
* @throws IllegalArgumentException thrown if parameters fail the validation.
230230
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
231231
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
232-
* @return the list Kusto cluster principal assignments operation response.
232+
* @return the list Kusto cluster principal assignments operation response as paginated response with {@link
233+
* PagedIterable}.
233234
*/
234235
@ServiceMethod(returns = ReturnType.COLLECTION)
235236
PagedIterable<ClusterPrincipalAssignmentInner> list(String resourceGroupName, String clusterName);
@@ -243,7 +244,8 @@ SyncPoller<PollResult<Void>, Void> beginDelete(
243244
* @throws IllegalArgumentException thrown if parameters fail the validation.
244245
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
245246
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
246-
* @return the list Kusto cluster principal assignments operation response.
247+
* @return the list Kusto cluster principal assignments operation response as paginated response with {@link
248+
* PagedIterable}.
247249
*/
248250
@ServiceMethod(returns = ReturnType.COLLECTION)
249251
PagedIterable<ClusterPrincipalAssignmentInner> list(String resourceGroupName, String clusterName, Context context);

0 commit comments

Comments
 (0)