Skip to content

Commit b45e694

Browse files
author
SDKAuto
committed
CodeGen from PR 20693 in Azure/azure-rest-api-specs
Merge 1b1b28a861912fb07eb40eca71cca2caf9a1b5ce into af1be2677e619e483210064ff658e62ec25053aa
1 parent 3ec342d commit b45e694

File tree

250 files changed

+1916
-1559
lines changed

Some content is hidden

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

250 files changed

+1916
-1559
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.5 (Unreleased)
3+
## 1.0.0-beta.1 (2022-09-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-07. 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-2022-02. 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-07. 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.4</version>
35+
<version>1.0.0-beta.5</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

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

Lines changed: 80 additions & 75 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-2022-02.</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-07.</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: 106 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@
1010
import com.azure.core.http.HttpPipelineBuilder;
1111
import com.azure.core.http.HttpPipelinePosition;
1212
import com.azure.core.http.policy.AddDatePolicy;
13+
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
1314
import com.azure.core.http.policy.HttpLogOptions;
1415
import com.azure.core.http.policy.HttpLoggingPolicy;
1516
import com.azure.core.http.policy.HttpPipelinePolicy;
1617
import com.azure.core.http.policy.HttpPolicyProviders;
1718
import com.azure.core.http.policy.RequestIdPolicy;
19+
import com.azure.core.http.policy.RetryOptions;
1820
import com.azure.core.http.policy.RetryPolicy;
1921
import com.azure.core.http.policy.UserAgentPolicy;
2022
import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
@@ -115,6 +117,19 @@ public static KustoManager authenticate(TokenCredential credential, AzureProfile
115117
return configure().authenticate(credential, profile);
116118
}
117119

120+
/**
121+
* Creates an instance of Kusto service API entry point.
122+
*
123+
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
124+
* @param profile the Azure profile for client.
125+
* @return the Kusto service API instance.
126+
*/
127+
public static KustoManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
128+
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
129+
Objects.requireNonNull(profile, "'profile' cannot be null.");
130+
return new KustoManager(httpPipeline, profile, null);
131+
}
132+
118133
/**
119134
* Gets a Configurable instance that can be used to create KustoManager with optional configuration.
120135
*
@@ -126,13 +141,14 @@ public static Configurable configure() {
126141

127142
/** The Configurable allowing configurations to be set. */
128143
public static final class Configurable {
129-
private final ClientLogger logger = new ClientLogger(Configurable.class);
144+
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
130145

131146
private HttpClient httpClient;
132147
private HttpLogOptions httpLogOptions;
133148
private final List<HttpPipelinePolicy> policies = new ArrayList<>();
134149
private final List<String> scopes = new ArrayList<>();
135150
private RetryPolicy retryPolicy;
151+
private RetryOptions retryOptions;
136152
private Duration defaultPollInterval;
137153

138154
private Configurable() {
@@ -193,16 +209,31 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
193209
return this;
194210
}
195211

212+
/**
213+
* Sets the retry options for the HTTP pipeline retry policy.
214+
*
215+
* <p>This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
216+
*
217+
* @param retryOptions the retry options for the HTTP pipeline retry policy.
218+
* @return the configurable object itself.
219+
*/
220+
public Configurable withRetryOptions(RetryOptions retryOptions) {
221+
this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
222+
return this;
223+
}
224+
196225
/**
197226
* Sets the default poll interval, used when service does not provide "Retry-After" header.
198227
*
199228
* @param defaultPollInterval the default poll interval.
200229
* @return the configurable object itself.
201230
*/
202231
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
203-
this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
232+
this.defaultPollInterval =
233+
Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
204234
if (this.defaultPollInterval.isNegative()) {
205-
throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
235+
throw LOGGER
236+
.logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
206237
}
207238
return this;
208239
}
@@ -224,7 +255,7 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
224255
.append("-")
225256
.append("com.azure.resourcemanager.kusto")
226257
.append("/")
227-
.append("1.0.0-beta.4");
258+
.append("1.0.0-beta.1");
228259
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
229260
userAgentBuilder
230261
.append(" (")
@@ -242,10 +273,15 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
242273
scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
243274
}
244275
if (retryPolicy == null) {
245-
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
276+
if (retryOptions != null) {
277+
retryPolicy = new RetryPolicy(retryOptions);
278+
} else {
279+
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
280+
}
246281
}
247282
List<HttpPipelinePolicy> policies = new ArrayList<>();
248283
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
284+
policies.add(new AddHeadersFromContextPolicy());
249285
policies.add(new RequestIdPolicy());
250286
policies
251287
.addAll(
@@ -276,15 +312,23 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil
276312
}
277313
}
278314

279-
/** @return Resource collection API of Clusters. */
315+
/**
316+
* Gets the resource collection API of Clusters. It manages Cluster.
317+
*
318+
* @return Resource collection API of Clusters.
319+
*/
280320
public Clusters clusters() {
281321
if (this.clusters == null) {
282322
this.clusters = new ClustersImpl(clientObject.getClusters(), this);
283323
}
284324
return clusters;
285325
}
286326

