Skip to content

Commit e14c2ff

Browse files
author
SDKAuto
committed
CodeGen from PR 25485 in Azure/azure-rest-api-specs
Merge 8ab851394fc3ea33588d0d57c4887a4e5fb9790a into 75ef4265cb9ade12dbcba88346ed761821d0e0b7
1 parent e856547 commit e14c2ff

File tree

105 files changed

+655
-3114
lines changed

Some content is hidden

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

105 files changed

+655
-3114
lines changed

sdk/redisenterprise/azure-resourcemanager-redisenterprise/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.1.0-beta.4 (Unreleased)
3+
## 1.0.0-beta.1 (2023-08-24)
4+
5+
- Azure Resource Manager RedisEnterprise client library for Java. This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-preview-2023-08. 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/redisenterprise/azure-resourcemanager-redisenterprise/README.md

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

33
Azure Resource Manager RedisEnterprise client library for Java.
44

5-
This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-preview-2023-03. 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 RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-preview-2023-08. 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-redisenterprise</artifactId>
35-
<version>1.1.0-beta.3</version>
35+
<version>1.1.0-beta.4</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -74,6 +74,16 @@ See [API design][design] for general introduction on design and key concepts on
7474

7575
## Examples
7676

77+
```java
78+
cluster = redisEnterpriseManager.redisEnterprises()
79+
.define(clusterName)
80+
.withRegion(REGION)
81+
.withExistingResourceGroup(resourceGroupName)
82+
.withSku(new Sku().withName(SkuName.ENTERPRISE_E10).withCapacity(2))
83+
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE))
84+
.withMinimumTlsVersion(TlsVersion.ONE_TWO)
85+
.create();
86+
```
7787
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/redisenterprise/azure-resourcemanager-redisenterprise/SAMPLE.md)
7888

7989

@@ -103,3 +113,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
103113
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
104114
[coc]: https://opensource.microsoft.com/codeofconduct/
105115
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
116+
117+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fredisenterprise%2Fazure-resourcemanager-redisenterprise%2FREADME.png)

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

Lines changed: 55 additions & 29 deletions
Large diffs are not rendered by default.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for RedisEnterprise Management</name>
21-
<description>This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for managing Redis Enterprise resources in Azure. Package tag package-preview-2023-03.</description>
21+
<description>This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for managing Redis Enterprise resources in Azure. Package tag package-preview-2023-08.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>

sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/RedisEnterpriseManager.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public RedisEnterpriseManager authenticate(TokenCredential credential, AzureProf
227227
.append("-")
228228
.append("com.azure.resourcemanager.redisenterprise")
229229
.append("/")
230-
.append("1.1.0-beta.3");
230+
.append("1.0.0-beta.1");
231231
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
232232
userAgentBuilder
233233
.append(" (")
@@ -370,8 +370,10 @@ public Skus skus() {
370370
}
371371

372372
/**
373-
* @return Wrapped service client RedisEnterpriseManagementClient providing direct access to the underlying
374-
* auto-generated API implementation, based on Azure REST API.
373+
* Gets wrapped service client RedisEnterpriseManagementClient providing direct access to the underlying
374+
* auto-generated API implementation, based on Azure REST API.
375+
*
376+
* @return Wrapped service client RedisEnterpriseManagementClient.
375377
*/
376378
public RedisEnterpriseManagementClient serviceClient() {
377379
return this.clientObject;

sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateEndpointConnectionsClient.java

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,22 @@ PrivateEndpointConnectionInner put(
162162
PrivateEndpointConnectionInner properties,
163163
Context context);
164164

165+
/**
166+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
167+
*
168+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
169+
* @param clusterName The name of the RedisEnterprise cluster.
170+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
171+
* resource.
172+
* @throws IllegalArgumentException thrown if parameters fail the validation.
173+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
174+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
175+
* @return the {@link SyncPoller} for polling of long-running operation.
176+
*/
177+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
178+
SyncPoller<PollResult<Void>, Void> beginDelete(
179+
String resourceGroupName, String clusterName, String privateEndpointConnectionName);
180+
165181
/**
166182
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
167183
*
@@ -173,10 +189,10 @@ PrivateEndpointConnectionInner put(
173189
* @throws IllegalArgumentException thrown if parameters fail the validation.
174190
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
175191
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
176-
* @return the {@link Response}.
192+
* @return the {@link SyncPoller} for polling of long-running operation.
177193
*/
178-
@ServiceMethod(returns = ReturnType.SINGLE)
179-
Response<Void> deleteWithResponse(
194+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
195+
SyncPoller<PollResult<Void>, Void> beginDelete(
180196
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
181197

182198
/**
@@ -192,4 +208,19 @@ Response<Void> deleteWithResponse(
192208
*/
193209
@ServiceMethod(returns = ReturnType.SINGLE)
194210
void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName);
211+
212+
/**
213+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
214+
*
215+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
216+
* @param clusterName The name of the RedisEnterprise cluster.
217+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
218+
* resource.
219+
* @param context The context to associate with this operation.
220+
* @throws IllegalArgumentException thrown if parameters fail the validation.
221+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
222+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
223+
*/
224+
@ServiceMethod(returns = ReturnType.SINGLE)
225+
void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
195226
}

sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterprisesClient.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.azure.core.util.Context;
1313
import com.azure.core.util.polling.SyncPoller;
1414
import com.azure.resourcemanager.redisenterprise.fluent.models.ClusterInner;
15+
import com.azure.resourcemanager.redisenterprise.models.CheckNameAvailabilityParameters;
1516
import com.azure.resourcemanager.redisenterprise.models.ClusterUpdate;
1617

1718
/** An instance of this class provides access to all the operations defined in RedisEnterprisesClient. */
@@ -264,4 +265,30 @@ Response<ClusterInner> getByResourceGroupWithResponse(
264265
*/
265266
@ServiceMethod(returns = ReturnType.COLLECTION)
266267
PagedIterable<ClusterInner> list(Context context);
268+
269+
/**
270+
* Checks that the Redis Enterprise cache name is valid and is not already in use.
271+
*
272+
* @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource
273+
* type is 'Microsoft.Cache/redisenterprise'.
274+
* @param context The context to associate with this operation.
275+
* @throws IllegalArgumentException thrown if parameters fail the validation.
276+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
277+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
278+
* @return the {@link Response}.
279+
*/
280+
@ServiceMethod(returns = ReturnType.SINGLE)
281+
Response<Void> checkNameAvailabilityWithResponse(CheckNameAvailabilityParameters parameters, Context context);
282+
283+
/**
284+
* Checks that the Redis Enterprise cache name is valid and is not already in use.
285+
*
286+
* @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource
287+
* type is 'Microsoft.Cache/redisenterprise'.
288+
* @throws IllegalArgumentException thrown if parameters fail the validation.
289+
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
290+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
291+
*/
292+
@ServiceMethod(returns = ReturnType.SINGLE)
293+
void checkNameAvailability(CheckNameAvailabilityParameters parameters);
267294
}

sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/PrivateEndpointConnectionsClientImpl.java

Lines changed: 117 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ Mono<Response<Flux<ByteBuffer>>> put(
114114
@Headers({"Content-Type: application/json"})
115115
@Delete(
116116
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}")
117-
@ExpectedResponses({200, 204})
117+
@ExpectedResponses({200, 202, 204})
118118
@UnexpectedResponseExceptionType(ManagementException.class)
119-
Mono<Response<Void>> delete(
119+
Mono<Response<Flux<ByteBuffer>>> delete(
120120
@HostParam("$host") String endpoint,
121121
@PathParam("resourceGroupName") String resourceGroupName,
122122
@PathParam("clusterName") String clusterName,
@@ -830,7 +830,7 @@ public PrivateEndpointConnectionInner put(
830830
* @return the {@link Response} on successful completion of {@link Mono}.
831831
*/
832832
@ServiceMethod(returns = ReturnType.SINGLE)
833-
private Mono<Response<Void>> deleteWithResponseAsync(
833+
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
834834
String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
835835
if (this.client.getEndpoint() == null) {
836836
return Mono
@@ -888,7 +888,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(
888888
* @return the {@link Response} on successful completion of {@link Mono}.
889889
*/
890890
@ServiceMethod(returns = ReturnType.SINGLE)
891-
private Mono<Response<Void>> deleteWithResponseAsync(
891+
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
892892
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
893893
if (this.client.getEndpoint() == null) {
894894
return Mono
@@ -929,6 +929,92 @@ private Mono<Response<Void>> deleteWithResponseAsync(
929929
context);
930930
}
931931

932+
/**
933+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
934+
*
935+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
936+
* @param clusterName The name of the RedisEnterprise cluster.
937+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
938+
* resource.
939+
* @throws IllegalArgumentException thrown if parameters fail the validation.
940+
* @throws ManagementException thrown if the request is rejected by server.
941+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
942+
* @return the {@link PollerFlux} for polling of long-running operation.
943+
*/
944+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
945+
private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
946+
String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
947+
Mono<Response<Flux<ByteBuffer>>> mono =
948+
deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName);
949+
return this
950+
.client
951+
.<Void, Void>getLroResult(
952+
mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
953+
}
954+
955+
/**
956+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
957+
*
958+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
959+
* @param clusterName The name of the RedisEnterprise cluster.
960+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
961+
* resource.
962+
* @param context The context to associate with this operation.
963+
* @throws IllegalArgumentException thrown if parameters fail the validation.
964+
* @throws ManagementException thrown if the request is rejected by server.
965+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
966+
* @return the {@link PollerFlux} for polling of long-running operation.
967+
*/
968+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
969+
private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
970+
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
971+
context = this.client.mergeContext(context);
972+
Mono<Response<Flux<ByteBuffer>>> mono =
973+
deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context);
974+
return this
975+
.client
976+
.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
977+
}
978+
979+
/**
980+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
981+
*
982+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
983+
* @param clusterName The name of the RedisEnterprise cluster.
984+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
985+
* resource.
986+
* @throws IllegalArgumentException thrown if parameters fail the validation.
987+
* @throws ManagementException thrown if the request is rejected by server.
988+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
989+
* @return the {@link SyncPoller} for polling of long-running operation.
990+
*/
991+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
992+
public SyncPoller<PollResult<Void>, Void> beginDelete(
993+
String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
994+
return this.beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).getSyncPoller();
995+
}
996+
997+
/**
998+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
999+
*
1000+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
1001+
* @param clusterName The name of the RedisEnterprise cluster.
1002+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
1003+
* resource.
1004+
* @param context The context to associate with this operation.
1005+
* @throws IllegalArgumentException thrown if parameters fail the validation.
1006+
* @throws ManagementException thrown if the request is rejected by server.
1007+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1008+
* @return the {@link SyncPoller} for polling of long-running operation.
1009+
*/
1010+
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
1011+
public SyncPoller<PollResult<Void>, Void> beginDelete(
1012+
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
1013+
return this
1014+
.beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context)
1015+
.getSyncPoller();
1016+
}
1017+
9321018
/**
9331019
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
9341020
*
@@ -943,8 +1029,9 @@ private Mono<Response<Void>> deleteWithResponseAsync(
9431029
*/
9441030
@ServiceMethod(returns = ReturnType.SINGLE)
9451031
private Mono<Void> deleteAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
946-
return deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName)
947-
.flatMap(ignored -> Mono.empty());
1032+
return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName)
1033+
.last()
1034+
.flatMap(this.client::getLroFinalResultOrError);
9481035
}
9491036

9501037
/**
@@ -958,12 +1045,14 @@ private Mono<Void> deleteAsync(String resourceGroupName, String clusterName, Str
9581045
* @throws IllegalArgumentException thrown if parameters fail the validation.
9591046
* @throws ManagementException thrown if the request is rejected by server.
9601047
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
961-
* @return the {@link Response}.
1048+
* @return A {@link Mono} that completes when a successful response is received.
9621049
*/
9631050
@ServiceMethod(returns = ReturnType.SINGLE)
964-
public Response<Void> deleteWithResponse(
1051+
private Mono<Void> deleteAsync(
9651052
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
966-
return deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block();
1053+
return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context)
1054+
.last()
1055+
.flatMap(this.client::getLroFinalResultOrError);
9671056
}
9681057

9691058
/**
@@ -979,6 +1068,24 @@ public Response<Void> deleteWithResponse(
9791068
*/
9801069
@ServiceMethod(returns = ReturnType.SINGLE)
9811070
public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
982-
deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE);
1071+
deleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).block();
1072+
}
1073+
1074+
/**
1075+
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
1076+
*
1077+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
1078+
* @param clusterName The name of the RedisEnterprise cluster.
1079+
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
1080+
* resource.
1081+
* @param context The context to associate with this operation.
1082+
* @throws IllegalArgumentException thrown if parameters fail the validation.
1083+
* @throws ManagementException thrown if the request is rejected by server.
1084+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1085+
*/
1086+
@ServiceMethod(returns = ReturnType.SINGLE)
1087+
public void delete(
1088+
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
1089+
deleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block();
9831090
}
9841091
}

0 commit comments

Comments
 (0)