Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.1.0-beta.4 (Unreleased)
## 1.0.0-beta.1 (2023-05-12)

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

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-redisenterprise</artifactId>
<version>1.1.0-beta.3</version>
<version>1.1.0-beta.4</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,7 @@ public final class PrivateEndpointConnectionsDeleteSamples {
*/
public static void redisEnterpriseDeletePrivateEndpointConnection(
com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
manager
.privateEndpointConnections()
.deleteWithResponse("rg1", "cache1", "pectest01", com.azure.core.util.Context.NONE);
manager.privateEndpointConnections().delete("rg1", "cache1", "pectest01", com.azure.core.util.Context.NONE);
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public RedisEnterpriseManager authenticate(TokenCredential credential, AzureProf
.append("-")
.append("com.azure.resourcemanager.redisenterprise")
.append("/")
.append("1.1.0-beta.3");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,22 @@ PrivateEndpointConnectionInner put(
PrivateEndpointConnectionInner properties,
Context context);

/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
* resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String clusterName, String privateEndpointConnectionName);

/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
*
Expand All @@ -173,10 +189,10 @@ PrivateEndpointConnectionInner put(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link Response}.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteWithResponse(
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);

/**
Expand All @@ -192,4 +208,19 @@ Response<Void> deleteWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName);

/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
* resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context);
}
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ Mono<Response<Flux<ByteBuffer>>> put(
@Headers({"Content-Type: application/json"})
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/privateEndpointConnections/{privateEndpointConnectionName}")
@ExpectedResponses({200, 204})
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Void>> delete(
Mono<Response<Flux<ByteBuffer>>> delete(
@HostParam("$host") String endpoint,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("clusterName") String clusterName,
Expand Down Expand Up @@ -830,7 +830,7 @@ public PrivateEndpointConnectionInner put(
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Void>> deleteWithResponseAsync(
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
if (this.client.getEndpoint() == null) {
return Mono
Expand Down Expand Up @@ -888,7 +888,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Void>> deleteWithResponseAsync(
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
Expand Down Expand Up @@ -929,6 +929,92 @@ private Mono<Response<Void>> deleteWithResponseAsync(
context);
}

/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
* resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link PollerFlux} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
Mono<Response<Flux<ByteBuffer>>> mono =
deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName);
return this
.client
.<Void, Void>getLroResult(
mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}

/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
* resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link PollerFlux} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
context = this.client.mergeContext(context);
Mono<Response<Flux<ByteBuffer>>> mono =
deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context);
return this
.client
.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
}

/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
* resource.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
return this.beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).getSyncPoller();
}

/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
* resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of long-running operation.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
return this
.beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context)
.getSyncPoller();
}

/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
*
Expand All @@ -943,8 +1029,9 @@ private Mono<Response<Void>> deleteWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> deleteAsync(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
return deleteWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName)
.flatMap(ignored -> Mono.empty());
return beginDeleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}

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

/**
Expand All @@ -979,6 +1068,24 @@ public Response<Void> deleteWithResponse(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE);
deleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName).block();
}

/**
* Deletes the specified private endpoint connection associated with the RedisEnterprise cluster.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
* @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure
* resource.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
deleteAsync(resourceGroupName, clusterName, privateEndpointConnectionName, context).block();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,15 @@ public PrivateEndpointConnection get(
}
}

public Response<Void> deleteWithResponse(
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
return this
.serviceClient()
.deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context);
}

public void delete(String resourceGroupName, String clusterName, String privateEndpointConnectionName) {
this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName);
}

public void delete(
String resourceGroupName, String clusterName, String privateEndpointConnectionName, Context context) {
this.serviceClient().delete(resourceGroupName, clusterName, privateEndpointConnectionName, context);
}

public PrivateEndpointConnection getById(String id) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
Expand Down Expand Up @@ -168,10 +166,10 @@ public void deleteById(String id) {
"The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
id)));
}
this.deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE);
this.delete(resourceGroupName, clusterName, privateEndpointConnectionName, Context.NONE);
}

public Response<Void> deleteByIdWithResponse(String id, Context context) {
public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER
Expand All @@ -198,7 +196,7 @@ public Response<Void> deleteByIdWithResponse(String id, Context context) {
"The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.",
id)));
}
return this.deleteWithResponse(resourceGroupName, clusterName, privateEndpointConnectionName, context);
this.delete(resourceGroupName, clusterName, privateEndpointConnectionName, context);
}

private PrivateEndpointConnectionsClient serviceClient() {
Expand Down
Loading