287-
/** @return Resource collection API of ClusterPrincipalAssignments. */
327+
/**
328+
* Gets the resource collection API of ClusterPrincipalAssignments. It manages ClusterPrincipalAssignment.
329+
*
330+
* @return Resource collection API of ClusterPrincipalAssignments.
331+
*/
288332
public ClusterPrincipalAssignments clusterPrincipalAssignments() {
289333
if (this.clusterPrincipalAssignments == null) {
290334
this.clusterPrincipalAssignments =
@@ -293,15 +337,23 @@ public ClusterPrincipalAssignments clusterPrincipalAssignments() {
293337
return clusterPrincipalAssignments;
294338
}
295339

296-
/** @return Resource collection API of Databases. */
340+
/**
341+
* Gets the resource collection API of Databases.
342+
*
343+
* @return Resource collection API of Databases.
344+
*/
297345
public Databases databases() {
298346
if (this.databases == null) {
299347
this.databases = new DatabasesImpl(clientObject.getDatabases(), this);
300348
}
301349
return databases;
302350
}
303351

304-
/** @return Resource collection API of AttachedDatabaseConfigurations. */
352+
/**
353+
* Gets the resource collection API of AttachedDatabaseConfigurations. It manages AttachedDatabaseConfiguration.
354+
*
355+
* @return Resource collection API of AttachedDatabaseConfigurations.
356+
*/
305357
public AttachedDatabaseConfigurations attachedDatabaseConfigurations() {
306358
if (this.attachedDatabaseConfigurations == null) {
307359
this.attachedDatabaseConfigurations =
@@ -310,7 +362,11 @@ public AttachedDatabaseConfigurations attachedDatabaseConfigurations() {
310362
return attachedDatabaseConfigurations;
311363
}
312364

313-
/** @return Resource collection API of ManagedPrivateEndpoints. */
365+
/**
366+
* Gets the resource collection API of ManagedPrivateEndpoints. It manages ManagedPrivateEndpoint.
367+
*
368+
* @return Resource collection API of ManagedPrivateEndpoints.
369+
*/
314370
public ManagedPrivateEndpoints managedPrivateEndpoints() {
315371
if (this.managedPrivateEndpoints == null) {
316372
this.managedPrivateEndpoints =
@@ -319,7 +375,11 @@ public ManagedPrivateEndpoints managedPrivateEndpoints() {
319375
return managedPrivateEndpoints;
320376
}
321377

322-
/** @return Resource collection API of DatabasePrincipalAssignments. */
378+
/**
379+
* Gets the resource collection API of DatabasePrincipalAssignments. It manages DatabasePrincipalAssignment.
380+
*
381+
* @return Resource collection API of DatabasePrincipalAssignments.
382+
*/
323383
public DatabasePrincipalAssignments databasePrincipalAssignments() {
324384
if (this.databasePrincipalAssignments == null) {
325385
this.databasePrincipalAssignments =
@@ -328,15 +388,23 @@ public DatabasePrincipalAssignments databasePrincipalAssignments() {
328388
return databasePrincipalAssignments;
329389
}
330390

331-
/** @return Resource collection API of Scripts. */
391+
/**
392+
* Gets the resource collection API of Scripts. It manages Script.
393+
*
394+
* @return Resource collection API of Scripts.
395+
*/
332396
public Scripts scripts() {
333397
if (this.scripts == null) {
334398
this.scripts = new ScriptsImpl(clientObject.getScripts(), this);
335399
}
336400
return scripts;
337401
}
338402

339-
/** @return Resource collection API of PrivateEndpointConnections. */
403+
/**
404+
* Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection.
405+
*
406+
* @return Resource collection API of PrivateEndpointConnections.
407+
*/
340408
public PrivateEndpointConnections privateEndpointConnections() {
341409
if (this.privateEndpointConnections == null) {
342410
this.privateEndpointConnections =
@@ -345,39 +413,59 @@ public PrivateEndpointConnections privateEndpointConnections() {
345413
return privateEndpointConnections;
346414
}
347415

348-
/** @return Resource collection API of PrivateLinkResources. */
416+
/**
417+
* Gets the resource collection API of PrivateLinkResources.
418+
*
419+
* @return Resource collection API of PrivateLinkResources.
420+
*/
349421
public PrivateLinkResources privateLinkResources() {
350422
if (this.privateLinkResources == null) {
351423
this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this);
352424
}
353425
return privateLinkResources;
354426
}
355427

356-
/** @return Resource collection API of DataConnections. */
428+
/**
429+
* Gets the resource collection API of DataConnections.
430+
*
431+
* @return Resource collection API of DataConnections.
432+
*/
357433
public DataConnections dataConnections() {
358434
if (this.dataConnections == null) {
359435
this.dataConnections = new DataConnectionsImpl(clientObject.getDataConnections(), this);
360436
}
361437
return dataConnections;
362438
}
363439

364-
/** @return Resource collection API of Operations. */
440+
/**
441+
* Gets the resource collection API of Operations.
442+
*
443+
* @return Resource collection API of Operations.
444+
*/
365445
public Operations operations() {
366446
if (this.operations == null) {
367447
this.operations = new OperationsImpl(clientObject.getOperations(), this);
368448
}
369449
return operations;
370450
}
371451

372-
/** @return Resource collection API of OperationsResults. */
452+
/**
453+
* Gets the resource collection API of OperationsResults.
454+
*
455+
* @return Resource collection API of OperationsResults.
456+
*/
373457
public OperationsResults operationsResults() {
374458
if (this.operationsResults == null) {
375459
this.operationsResults = new OperationsResultsImpl(clientObject.getOperationsResults(), this);
376460
}
377461
return operationsResults;
378462
}
379463

380-
/** @return Resource collection API of OperationsResultsLocations. */
464+
/**
465+
* Gets the resource collection API of OperationsResultsLocations.
466+
*
467+
* @return Resource collection API of OperationsResultsLocations.
468+
*/
381469
public OperationsResultsLocations operationsResultsLocations() {
382470
if (this.operationsResultsLocations == null) {
383471
this.operationsResultsLocations =

0 commit comments

Comments
 (0)