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-10-03)

- 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-10. 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 @@ -2,7 +2,7 @@

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).
This package contains Microsoft Azure SDK for RedisEnterprise Management SDK. REST API for managing Redis Enterprise resources in Azure. Package tag package-preview-2023-10. 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

Expand Down 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 Expand Up @@ -74,6 +74,16 @@ See [API design][design] for general introduction on design and key concepts on

## Examples

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


Expand Down Expand Up @@ -103,3 +113,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/

![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fredisenterprise%2Fazure-resourcemanager-redisenterprise%2FREADME.png)
84 changes: 55 additions & 29 deletions sdk/redisenterprise/azure-resourcemanager-redisenterprise/SAMPLE.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for RedisEnterprise Management</name>
<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>
<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-10.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
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 Expand Up @@ -370,8 +370,10 @@ public Skus skus() {
}

/**
* @return Wrapped service client RedisEnterpriseManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
* Gets wrapped service client RedisEnterpriseManagementClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
*
* @return Wrapped service client RedisEnterpriseManagementClient.
*/
public RedisEnterpriseManagementClient serviceClient() {
return this.clientObject;
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 @@ -12,6 +12,7 @@
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.redisenterprise.fluent.models.ClusterInner;
import com.azure.resourcemanager.redisenterprise.models.CheckNameAvailabilityParameters;
import com.azure.resourcemanager.redisenterprise.models.ClusterUpdate;

/** An instance of this class provides access to all the operations defined in RedisEnterprisesClient. */
Expand Down Expand Up @@ -264,4 +265,30 @@ Response<ClusterInner> getByResourceGroupWithResponse(
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<ClusterInner> list(Context context);

/**
* Checks that the Redis Enterprise cache name is valid and is not already in use.
*
* @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource
* type is 'Microsoft.Cache/redisenterprise'.
* @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.
* @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> checkNameAvailabilityWithResponse(CheckNameAvailabilityParameters parameters, Context context);

/**
* Checks that the Redis Enterprise cache name is valid and is not already in use.
*
* @param parameters Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource
* type is 'Microsoft.Cache/redisenterprise'.
* @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 checkNameAvailability(CheckNameAvailabilityParameters parameters);
}
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();
}
}
Loading