diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md
index 0dca1c43c802f..e66d435bab859 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.1.0-beta.1 (Unreleased)
+## 1.0.0-beta.1 (2022-04-07)
+- 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-2022-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0 (2021-04-21)
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md
index f24d3cf4d35ca..da72586167c05 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/README.md
@@ -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-2021-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-2022-01. 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
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-redisenterprise
- 1.0.0
+ 1.1.0-beta.1
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/redisenterprise/azure-resourcemanager-redisenterprise/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/SAMPLE.md b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/SAMPLE.md
new file mode 100644
index 0000000000000..b105a7c111102
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/SAMPLE.md
@@ -0,0 +1,712 @@
+# Code snippets and samples
+
+
+## Databases
+
+- [Create](#databases_create)
+- [Delete](#databases_delete)
+- [Export](#databases_export)
+- [ForceUnlink](#databases_forceunlink)
+- [Get](#databases_get)
+- [ImportMethod](#databases_importmethod)
+- [ListByCluster](#databases_listbycluster)
+- [ListKeys](#databases_listkeys)
+- [RegenerateKey](#databases_regeneratekey)
+- [Update](#databases_update)
+
+## Operations
+
+- [List](#operations_list)
+
+## OperationsStatus
+
+- [Get](#operationsstatus_get)
+
+## PrivateEndpointConnections
+
+- [Delete](#privateendpointconnections_delete)
+- [Get](#privateendpointconnections_get)
+- [List](#privateendpointconnections_list)
+- [Put](#privateendpointconnections_put)
+
+## PrivateLinkResources
+
+- [ListByCluster](#privatelinkresources_listbycluster)
+
+## RedisEnterprise
+
+- [Create](#redisenterprise_create)
+- [Delete](#redisenterprise_delete)
+- [GetByResourceGroup](#redisenterprise_getbyresourcegroup)
+- [List](#redisenterprise_list)
+- [ListByResourceGroup](#redisenterprise_listbyresourcegroup)
+- [Update](#redisenterprise_update)
+### Databases_Create
+
+```java
+import com.azure.resourcemanager.redisenterprise.models.AofFrequency;
+import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
+import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
+import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
+import com.azure.resourcemanager.redisenterprise.models.LinkedDatabase;
+import com.azure.resourcemanager.redisenterprise.models.Module;
+import com.azure.resourcemanager.redisenterprise.models.Persistence;
+import com.azure.resourcemanager.redisenterprise.models.Protocol;
+import java.util.Arrays;
+
+/** Samples for Databases Create. */
+public final class DatabasesCreateSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesCreate.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDatabasesCreate.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDatabasesCreate(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager
+ .databases()
+ .define("default")
+ .withExistingRedisEnterprise("rg1", "cache1")
+ .withClientProtocol(Protocol.ENCRYPTED)
+ .withPort(10000)
+ .withClusteringPolicy(ClusteringPolicy.ENTERPRISE_CLUSTER)
+ .withEvictionPolicy(EvictionPolicy.ALL_KEYS_LRU)
+ .withPersistence(new Persistence().withAofEnabled(true).withAofFrequency(AofFrequency.ONES))
+ .withModules(
+ Arrays
+ .asList(
+ new Module().withName("RedisBloom").withArgs("ERROR_RATE 0.00 INITIAL_SIZE 400"),
+ new Module().withName("RedisTimeSeries").withArgs("RETENTION_POLICY 20"),
+ new Module().withName("RediSearch")))
+ .create();
+ }
+
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesCreateWithGeoReplication.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDatabasesCreate With Active Geo Replication.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDatabasesCreateWithActiveGeoReplication(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager
+ .databases()
+ .define("default")
+ .withExistingRedisEnterprise("rg1", "cache1")
+ .withClientProtocol(Protocol.ENCRYPTED)
+ .withPort(10000)
+ .withClusteringPolicy(ClusteringPolicy.ENTERPRISE_CLUSTER)
+ .withEvictionPolicy(EvictionPolicy.NO_EVICTION)
+ .withGeoReplication(
+ new DatabasePropertiesGeoReplication()
+ .withGroupNickname("groupName")
+ .withLinkedDatabases(
+ Arrays
+ .asList(
+ new LinkedDatabase()
+ .withId(
+ "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Cache/redisEnterprise/cache1/databases/default"),
+ new LinkedDatabase()
+ .withId(
+ "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default"))))
+ .create();
+ }
+}
+```
+
+### Databases_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases Delete. */
+public final class DatabasesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesDelete.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDatabasesDelete.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDatabasesDelete(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.databases().delete("rg1", "cache1", "db1", Context.NONE);
+ }
+}
+```
+
+### Databases_Export
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters;
+
+/** Samples for Databases Export. */
+public final class DatabasesExportSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesExport.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDatabasesExport.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDatabasesExport(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager
+ .databases()
+ .export(
+ "rg1",
+ "cache1",
+ "default",
+ new ExportClusterParameters()
+ .withSasUri("https://contosostorage.blob.core.window.net/urlToBlobContainer?sasKeyParameters"),
+ Context.NONE);
+ }
+}
+```
+
+### Databases_ForceUnlink
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redisenterprise.models.ForceUnlinkParameters;
+import java.util.Arrays;
+
+/** Samples for Databases ForceUnlink. */
+public final class DatabasesForceUnlinkSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesForceUnlink.json
+ */
+ /**
+ * Sample code: How to unlink a database during a regional outage.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void howToUnlinkADatabaseDuringARegionalOutage(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager
+ .databases()
+ .forceUnlink(
+ "rg1",
+ "cache1",
+ "default",
+ new ForceUnlinkParameters()
+ .withIds(
+ Arrays
+ .asList(
+ "/subscriptions/subid2/resourceGroups/rg2/providers/Microsoft.Cache/redisEnterprise/cache2/databases/default")),
+ Context.NONE);
+ }
+}
+```
+
+### Databases_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases Get. */
+public final class DatabasesGetSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesGet.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDatabasesGet.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDatabasesGet(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.databases().getWithResponse("rg1", "cache1", "default", Context.NONE);
+ }
+}
+```
+
+### Databases_ImportMethod
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters;
+import java.util.Arrays;
+
+/** Samples for Databases ImportMethod. */
+public final class DatabasesImportMethodSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesImport.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDatabasesImport.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDatabasesImport(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager
+ .databases()
+ .importMethod(
+ "rg1",
+ "cache1",
+ "default",
+ new ImportClusterParameters()
+ .withSasUris(
+ Arrays
+ .asList(
+ "https://contosostorage.blob.core.window.net/urltoBlobFile1?sasKeyParameters",
+ "https://contosostorage.blob.core.window.net/urltoBlobFile2?sasKeyParameters")),
+ Context.NONE);
+ }
+}
+```
+
+### Databases_ListByCluster
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases ListByCluster. */
+public final class DatabasesListByClusterSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesListByCluster.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDatabasesListByCluster.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDatabasesListByCluster(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.databases().listByCluster("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### Databases_ListKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Databases ListKeys. */
+public final class DatabasesListKeysSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesListKeys.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDatabasesListKeys.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDatabasesListKeys(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.databases().listKeysWithResponse("rg1", "cache1", "default", Context.NONE);
+ }
+}
+```
+
+### Databases_RegenerateKey
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redisenterprise.models.AccessKeyType;
+import com.azure.resourcemanager.redisenterprise.models.RegenerateKeyParameters;
+
+/** Samples for Databases RegenerateKey. */
+public final class DatabasesRegenerateKeySamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesRegenerateKey.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDatabasesRegenerateKey.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDatabasesRegenerateKey(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager
+ .databases()
+ .regenerateKey(
+ "rg1",
+ "cache1",
+ "default",
+ new RegenerateKeyParameters().withKeyType(AccessKeyType.PRIMARY),
+ Context.NONE);
+ }
+}
+```
+
+### Databases_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redisenterprise.models.Database;
+import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
+import com.azure.resourcemanager.redisenterprise.models.Persistence;
+import com.azure.resourcemanager.redisenterprise.models.Protocol;
+import com.azure.resourcemanager.redisenterprise.models.RdbFrequency;
+
+/** Samples for Databases Update. */
+public final class DatabasesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDatabasesUpdate.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDatabasesUpdate.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDatabasesUpdate(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ Database resource = manager.databases().getWithResponse("rg1", "cache1", "default", Context.NONE).getValue();
+ resource
+ .update()
+ .withClientProtocol(Protocol.ENCRYPTED)
+ .withEvictionPolicy(EvictionPolicy.ALL_KEYS_LRU)
+ .withPersistence(new Persistence().withRdbEnabled(true).withRdbFrequency(RdbFrequency.ONE_TWOH))
+ .apply();
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/OperationsList.json
+ */
+ /**
+ * Sample code: OperationsList.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void operationsList(com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### OperationsStatus_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for OperationsStatus Get. */
+public final class OperationsStatusGetSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/OperationsStatusGet.json
+ */
+ /**
+ * Sample code: OperationsStatusGet.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void operationsStatusGet(com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.operationsStatus().getWithResponse("West US", "testoperationid", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Delete. */
+public final class PrivateEndpointConnectionsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDeletePrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDeletePrivateEndpointConnection.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDeletePrivateEndpointConnection(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.privateEndpointConnections().deleteWithResponse("rg1", "cache1", "pectest01", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections Get. */
+public final class PrivateEndpointConnectionsGetSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseGetPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: RedisEnterpriseGetPrivateEndpointConnection.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseGetPrivateEndpointConnection(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.privateEndpointConnections().getWithResponse("rg1", "cache1", "pectest01", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateEndpointConnections List. */
+public final class PrivateEndpointConnectionsListSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseListPrivateEndpointConnections.json
+ */
+ /**
+ * Sample code: RedisEnterpriseListPrivateEndpointConnections.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseListPrivateEndpointConnections(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.privateEndpointConnections().list("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### PrivateEndpointConnections_Put
+
+```java
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointServiceConnectionStatus;
+import com.azure.resourcemanager.redisenterprise.models.PrivateLinkServiceConnectionState;
+
+/** Samples for PrivateEndpointConnections Put. */
+public final class PrivateEndpointConnectionsPutSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterprisePutPrivateEndpointConnection.json
+ */
+ /**
+ * Sample code: RedisEnterprisePutPrivateEndpointConnection.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterprisePutPrivateEndpointConnection(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager
+ .privateEndpointConnections()
+ .define("pectest01")
+ .withExistingRedisEnterprise("rg1", "cache1")
+ .withPrivateLinkServiceConnectionState(
+ new PrivateLinkServiceConnectionState()
+ .withStatus(PrivateEndpointServiceConnectionStatus.APPROVED)
+ .withDescription("Auto-Approved"))
+ .create();
+ }
+}
+```
+
+### PrivateLinkResources_ListByCluster
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for PrivateLinkResources ListByCluster. */
+public final class PrivateLinkResourcesListByClusterSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseListPrivateLinkResources.json
+ */
+ /**
+ * Sample code: RedisEnterpriseListPrivateLinkResources.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseListPrivateLinkResources(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.privateLinkResources().listByCluster("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### RedisEnterprise_Create
+
+```java
+import com.azure.resourcemanager.redisenterprise.models.Sku;
+import com.azure.resourcemanager.redisenterprise.models.SkuName;
+import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for RedisEnterprise Create. */
+public final class RedisEnterpriseCreateSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseCreate.json
+ */
+ /**
+ * Sample code: RedisEnterpriseCreate.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseCreate(com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager
+ .redisEnterprises()
+ .define("cache1")
+ .withRegion("West US")
+ .withExistingResourceGroup("rg1")
+ .withSku(new Sku().withName(SkuName.ENTERPRISE_FLASH_F300).withCapacity(3))
+ .withTags(mapOf("tag1", "value1"))
+ .withZones(Arrays.asList("1", "2", "3"))
+ .withMinimumTlsVersion(TlsVersion.ONE_TWO)
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### RedisEnterprise_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RedisEnterprise Delete. */
+public final class RedisEnterpriseDeleteSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseDelete.json
+ */
+ /**
+ * Sample code: RedisEnterpriseDelete.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseDelete(com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.redisEnterprises().delete("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### RedisEnterprise_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RedisEnterprise GetByResourceGroup. */
+public final class RedisEnterpriseGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseGet.json
+ */
+ /**
+ * Sample code: RedisEnterpriseGet.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseGet(com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.redisEnterprises().getByResourceGroupWithResponse("rg1", "cache1", Context.NONE);
+ }
+}
+```
+
+### RedisEnterprise_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RedisEnterprise List. */
+public final class RedisEnterpriseListSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseList.json
+ */
+ /**
+ * Sample code: RedisEnterpriseList.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseList(com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.redisEnterprises().list(Context.NONE);
+ }
+}
+```
+
+### RedisEnterprise_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for RedisEnterprise ListByResourceGroup. */
+public final class RedisEnterpriseListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseListByResourceGroup.json
+ */
+ /**
+ * Sample code: RedisEnterpriseListByResourceGroup.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseListByResourceGroup(
+ com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ manager.redisEnterprises().listByResourceGroup("rg1", Context.NONE);
+ }
+}
+```
+
+### RedisEnterprise_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.redisenterprise.models.Cluster;
+import com.azure.resourcemanager.redisenterprise.models.Sku;
+import com.azure.resourcemanager.redisenterprise.models.SkuName;
+import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for RedisEnterprise Update. */
+public final class RedisEnterpriseUpdateSamples {
+ /*
+ * x-ms-original-file: specification/redisenterprise/resource-manager/Microsoft.Cache/stable/2022-01-01/examples/RedisEnterpriseUpdate.json
+ */
+ /**
+ * Sample code: RedisEnterpriseUpdate.
+ *
+ * @param manager Entry point to RedisEnterpriseManager.
+ */
+ public static void redisEnterpriseUpdate(com.azure.resourcemanager.redisenterprise.RedisEnterpriseManager manager) {
+ Cluster resource =
+ manager.redisEnterprises().getByResourceGroupWithResponse("rg1", "cache1", Context.NONE).getValue();
+ resource
+ .update()
+ .withTags(mapOf("tag1", "value1"))
+ .withSku(new Sku().withName(SkuName.ENTERPRISE_FLASH_F300).withCapacity(9))
+ .withMinimumTlsVersion(TlsVersion.ONE_TWO)
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml
index c11bbbe69de3b..14e00bab1254c 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/pom.xml
@@ -1,55 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-redisenterprise
- 1.1.0-beta.1
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-redisenterprise
+ 1.1.0-beta.1
+ jar
- Microsoft Azure SDK for RedisEnterprise Management
- 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-2021-03.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for RedisEnterprise Management
+ 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-2022-01.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core
- 1.27.0
-
-
- com.azure
- azure-core-management
- 1.5.4
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.27.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.4
+
+
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/RedisEnterpriseManager.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/RedisEnterpriseManager.java
index 3b75d0b288ed5..db89d0d0c899d 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/RedisEnterpriseManager.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/RedisEnterpriseManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -39,6 +40,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to RedisEnterpriseManager. REST API for managing Redis Enterprise resources in Azure. */
public final class RedisEnterpriseManager {
@@ -92,11 +94,12 @@ public static Configurable configure() {
/** The Configurable allowing configurations to be set. */
public static final class Configurable {
- private final ClientLogger logger = new ClientLogger(Configurable.class);
+ private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -136,6 +139,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -154,9 +168,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
* @return the configurable object itself.
*/
public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
- this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null.");
+ this.defaultPollInterval =
+ Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
if (this.defaultPollInterval.isNegative()) {
- throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
}
return this;
}
@@ -178,7 +194,7 @@ public RedisEnterpriseManager authenticate(TokenCredential credential, AzureProf
.append("-")
.append("com.azure.resourcemanager.redisenterprise")
.append("/")
- .append("1.0.0");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -192,20 +208,33 @@ public RedisEnterpriseManager authenticate(TokenCredential credential, AzureProf
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
- policies.addAll(this.policies);
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java
index f9f98491e9b61..b891bda86a57b 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/DatabasesClient.java
@@ -15,6 +15,7 @@
import com.azure.resourcemanager.redisenterprise.fluent.models.DatabaseInner;
import com.azure.resourcemanager.redisenterprise.models.DatabaseUpdate;
import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.ForceUnlinkParameters;
import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters;
import com.azure.resourcemanager.redisenterprise.models.RegenerateKeyParameters;
@@ -28,7 +29,7 @@ public interface DatabasesClient {
* @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 all databases in the specified RedisEnterprise cluster.
+ * @return all databases in the specified RedisEnterprise cluster as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByCluster(String resourceGroupName, String clusterName);
@@ -42,7 +43,7 @@ public interface DatabasesClient {
* @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 all databases in the specified RedisEnterprise cluster.
+ * @return all databases in the specified RedisEnterprise cluster as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context);
@@ -57,9 +58,9 @@ public interface DatabasesClient {
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DatabaseInner> beginCreate(
String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters);
@@ -74,9 +75,9 @@ SyncPoller, DatabaseInner> beginCreate(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DatabaseInner> beginCreate(
String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context);
@@ -122,9 +123,9 @@ DatabaseInner create(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DatabaseInner> beginUpdate(
String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters);
@@ -139,9 +140,9 @@ SyncPoller, DatabaseInner> beginUpdate(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, DatabaseInner> beginUpdate(
String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters, Context context);
@@ -201,7 +202,7 @@ DatabaseInner update(
* @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 information about a database in a RedisEnterprise cluster.
+ * @return information about a database in a RedisEnterprise cluster along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -216,9 +217,9 @@ Response getWithResponse(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, String databaseName);
/**
@@ -231,9 +232,9 @@ Response getWithResponse(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String clusterName, String databaseName, Context context);
@@ -273,7 +274,7 @@ SyncPoller, Void> beginDelete(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
AccessKeysInner listKeys(String resourceGroupName, String clusterName, String databaseName);
@@ -288,7 +289,7 @@ SyncPoller, Void> beginDelete(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listKeysWithResponse(
@@ -304,9 +305,9 @@ Response listKeysWithResponse(
* @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 secret access keys used for authenticating connections to redis.
+ * @return the {@link SyncPoller} for polling of access keys.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, AccessKeysInner> beginRegenerateKey(
String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters);
@@ -321,9 +322,9 @@ SyncPoller, AccessKeysInner> beginRegenerateKey(
* @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 secret access keys used for authenticating connections to redis.
+ * @return the {@link SyncPoller} for polling of access keys.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, AccessKeysInner> beginRegenerateKey(
String resourceGroupName,
String clusterName,
@@ -341,7 +342,7 @@ SyncPoller, AccessKeysInner> beginRegenerateKey(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
AccessKeysInner regenerateKey(
@@ -358,7 +359,7 @@ AccessKeysInner regenerateKey(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
AccessKeysInner regenerateKey(
@@ -369,7 +370,7 @@ AccessKeysInner regenerateKey(
Context context);
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -378,14 +379,14 @@ AccessKeysInner regenerateKey(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginImportMethod(
String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters);
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -395,9 +396,9 @@ SyncPoller, Void> beginImportMethod(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginImportMethod(
String resourceGroupName,
String clusterName,
@@ -406,7 +407,7 @@ SyncPoller, Void> beginImportMethod(
Context context);
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -421,7 +422,7 @@ void importMethod(
String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters);
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -450,9 +451,9 @@ void importMethod(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginExport(
String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters);
@@ -467,9 +468,9 @@ SyncPoller, Void> beginExport(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginExport(
String resourceGroupName,
String clusterName,
@@ -510,4 +511,76 @@ void export(
String databaseName,
ExportClusterParameters parameters,
Context context);
+
+ /**
+ * Forcibly removes the link to the specified database resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Information identifying the database to be unlinked.
+ * @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, Void> beginForceUnlink(
+ String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters);
+
+ /**
+ * Forcibly removes the link to the specified database resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Information identifying the database to be unlinked.
+ * @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 SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginForceUnlink(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ForceUnlinkParameters parameters,
+ Context context);
+
+ /**
+ * Forcibly removes the link to the specified database resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Information identifying the database to be unlinked.
+ * @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 forceUnlink(
+ String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters);
+
+ /**
+ * Forcibly removes the link to the specified database resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Information identifying the database to be unlinked.
+ * @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 forceUnlink(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ForceUnlinkParameters parameters,
+ Context context);
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsClient.java
index 1ac3726460ba8..9e09dae539eb5 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsClient.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsClient.java
@@ -17,7 +17,8 @@ public interface OperationsClient {
*
* @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 a list of REST API operations supported by an Azure Resource Provider.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +30,8 @@ public interface OperationsClient {
* @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 a list of REST API operations supported by an Azure Resource Provider.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsStatusClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsStatusClient.java
index 50d86883ae374..6030d77066ada 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsStatusClient.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/OperationsStatusClient.java
@@ -34,7 +34,7 @@ public interface OperationsStatusClient {
* @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 status of operation.
+ * @return the status of operation along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String location, String operationId, Context context);
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateEndpointConnectionsClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateEndpointConnectionsClient.java
index 498c2b25bd922..490e4244a1bac 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateEndpointConnectionsClient.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateEndpointConnectionsClient.java
@@ -23,7 +23,8 @@ public interface PrivateEndpointConnectionsClient {
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account as paginated response
+ * with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String clusterName);
@@ -37,7 +38,8 @@ public interface PrivateEndpointConnectionsClient {
* @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 list of private endpoint connection associated with the specified storage account.
+ * @return list of private endpoint connection associated with the specified storage account as paginated response
+ * with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String clusterName, Context context);
@@ -69,7 +71,8 @@ PrivateEndpointConnectionInner get(
* @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 specified private endpoint connection associated with the RedisEnterprise cluster.
+ * @return the specified private endpoint connection associated with the RedisEnterprise cluster along with {@link
+ * Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -86,9 +89,9 @@ Response getWithResponse(
* @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 Private Endpoint Connection resource.
+ * @return the {@link SyncPoller} for polling of the Private Endpoint Connection resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionInner> beginPut(
String resourceGroupName,
String clusterName,
@@ -107,9 +110,9 @@ SyncPoller, PrivateEndpointConnection
* @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 Private Endpoint Connection resource.
+ * @return the {@link SyncPoller} for polling of the Private Endpoint Connection resource.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, PrivateEndpointConnectionInner> beginPut(
String resourceGroupName,
String clusterName,
@@ -184,7 +187,7 @@ 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 response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateLinkResourcesClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateLinkResourcesClient.java
index 51751bd40324e..6b488e78a6421 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateLinkResourcesClient.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/PrivateLinkResourcesClient.java
@@ -20,7 +20,8 @@ public interface PrivateLinkResourcesClient {
* @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 private link resources that need to be created for a RedisEnterprise cluster.
+ * @return the private link resources that need to be created for a RedisEnterprise cluster as paginated response
+ * with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByCluster(String resourceGroupName, String clusterName);
@@ -34,7 +35,8 @@ public interface PrivateLinkResourcesClient {
* @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 private link resources that need to be created for a RedisEnterprise cluster.
+ * @return the private link resources that need to be created for a RedisEnterprise cluster as paginated response
+ * with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByCluster(
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterprisesClient.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterprisesClient.java
index 31434fe63c020..0e74919287370 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterprisesClient.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/RedisEnterprisesClient.java
@@ -25,9 +25,9 @@ public interface RedisEnterprisesClient {
* @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 describes the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ClusterInner> beginCreate(
String resourceGroupName, String clusterName, ClusterInner parameters);
@@ -41,9 +41,9 @@ SyncPoller, ClusterInner> beginCreate(
* @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 describes the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ClusterInner> beginCreate(
String resourceGroupName, String clusterName, ClusterInner parameters, Context context);
@@ -85,9 +85,9 @@ SyncPoller, ClusterInner> beginCreate(
* @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 describes the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ClusterInner> beginUpdate(
String resourceGroupName, String clusterName, ClusterUpdate parameters);
@@ -101,9 +101,9 @@ SyncPoller, ClusterInner> beginUpdate(
* @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 describes the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ClusterInner> beginUpdate(
String resourceGroupName, String clusterName, ClusterUpdate parameters, Context context);
@@ -144,9 +144,9 @@ SyncPoller, ClusterInner> beginUpdate(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName);
/**
@@ -158,9 +158,9 @@ SyncPoller, ClusterInner> beginUpdate(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context);
/**
@@ -210,7 +210,7 @@ SyncPoller, ClusterInner> beginUpdate(
* @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 information about a RedisEnterprise cluster.
+ * @return information about a RedisEnterprise cluster along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -223,7 +223,7 @@ Response getByResourceGroupWithResponse(
* @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 response of a list-all operation.
+ * @return the response of a list-all operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -236,7 +236,7 @@ Response getByResourceGroupWithResponse(
* @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 response of a list-all operation.
+ * @return the response of a list-all operation as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -246,7 +246,8 @@ Response getByResourceGroupWithResponse(
*
* @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 all RedisEnterprise clusters in the specified subscription.
+ * @return all RedisEnterprise clusters in the specified subscription as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -258,7 +259,8 @@ Response getByResourceGroupWithResponse(
* @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 all RedisEnterprise clusters in the specified subscription.
+ * @return all RedisEnterprise clusters in the specified subscription as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/AccessKeysInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/AccessKeysInner.java
index a95c5c6cf6bf9..b2b7e74f41c92 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/AccessKeysInner.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/AccessKeysInner.java
@@ -5,15 +5,11 @@
package com.azure.resourcemanager.redisenterprise.fluent.models;
import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** The secret access keys used for authenticating connections to redis. */
+/** Access keys The secret access keys used for authenticating connections to redis. */
@Immutable
public final class AccessKeysInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(AccessKeysInner.class);
-
/*
* The current primary key that clients can use to authenticate
*/
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/ClusterInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/ClusterInner.java
index b973c7f294137..968b0cca78121 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/ClusterInner.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/ClusterInner.java
@@ -5,24 +5,19 @@
package com.azure.resourcemanager.redisenterprise.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.Resource;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.redisenterprise.models.ProvisioningState;
import com.azure.resourcemanager.redisenterprise.models.ResourceState;
import com.azure.resourcemanager.redisenterprise.models.Sku;
import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
/** Describes the RedisEnterprise cluster. */
-@JsonFlatten
@Fluent
-public class ClusterInner extends Resource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterInner.class);
-
+public final class ClusterInner extends Resource {
/*
* The SKU to create, which affects price, performance, and features.
*/
@@ -36,41 +31,10 @@ public class ClusterInner extends Resource {
private List zones;
/*
- * The minimum TLS version for the cluster to support, e.g. '1.2'
- */
- @JsonProperty(value = "properties.minimumTlsVersion")
- private TlsVersion minimumTlsVersion;
-
- /*
- * DNS name of the cluster endpoint
- */
- @JsonProperty(value = "properties.hostName", access = JsonProperty.Access.WRITE_ONLY)
- private String hostname;
-
- /*
- * Current provisioning status of the cluster
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
-
- /*
- * Current resource status of the cluster
- */
- @JsonProperty(value = "properties.resourceState", access = JsonProperty.Access.WRITE_ONLY)
- private ResourceState resourceState;
-
- /*
- * Version of redis the cluster supports, e.g. '6'
+ * RedisEnterprise cluster properties Other properties of the cluster.
*/
- @JsonProperty(value = "properties.redisVersion", access = JsonProperty.Access.WRITE_ONLY)
- private String redisVersion;
-
- /*
- * List of private endpoint connections associated with the specified
- * RedisEnterprise cluster
- */
- @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
- private List privateEndpointConnections;
+ @JsonProperty(value = "properties")
+ private ClusterProperties innerProperties;
/**
* Get the sku property: The SKU to create, which affects price, performance, and features.
@@ -112,13 +76,36 @@ public ClusterInner withZones(List zones) {
return this;
}
+ /**
+ * Get the innerProperties property: RedisEnterprise cluster properties Other properties of the cluster.
+ *
+ * @return the innerProperties value.
+ */
+ private ClusterProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
/**
* Get the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'.
*
* @return the minimumTlsVersion value.
*/
public TlsVersion minimumTlsVersion() {
- return this.minimumTlsVersion;
+ return this.innerProperties() == null ? null : this.innerProperties().minimumTlsVersion();
}
/**
@@ -128,7 +115,10 @@ public TlsVersion minimumTlsVersion() {
* @return the ClusterInner object itself.
*/
public ClusterInner withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
- this.minimumTlsVersion = minimumTlsVersion;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withMinimumTlsVersion(minimumTlsVersion);
return this;
}
@@ -138,7 +128,7 @@ public ClusterInner withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
* @return the hostname value.
*/
public String hostname() {
- return this.hostname;
+ return this.innerProperties() == null ? null : this.innerProperties().hostname();
}
/**
@@ -147,7 +137,7 @@ public String hostname() {
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -156,7 +146,7 @@ public ProvisioningState provisioningState() {
* @return the resourceState value.
*/
public ResourceState resourceState() {
- return this.resourceState;
+ return this.innerProperties() == null ? null : this.innerProperties().resourceState();
}
/**
@@ -165,7 +155,7 @@ public ResourceState resourceState() {
* @return the redisVersion value.
*/
public String redisVersion() {
- return this.redisVersion;
+ return this.innerProperties() == null ? null : this.innerProperties().redisVersion();
}
/**
@@ -175,21 +165,7 @@ public String redisVersion() {
* @return the privateEndpointConnections value.
*/
public List privateEndpointConnections() {
- return this.privateEndpointConnections;
- }
-
- /** {@inheritDoc} */
- @Override
- public ClusterInner withLocation(String location) {
- super.withLocation(location);
- return this;
- }
-
- /** {@inheritDoc} */
- @Override
- public ClusterInner withTags(Map tags) {
- super.withTags(tags);
- return this;
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections();
}
/**
@@ -199,14 +175,16 @@ public ClusterInner withTags(Map tags) {
*/
public void validate() {
if (sku() == null) {
- throw logger
+ throw LOGGER
.logExceptionAsError(
new IllegalArgumentException("Missing required property sku in model ClusterInner"));
} else {
sku().validate();
}
- if (privateEndpointConnections() != null) {
- privateEndpointConnections().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ClusterInner.class);
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/ClusterProperties.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/ClusterProperties.java
new file mode 100644
index 0000000000000..431fa987f7126
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/ClusterProperties.java
@@ -0,0 +1,133 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.redisenterprise.models.ProvisioningState;
+import com.azure.resourcemanager.redisenterprise.models.ResourceState;
+import com.azure.resourcemanager.redisenterprise.models.TlsVersion;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * RedisEnterprise cluster properties Properties of RedisEnterprise clusters, as opposed to general resource properties
+ * like location, tags.
+ */
+@Fluent
+public final class ClusterProperties {
+ /*
+ * The minimum TLS version for the cluster to support, e.g. '1.2'
+ */
+ @JsonProperty(value = "minimumTlsVersion")
+ private TlsVersion minimumTlsVersion;
+
+ /*
+ * DNS name of the cluster endpoint
+ */
+ @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY)
+ private String hostname;
+
+ /*
+ * Current provisioning status of the cluster
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Current resource status of the cluster
+ */
+ @JsonProperty(value = "resourceState", access = JsonProperty.Access.WRITE_ONLY)
+ private ResourceState resourceState;
+
+ /*
+ * Version of redis the cluster supports, e.g. '6'
+ */
+ @JsonProperty(value = "redisVersion", access = JsonProperty.Access.WRITE_ONLY)
+ private String redisVersion;
+
+ /*
+ * List of private endpoint connections associated with the specified
+ * RedisEnterprise cluster
+ */
+ @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateEndpointConnections;
+
+ /**
+ * Get the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'.
+ *
+ * @return the minimumTlsVersion value.
+ */
+ public TlsVersion minimumTlsVersion() {
+ return this.minimumTlsVersion;
+ }
+
+ /**
+ * Set the minimumTlsVersion property: The minimum TLS version for the cluster to support, e.g. '1.2'.
+ *
+ * @param minimumTlsVersion the minimumTlsVersion value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withMinimumTlsVersion(TlsVersion minimumTlsVersion) {
+ this.minimumTlsVersion = minimumTlsVersion;
+ return this;
+ }
+
+ /**
+ * Get the hostname property: DNS name of the cluster endpoint.
+ *
+ * @return the hostname value.
+ */
+ public String hostname() {
+ return this.hostname;
+ }
+
+ /**
+ * Get the provisioningState property: Current provisioning status of the cluster.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the resourceState property: Current resource status of the cluster.
+ *
+ * @return the resourceState value.
+ */
+ public ResourceState resourceState() {
+ return this.resourceState;
+ }
+
+ /**
+ * Get the redisVersion property: Version of redis the cluster supports, e.g. '6'.
+ *
+ * @return the redisVersion value.
+ */
+ public String redisVersion() {
+ return this.redisVersion;
+ }
+
+ /**
+ * Get the privateEndpointConnections property: List of private endpoint connections associated with the specified
+ * RedisEnterprise cluster.
+ *
+ * @return the privateEndpointConnections value.
+ */
+ public List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpointConnections() != null) {
+ privateEndpointConnections().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java
index 80d73098f090d..e9b8a3d0ae49f 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseInner.java
@@ -5,76 +5,35 @@
package com.azure.resourcemanager.redisenterprise.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
+import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
import com.azure.resourcemanager.redisenterprise.models.Module;
import com.azure.resourcemanager.redisenterprise.models.Persistence;
import com.azure.resourcemanager.redisenterprise.models.Protocol;
import com.azure.resourcemanager.redisenterprise.models.ProvisioningState;
import com.azure.resourcemanager.redisenterprise.models.ResourceState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** Describes a database on the RedisEnterprise cluster. */
-@JsonFlatten
@Fluent
-public class DatabaseInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseInner.class);
-
- /*
- * Specifies whether redis clients can connect using TLS-encrypted or
- * plaintext redis protocols. Default is TLS-encrypted.
- */
- @JsonProperty(value = "properties.clientProtocol")
- private Protocol clientProtocol;
-
- /*
- * TCP port of the database endpoint. Specified at create time. Defaults to
- * an available port.
- */
- @JsonProperty(value = "properties.port")
- private Integer port;
-
- /*
- * Current provisioning status of the database
- */
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private ProvisioningState provisioningState;
-
- /*
- * Current resource status of the database
- */
- @JsonProperty(value = "properties.resourceState", access = JsonProperty.Access.WRITE_ONLY)
- private ResourceState resourceState;
-
- /*
- * Clustering policy - default is OSSCluster. Specified at create time.
- */
- @JsonProperty(value = "properties.clusteringPolicy")
- private ClusteringPolicy clusteringPolicy;
-
+public final class DatabaseInner extends ProxyResource {
/*
- * Redis eviction policy - default is VolatileLRU
+ * RedisEnterprise database properties Other properties of the database.
*/
- @JsonProperty(value = "properties.evictionPolicy")
- private EvictionPolicy evictionPolicy;
+ @JsonProperty(value = "properties")
+ private DatabaseProperties innerProperties;
- /*
- * Persistence settings
- */
- @JsonProperty(value = "properties.persistence")
- private Persistence persistence;
-
- /*
- * Optional set of redis modules to enable in this database - modules can
- * only be added at creation time.
+ /**
+ * Get the innerProperties property: RedisEnterprise database properties Other properties of the database.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.modules")
- private List modules;
+ private DatabaseProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the clientProtocol property: Specifies whether redis clients can connect using TLS-encrypted or plaintext
@@ -83,7 +42,7 @@ public class DatabaseInner extends ProxyResource {
* @return the clientProtocol value.
*/
public Protocol clientProtocol() {
- return this.clientProtocol;
+ return this.innerProperties() == null ? null : this.innerProperties().clientProtocol();
}
/**
@@ -94,7 +53,10 @@ public Protocol clientProtocol() {
* @return the DatabaseInner object itself.
*/
public DatabaseInner withClientProtocol(Protocol clientProtocol) {
- this.clientProtocol = clientProtocol;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DatabaseProperties();
+ }
+ this.innerProperties().withClientProtocol(clientProtocol);
return this;
}
@@ -105,7 +67,7 @@ public DatabaseInner withClientProtocol(Protocol clientProtocol) {
* @return the port value.
*/
public Integer port() {
- return this.port;
+ return this.innerProperties() == null ? null : this.innerProperties().port();
}
/**
@@ -116,7 +78,10 @@ public Integer port() {
* @return the DatabaseInner object itself.
*/
public DatabaseInner withPort(Integer port) {
- this.port = port;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DatabaseProperties();
+ }
+ this.innerProperties().withPort(port);
return this;
}
@@ -126,7 +91,7 @@ public DatabaseInner withPort(Integer port) {
* @return the provisioningState value.
*/
public ProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -135,7 +100,7 @@ public ProvisioningState provisioningState() {
* @return the resourceState value.
*/
public ResourceState resourceState() {
- return this.resourceState;
+ return this.innerProperties() == null ? null : this.innerProperties().resourceState();
}
/**
@@ -144,7 +109,7 @@ public ResourceState resourceState() {
* @return the clusteringPolicy value.
*/
public ClusteringPolicy clusteringPolicy() {
- return this.clusteringPolicy;
+ return this.innerProperties() == null ? null : this.innerProperties().clusteringPolicy();
}
/**
@@ -154,7 +119,10 @@ public ClusteringPolicy clusteringPolicy() {
* @return the DatabaseInner object itself.
*/
public DatabaseInner withClusteringPolicy(ClusteringPolicy clusteringPolicy) {
- this.clusteringPolicy = clusteringPolicy;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DatabaseProperties();
+ }
+ this.innerProperties().withClusteringPolicy(clusteringPolicy);
return this;
}
@@ -164,7 +132,7 @@ public DatabaseInner withClusteringPolicy(ClusteringPolicy clusteringPolicy) {
* @return the evictionPolicy value.
*/
public EvictionPolicy evictionPolicy() {
- return this.evictionPolicy;
+ return this.innerProperties() == null ? null : this.innerProperties().evictionPolicy();
}
/**
@@ -174,7 +142,10 @@ public EvictionPolicy evictionPolicy() {
* @return the DatabaseInner object itself.
*/
public DatabaseInner withEvictionPolicy(EvictionPolicy evictionPolicy) {
- this.evictionPolicy = evictionPolicy;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DatabaseProperties();
+ }
+ this.innerProperties().withEvictionPolicy(evictionPolicy);
return this;
}
@@ -184,7 +155,7 @@ public DatabaseInner withEvictionPolicy(EvictionPolicy evictionPolicy) {
* @return the persistence value.
*/
public Persistence persistence() {
- return this.persistence;
+ return this.innerProperties() == null ? null : this.innerProperties().persistence();
}
/**
@@ -194,7 +165,10 @@ public Persistence persistence() {
* @return the DatabaseInner object itself.
*/
public DatabaseInner withPersistence(Persistence persistence) {
- this.persistence = persistence;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DatabaseProperties();
+ }
+ this.innerProperties().withPersistence(persistence);
return this;
}
@@ -205,7 +179,7 @@ public DatabaseInner withPersistence(Persistence persistence) {
* @return the modules value.
*/
public List modules() {
- return this.modules;
+ return this.innerProperties() == null ? null : this.innerProperties().modules();
}
/**
@@ -216,7 +190,33 @@ public List modules() {
* @return the DatabaseInner object itself.
*/
public DatabaseInner withModules(List modules) {
- this.modules = modules;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DatabaseProperties();
+ }
+ this.innerProperties().withModules(modules);
+ return this;
+ }
+
+ /**
+ * Get the geoReplication property: Optional set of properties to configure geo replication for this database.
+ *
+ * @return the geoReplication value.
+ */
+ public DatabasePropertiesGeoReplication geoReplication() {
+ return this.innerProperties() == null ? null : this.innerProperties().geoReplication();
+ }
+
+ /**
+ * Set the geoReplication property: Optional set of properties to configure geo replication for this database.
+ *
+ * @param geoReplication the geoReplication value to set.
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withGeoReplication(DatabasePropertiesGeoReplication geoReplication) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DatabaseProperties();
+ }
+ this.innerProperties().withGeoReplication(geoReplication);
return this;
}
@@ -226,11 +226,8 @@ public DatabaseInner withModules(List modules) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (persistence() != null) {
- persistence().validate();
- }
- if (modules() != null) {
- modules().forEach(e -> e.validate());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseProperties.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseProperties.java
new file mode 100644
index 0000000000000..346b8be291f8b
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/DatabaseProperties.java
@@ -0,0 +1,263 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
+import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
+import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
+import com.azure.resourcemanager.redisenterprise.models.Module;
+import com.azure.resourcemanager.redisenterprise.models.Persistence;
+import com.azure.resourcemanager.redisenterprise.models.Protocol;
+import com.azure.resourcemanager.redisenterprise.models.ProvisioningState;
+import com.azure.resourcemanager.redisenterprise.models.ResourceState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/**
+ * RedisEnterprise database properties Properties of RedisEnterprise databases, as opposed to general resource
+ * properties like location, tags.
+ */
+@Fluent
+public final class DatabaseProperties {
+ /*
+ * Specifies whether redis clients can connect using TLS-encrypted or
+ * plaintext redis protocols. Default is TLS-encrypted.
+ */
+ @JsonProperty(value = "clientProtocol")
+ private Protocol clientProtocol;
+
+ /*
+ * TCP port of the database endpoint. Specified at create time. Defaults to
+ * an available port.
+ */
+ @JsonProperty(value = "port")
+ private Integer port;
+
+ /*
+ * Current provisioning status of the database
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningState provisioningState;
+
+ /*
+ * Current resource status of the database
+ */
+ @JsonProperty(value = "resourceState", access = JsonProperty.Access.WRITE_ONLY)
+ private ResourceState resourceState;
+
+ /*
+ * Clustering policy - default is OSSCluster. Specified at create time.
+ */
+ @JsonProperty(value = "clusteringPolicy")
+ private ClusteringPolicy clusteringPolicy;
+
+ /*
+ * Redis eviction policy - default is VolatileLRU
+ */
+ @JsonProperty(value = "evictionPolicy")
+ private EvictionPolicy evictionPolicy;
+
+ /*
+ * Persistence settings
+ */
+ @JsonProperty(value = "persistence")
+ private Persistence persistence;
+
+ /*
+ * Optional set of redis modules to enable in this database - modules can
+ * only be added at creation time.
+ */
+ @JsonProperty(value = "modules")
+ private List modules;
+
+ /*
+ * Optional set of properties to configure geo replication for this
+ * database.
+ */
+ @JsonProperty(value = "geoReplication")
+ private DatabasePropertiesGeoReplication geoReplication;
+
+ /**
+ * Get the clientProtocol property: Specifies whether redis clients can connect using TLS-encrypted or plaintext
+ * redis protocols. Default is TLS-encrypted.
+ *
+ * @return the clientProtocol value.
+ */
+ public Protocol clientProtocol() {
+ return this.clientProtocol;
+ }
+
+ /**
+ * Set the clientProtocol property: Specifies whether redis clients can connect using TLS-encrypted or plaintext
+ * redis protocols. Default is TLS-encrypted.
+ *
+ * @param clientProtocol the clientProtocol value to set.
+ * @return the DatabaseProperties object itself.
+ */
+ public DatabaseProperties withClientProtocol(Protocol clientProtocol) {
+ this.clientProtocol = clientProtocol;
+ return this;
+ }
+
+ /**
+ * Get the port property: TCP port of the database endpoint. Specified at create time. Defaults to an available
+ * port.
+ *
+ * @return the port value.
+ */
+ public Integer port() {
+ return this.port;
+ }
+
+ /**
+ * Set the port property: TCP port of the database endpoint. Specified at create time. Defaults to an available
+ * port.
+ *
+ * @param port the port value to set.
+ * @return the DatabaseProperties object itself.
+ */
+ public DatabaseProperties withPort(Integer port) {
+ this.port = port;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Current provisioning status of the database.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the resourceState property: Current resource status of the database.
+ *
+ * @return the resourceState value.
+ */
+ public ResourceState resourceState() {
+ return this.resourceState;
+ }
+
+ /**
+ * Get the clusteringPolicy property: Clustering policy - default is OSSCluster. Specified at create time.
+ *
+ * @return the clusteringPolicy value.
+ */
+ public ClusteringPolicy clusteringPolicy() {
+ return this.clusteringPolicy;
+ }
+
+ /**
+ * Set the clusteringPolicy property: Clustering policy - default is OSSCluster. Specified at create time.
+ *
+ * @param clusteringPolicy the clusteringPolicy value to set.
+ * @return the DatabaseProperties object itself.
+ */
+ public DatabaseProperties withClusteringPolicy(ClusteringPolicy clusteringPolicy) {
+ this.clusteringPolicy = clusteringPolicy;
+ return this;
+ }
+
+ /**
+ * Get the evictionPolicy property: Redis eviction policy - default is VolatileLRU.
+ *
+ * @return the evictionPolicy value.
+ */
+ public EvictionPolicy evictionPolicy() {
+ return this.evictionPolicy;
+ }
+
+ /**
+ * Set the evictionPolicy property: Redis eviction policy - default is VolatileLRU.
+ *
+ * @param evictionPolicy the evictionPolicy value to set.
+ * @return the DatabaseProperties object itself.
+ */
+ public DatabaseProperties withEvictionPolicy(EvictionPolicy evictionPolicy) {
+ this.evictionPolicy = evictionPolicy;
+ return this;
+ }
+
+ /**
+ * Get the persistence property: Persistence settings.
+ *
+ * @return the persistence value.
+ */
+ public Persistence persistence() {
+ return this.persistence;
+ }
+
+ /**
+ * Set the persistence property: Persistence settings.
+ *
+ * @param persistence the persistence value to set.
+ * @return the DatabaseProperties object itself.
+ */
+ public DatabaseProperties withPersistence(Persistence persistence) {
+ this.persistence = persistence;
+ return this;
+ }
+
+ /**
+ * Get the modules property: Optional set of redis modules to enable in this database - modules can only be added at
+ * creation time.
+ *
+ * @return the modules value.
+ */
+ public List modules() {
+ return this.modules;
+ }
+
+ /**
+ * Set the modules property: Optional set of redis modules to enable in this database - modules can only be added at
+ * creation time.
+ *
+ * @param modules the modules value to set.
+ * @return the DatabaseProperties object itself.
+ */
+ public DatabaseProperties withModules(List modules) {
+ this.modules = modules;
+ return this;
+ }
+
+ /**
+ * Get the geoReplication property: Optional set of properties to configure geo replication for this database.
+ *
+ * @return the geoReplication value.
+ */
+ public DatabasePropertiesGeoReplication geoReplication() {
+ return this.geoReplication;
+ }
+
+ /**
+ * Set the geoReplication property: Optional set of properties to configure geo replication for this database.
+ *
+ * @param geoReplication the geoReplication value to set.
+ * @return the DatabaseProperties object itself.
+ */
+ public DatabaseProperties withGeoReplication(DatabasePropertiesGeoReplication geoReplication) {
+ this.geoReplication = geoReplication;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (persistence() != null) {
+ persistence().validate();
+ }
+ if (modules() != null) {
+ modules().forEach(e -> e.validate());
+ }
+ if (geoReplication() != null) {
+ geoReplication().validate();
+ }
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationInner.java
index 150270059ea71..b94d16ebc1d16 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationInner.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationInner.java
@@ -5,18 +5,14 @@
package com.azure.resourcemanager.redisenterprise.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.redisenterprise.models.ActionType;
import com.azure.resourcemanager.redisenterprise.models.OperationDisplay;
import com.azure.resourcemanager.redisenterprise.models.Origin;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
-/** Details of a REST API operation, returned from the Resource Provider Operations API. */
+/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */
@Fluent
public final class OperationInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
-
/*
* The name of the operation, as per Resource-Based Access Control (RBAC).
* Examples: "Microsoft.Compute/virtualMachines/write",
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationStatusInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationStatusInner.java
index bcb0bd186e2ac..242057dbaee63 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationStatusInner.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/OperationStatusInner.java
@@ -6,15 +6,11 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.management.exception.ManagementError;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The status of a long-running operation. */
@Fluent
public final class OperationStatusInner {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusInner.class);
-
/*
* The operation's unique id.
*/
@@ -46,7 +42,7 @@ public final class OperationStatusInner {
private String status;
/*
- * Error response describing why the operation failed.
+ * Error response Error response describing why the operation failed.
*/
@JsonProperty(value = "error")
private ManagementError error;
@@ -152,7 +148,7 @@ public OperationStatusInner withStatus(String status) {
}
/**
- * Get the error property: Error response describing why the operation failed.
+ * Get the error property: Error response Error response describing why the operation failed.
*
* @return the error value.
*/
@@ -161,7 +157,7 @@ public ManagementError error() {
}
/**
- * Set the error property: Error response describing why the operation failed.
+ * Set the error property: Error response Error response describing why the operation failed.
*
* @param error the error value to set.
* @return the OperationStatusInner object itself.
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java
index 6e69a85bcfd35..08defe8fc7025 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionInner.java
@@ -5,39 +5,29 @@
package com.azure.resourcemanager.redisenterprise.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.redisenterprise.models.PrivateEndpoint;
import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnectionProvisioningState;
import com.azure.resourcemanager.redisenterprise.models.PrivateLinkServiceConnectionState;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** The Private Endpoint Connection resource. */
-@JsonFlatten
@Fluent
-public class PrivateEndpointConnectionInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class);
-
- /*
- * The resource of private end point.
- */
- @JsonProperty(value = "properties.privateEndpoint")
- private PrivateEndpoint privateEndpoint;
-
+public final class PrivateEndpointConnectionInner extends ProxyResource {
/*
- * A collection of information about the state of the connection between
- * service consumer and provider.
+ * Resource properties.
*/
- @JsonProperty(value = "properties.privateLinkServiceConnectionState")
- private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties innerProperties;
- /*
- * The provisioning state of the private endpoint connection resource.
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
- private PrivateEndpointConnectionProvisioningState provisioningState;
+ private PrivateEndpointConnectionProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the privateEndpoint property: The resource of private end point.
@@ -45,7 +35,7 @@ public class PrivateEndpointConnectionInner extends ProxyResource {
* @return the privateEndpoint value.
*/
public PrivateEndpoint privateEndpoint() {
- return this.privateEndpoint;
+ return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint();
}
/**
@@ -55,7 +45,10 @@ public PrivateEndpoint privateEndpoint() {
* @return the PrivateEndpointConnectionInner object itself.
*/
public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
- this.privateEndpoint = privateEndpoint;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateEndpoint(privateEndpoint);
return this;
}
@@ -66,7 +59,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat
* @return the privateLinkServiceConnectionState value.
*/
public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
- return this.privateLinkServiceConnectionState;
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState();
}
/**
@@ -78,7 +71,10 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
*/
public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
- this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateEndpointConnectionProperties();
+ }
+ this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState);
return this;
}
@@ -88,7 +84,7 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState(
* @return the provisioningState value.
*/
public PrivateEndpointConnectionProvisioningState provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -97,11 +93,8 @@ public PrivateEndpointConnectionProvisioningState provisioningState() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (privateEndpoint() != null) {
- privateEndpoint().validate();
- }
- if (privateLinkServiceConnectionState() != null) {
- privateLinkServiceConnectionState().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionProperties.java
new file mode 100644
index 0000000000000..932d6da61c075
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpoint;
+import com.azure.resourcemanager.redisenterprise.models.PrivateEndpointConnectionProvisioningState;
+import com.azure.resourcemanager.redisenterprise.models.PrivateLinkServiceConnectionState;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Properties of the PrivateEndpointConnectProperties. */
+@Fluent
+public final class PrivateEndpointConnectionProperties {
+ /*
+ * The resource of private end point.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /*
+ * A collection of information about the state of the connection between
+ * service consumer and provider.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /*
+ * The provisioning state of the private endpoint connection resource.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private PrivateEndpointConnectionProvisioningState provisioningState;
+
+ /**
+ * Get the privateEndpoint property: The resource of private end point.
+ *
+ * @return the privateEndpoint value.
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the privateEndpoint property: The resource of private end point.
+ *
+ * @param privateEndpoint the privateEndpoint value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value.
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection
+ * between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set.
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(
+ PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the private endpoint connection resource.
+ *
+ * @return the provisioningState value.
+ */
+ public PrivateEndpointConnectionProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (privateEndpoint() != null) {
+ privateEndpoint().validate();
+ }
+ if (privateLinkServiceConnectionState() == null) {
+ throw LOGGER
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property privateLinkServiceConnectionState in model"
+ + " PrivateEndpointConnectionProperties"));
+ } else {
+ privateLinkServiceConnectionState().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class);
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java
index 2e940994eb86c..6f78217b30919 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceInner.java
@@ -5,36 +5,27 @@
package com.azure.resourcemanager.redisenterprise.fluent.models;
import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.JsonFlatten;
import com.azure.core.management.ProxyResource;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** A private link resource. */
-@JsonFlatten
@Fluent
-public class PrivateLinkResourceInner extends ProxyResource {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class);
-
- /*
- * The private link resource group id.
- */
- @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY)
- private String groupId;
-
+public final class PrivateLinkResourceInner extends ProxyResource {
/*
- * The private link resource required member names.
+ * Resource properties.
*/
- @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
- private List requiredMembers;
+ @JsonProperty(value = "properties")
+ private PrivateLinkResourceProperties innerProperties;
- /*
- * The private link resource Private link DNS zone name.
+ /**
+ * Get the innerProperties property: Resource properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.requiredZoneNames")
- private List requiredZoneNames;
+ private PrivateLinkResourceProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the groupId property: The private link resource group id.
@@ -42,7 +33,7 @@ public class PrivateLinkResourceInner extends ProxyResource {
* @return the groupId value.
*/
public String groupId() {
- return this.groupId;
+ return this.innerProperties() == null ? null : this.innerProperties().groupId();
}
/**
@@ -51,7 +42,7 @@ public String groupId() {
* @return the requiredMembers value.
*/
public List requiredMembers() {
- return this.requiredMembers;
+ return this.innerProperties() == null ? null : this.innerProperties().requiredMembers();
}
/**
@@ -60,7 +51,7 @@ public List requiredMembers() {
* @return the requiredZoneNames value.
*/
public List requiredZoneNames() {
- return this.requiredZoneNames;
+ return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames();
}
/**
@@ -70,7 +61,10 @@ public List requiredZoneNames() {
* @return the PrivateLinkResourceInner object itself.
*/
public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) {
- this.requiredZoneNames = requiredZoneNames;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new PrivateLinkResourceProperties();
+ }
+ this.innerProperties().withRequiredZoneNames(requiredZoneNames);
return this;
}
@@ -80,5 +74,8 @@ public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneN
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceProperties.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceProperties.java
new file mode 100644
index 0000000000000..802b87d2d8975
--- /dev/null
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/fluent/models/PrivateLinkResourceProperties.java
@@ -0,0 +1,77 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.redisenterprise.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Properties of a private link resource. */
+@Fluent
+public final class PrivateLinkResourceProperties {
+ /*
+ * The private link resource group id.
+ */
+ @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /*
+ * The private link resource required member names.
+ */
+ @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /*
+ * The private link resource Private link DNS zone name.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ private List requiredZoneNames;
+
+ /**
+ * Get the groupId property: The private link resource group id.
+ *
+ * @return the groupId value.
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Get the requiredMembers property: The private link resource required member names.
+ *
+ * @return the requiredMembers value.
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Get the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @return the requiredZoneNames value.
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the requiredZoneNames property: The private link resource Private link DNS zone name.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set.
+ * @return the PrivateLinkResourceProperties object itself.
+ */
+ public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java
index 33f11b78af91a..b76e39308002b 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabaseImpl.java
@@ -10,9 +10,11 @@
import com.azure.resourcemanager.redisenterprise.models.AccessKeys;
import com.azure.resourcemanager.redisenterprise.models.ClusteringPolicy;
import com.azure.resourcemanager.redisenterprise.models.Database;
+import com.azure.resourcemanager.redisenterprise.models.DatabasePropertiesGeoReplication;
import com.azure.resourcemanager.redisenterprise.models.DatabaseUpdate;
import com.azure.resourcemanager.redisenterprise.models.EvictionPolicy;
import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.ForceUnlinkParameters;
import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters;
import com.azure.resourcemanager.redisenterprise.models.Module;
import com.azure.resourcemanager.redisenterprise.models.Persistence;
@@ -77,6 +79,10 @@ public List modules() {
}
}
+ public DatabasePropertiesGeoReplication geoReplication() {
+ return this.innerModel().geoReplication();
+ }
+
public DatabaseInner innerModel() {
return this.innerObject;
}
@@ -209,6 +215,14 @@ public void export(ExportClusterParameters parameters, Context context) {
serviceManager.databases().export(resourceGroupName, clusterName, databaseName, parameters, context);
}
+ public void forceUnlink(ForceUnlinkParameters parameters) {
+ serviceManager.databases().forceUnlink(resourceGroupName, clusterName, databaseName, parameters);
+ }
+
+ public void forceUnlink(ForceUnlinkParameters parameters, Context context) {
+ serviceManager.databases().forceUnlink(resourceGroupName, clusterName, databaseName, parameters, context);
+ }
+
public DatabaseImpl withClientProtocol(Protocol clientProtocol) {
if (isInCreateMode()) {
this.innerModel().withClientProtocol(clientProtocol);
@@ -225,13 +239,8 @@ public DatabaseImpl withPort(Integer port) {
}
public DatabaseImpl withClusteringPolicy(ClusteringPolicy clusteringPolicy) {
- if (isInCreateMode()) {
- this.innerModel().withClusteringPolicy(clusteringPolicy);
- return this;
- } else {
- this.updateParameters.withClusteringPolicy(clusteringPolicy);
- return this;
- }
+ this.innerModel().withClusteringPolicy(clusteringPolicy);
+ return this;
}
public DatabaseImpl withEvictionPolicy(EvictionPolicy evictionPolicy) {
@@ -255,13 +264,13 @@ public DatabaseImpl withPersistence(Persistence persistence) {
}
public DatabaseImpl withModules(List modules) {
- if (isInCreateMode()) {
- this.innerModel().withModules(modules);
- return this;
- } else {
- this.updateParameters.withModules(modules);
- return this;
- }
+ this.innerModel().withModules(modules);
+ return this;
+ }
+
+ public DatabaseImpl withGeoReplication(DatabasePropertiesGeoReplication geoReplication) {
+ this.innerModel().withGeoReplication(geoReplication);
+ return this;
}
private boolean isInCreateMode() {
diff --git a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java
index 54ab0fc95e91c..8388c3b650caa 100644
--- a/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java
+++ b/sdk/redisenterprise/azure-resourcemanager-redisenterprise/src/main/java/com/azure/resourcemanager/redisenterprise/implementation/DatabasesClientImpl.java
@@ -31,7 +31,6 @@
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
-import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.redisenterprise.fluent.DatabasesClient;
@@ -40,6 +39,7 @@
import com.azure.resourcemanager.redisenterprise.models.DatabaseList;
import com.azure.resourcemanager.redisenterprise.models.DatabaseUpdate;
import com.azure.resourcemanager.redisenterprise.models.ExportClusterParameters;
+import com.azure.resourcemanager.redisenterprise.models.ForceUnlinkParameters;
import com.azure.resourcemanager.redisenterprise.models.ImportClusterParameters;
import com.azure.resourcemanager.redisenterprise.models.RegenerateKeyParameters;
import java.nio.ByteBuffer;
@@ -48,8 +48,6 @@
/** An instance of this class provides access to all the operations defined in DatabasesClient. */
public final class DatabasesClientImpl implements DatabasesClient {
- private final ClientLogger logger = new ClientLogger(DatabasesClientImpl.class);
-
/** The proxy service used to perform REST calls. */
private final DatabasesService service;
@@ -222,6 +220,23 @@ Mono>> export(
@HeaderParam("Accept") String accept,
Context context);
+ @Headers({"Content-Type: application/json"})
+ @Post(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache"
+ + "/redisEnterprise/{clusterName}/databases/{databaseName}/forceUnlink")
+ @ExpectedResponses({200, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> forceUnlink(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @PathParam("databaseName") String databaseName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") ForceUnlinkParameters parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Headers({"Content-Type: application/json"})
@Get("{nextLink}")
@ExpectedResponses({200})
@@ -241,7 +256,8 @@ Mono> listByClusterNext(
* @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 all databases in the specified RedisEnterprise cluster.
+ * @return all databases in the specified RedisEnterprise cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByClusterSinglePageAsync(
@@ -299,7 +315,8 @@ private Mono> listByClusterSinglePageAsync(
* @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 all databases in the specified RedisEnterprise cluster.
+ * @return all databases in the specified RedisEnterprise cluster along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByClusterSinglePageAsync(
@@ -353,7 +370,7 @@ private Mono> listByClusterSinglePageAsync(
* @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 all databases in the specified RedisEnterprise cluster.
+ * @return all databases in the specified RedisEnterprise cluster as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName) {
@@ -371,7 +388,7 @@ private PagedFlux listByClusterAsync(String resourceGroupName, St
* @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 all databases in the specified RedisEnterprise cluster.
+ * @return all databases in the specified RedisEnterprise cluster as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByClusterAsync(String resourceGroupName, String clusterName, Context context) {
@@ -388,7 +405,7 @@ private PagedFlux listByClusterAsync(String resourceGroupName, St
* @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 all databases in the specified RedisEnterprise cluster.
+ * @return all databases in the specified RedisEnterprise cluster as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByCluster(String resourceGroupName, String clusterName) {
@@ -404,7 +421,7 @@ public PagedIterable listByCluster(String resourceGroupName, Stri
* @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 all databases in the specified RedisEnterprise cluster.
+ * @return all databases in the specified RedisEnterprise cluster as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByCluster(String resourceGroupName, String clusterName, Context context) {
@@ -421,7 +438,8 @@ public PagedIterable listByCluster(String resourceGroupName, Stri
* @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 describes a database on the RedisEnterprise cluster.
+ * @return describes a database on the RedisEnterprise cluster along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -482,7 +500,8 @@ private Mono>> createWithResponseAsync(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return describes a database on the RedisEnterprise cluster along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createWithResponseAsync(
@@ -539,9 +558,9 @@ private Mono>> createWithResponseAsync(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link PollerFlux} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DatabaseInner> beginCreateAsync(
String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) {
Mono>> mono =
@@ -549,7 +568,11 @@ private PollerFlux, DatabaseInner> beginCreateAsync(
return this
.client
.getLroResult(
- mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, Context.NONE);
+ mono,
+ this.client.getHttpPipeline(),
+ DatabaseInner.class,
+ DatabaseInner.class,
+ this.client.getContext());
}
/**
@@ -563,9 +586,9 @@ private PollerFlux, DatabaseInner> beginCreateAsync(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link PollerFlux} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DatabaseInner> beginCreateAsync(
String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) {
context = this.client.mergeContext(context);
@@ -587,9 +610,9 @@ private PollerFlux, DatabaseInner> beginCreateAsync(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DatabaseInner> beginCreate(
String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) {
return beginCreateAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller();
@@ -606,9 +629,9 @@ public SyncPoller, DatabaseInner> beginCreate(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DatabaseInner> beginCreate(
String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) {
return beginCreateAsync(resourceGroupName, clusterName, databaseName, parameters, context).getSyncPoller();
@@ -624,7 +647,7 @@ public SyncPoller, DatabaseInner> beginCreate(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return describes a database on the RedisEnterprise cluster on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -645,7 +668,7 @@ private Mono createAsync(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return describes a database on the RedisEnterprise cluster on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createAsync(
@@ -702,7 +725,8 @@ public DatabaseInner create(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return describes a database on the RedisEnterprise cluster along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -763,7 +787,8 @@ private Mono>> updateWithResponseAsync(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return describes a database on the RedisEnterprise cluster along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> updateWithResponseAsync(
@@ -820,9 +845,9 @@ private Mono>> updateWithResponseAsync(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link PollerFlux} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DatabaseInner> beginUpdateAsync(
String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters) {
Mono>> mono =
@@ -830,7 +855,11 @@ private PollerFlux, DatabaseInner> beginUpdateAsync(
return this
.client
.getLroResult(
- mono, this.client.getHttpPipeline(), DatabaseInner.class, DatabaseInner.class, Context.NONE);
+ mono,
+ this.client.getHttpPipeline(),
+ DatabaseInner.class,
+ DatabaseInner.class,
+ this.client.getContext());
}
/**
@@ -844,9 +873,9 @@ private PollerFlux, DatabaseInner> beginUpdateAsync(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link PollerFlux} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, DatabaseInner> beginUpdateAsync(
String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters, Context context) {
context = this.client.mergeContext(context);
@@ -868,9 +897,9 @@ private PollerFlux, DatabaseInner> beginUpdateAsync(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DatabaseInner> beginUpdate(
String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters) {
return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller();
@@ -887,9 +916,9 @@ public SyncPoller, DatabaseInner> beginUpdate(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return the {@link SyncPoller} for polling of describes a database on the RedisEnterprise cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, DatabaseInner> beginUpdate(
String resourceGroupName, String clusterName, String databaseName, DatabaseUpdate parameters, Context context) {
return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, context).getSyncPoller();
@@ -905,7 +934,7 @@ public SyncPoller, DatabaseInner> beginUpdate(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return describes a database on the RedisEnterprise cluster on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -926,7 +955,7 @@ private Mono updateAsync(
* @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 describes a database on the RedisEnterprise cluster.
+ * @return describes a database on the RedisEnterprise cluster on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(
@@ -982,7 +1011,8 @@ public DatabaseInner update(
* @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 information about a database in a RedisEnterprise cluster.
+ * @return information about a database in a RedisEnterprise cluster along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -1036,7 +1066,8 @@ private Mono> getWithResponseAsync(
* @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 information about a database in a RedisEnterprise cluster.
+ * @return information about a database in a RedisEnterprise cluster along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> getWithResponseAsync(
@@ -1086,7 +1117,7 @@ private Mono> getWithResponseAsync(
* @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 information about a database in a RedisEnterprise cluster.
+ * @return information about a database in a RedisEnterprise cluster on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono getAsync(String resourceGroupName, String clusterName, String databaseName) {
@@ -1127,7 +1158,7 @@ public DatabaseInner get(String resourceGroupName, String clusterName, String da
* @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 information about a database in a RedisEnterprise cluster.
+ * @return information about a database in a RedisEnterprise cluster along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getWithResponse(
@@ -1144,7 +1175,7 @@ public Response getWithResponse(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -1198,7 +1229,7 @@ private Mono>> deleteWithResponseAsync(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> deleteWithResponseAsync(
@@ -1248,15 +1279,16 @@ private Mono>> deleteWithResponseAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String clusterName, String databaseName) {
Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, databaseName);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -1269,9 +1301,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginDeleteAsync(
String resourceGroupName, String clusterName, String databaseName, Context context) {
context = this.client.mergeContext(context);
@@ -1291,9 +1323,9 @@ private PollerFlux, Void> beginDeleteAsync(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String clusterName, String databaseName) {
return beginDeleteAsync(resourceGroupName, clusterName, databaseName).getSyncPoller();
@@ -1309,9 +1341,9 @@ public SyncPoller, Void> beginDelete(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(
String resourceGroupName, String clusterName, String databaseName, Context context) {
return beginDeleteAsync(resourceGroupName, clusterName, databaseName, context).getSyncPoller();
@@ -1326,7 +1358,7 @@ public SyncPoller, Void> beginDelete(
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String clusterName, String databaseName) {
@@ -1345,7 +1377,7 @@ private Mono 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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono deleteAsync(String resourceGroupName, String clusterName, String databaseName, Context context) {
@@ -1394,7 +1426,7 @@ public void delete(String resourceGroupName, String clusterName, String database
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listKeysWithResponseAsync(
@@ -1448,7 +1480,7 @@ private Mono> listKeysWithResponseAsync(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listKeysWithResponseAsync(
@@ -1498,7 +1530,7 @@ private Mono> listKeysWithResponseAsync(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono listKeysAsync(String resourceGroupName, String clusterName, String databaseName) {
@@ -1522,7 +1554,7 @@ private Mono listKeysAsync(String resourceGroupName, String clu
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public AccessKeysInner listKeys(String resourceGroupName, String clusterName, String databaseName) {
@@ -1539,7 +1571,7 @@ public AccessKeysInner listKeys(String resourceGroupName, String clusterName, St
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response listKeysWithResponse(
@@ -1557,7 +1589,7 @@ public Response listKeysWithResponse(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> regenerateKeyWithResponseAsync(
@@ -1618,7 +1650,7 @@ private Mono>> regenerateKeyWithResponseAsync(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> regenerateKeyWithResponseAsync(
@@ -1679,9 +1711,9 @@ private Mono>> regenerateKeyWithResponseAsync(
* @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 secret access keys used for authenticating connections to redis.
+ * @return the {@link PollerFlux} for polling of access keys.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, AccessKeysInner> beginRegenerateKeyAsync(
String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters) {
Mono>> mono =
@@ -1689,7 +1721,11 @@ private PollerFlux, AccessKeysInner> beginRegenerate
return this
.client
.getLroResult(
- mono, this.client.getHttpPipeline(), AccessKeysInner.class, AccessKeysInner.class, Context.NONE);
+ mono,
+ this.client.getHttpPipeline(),
+ AccessKeysInner.class,
+ AccessKeysInner.class,
+ this.client.getContext());
}
/**
@@ -1703,9 +1739,9 @@ private PollerFlux, AccessKeysInner> beginRegenerate
* @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 secret access keys used for authenticating connections to redis.
+ * @return the {@link PollerFlux} for polling of access keys.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, AccessKeysInner> beginRegenerateKeyAsync(
String resourceGroupName,
String clusterName,
@@ -1731,9 +1767,9 @@ private PollerFlux, AccessKeysInner> beginRegenerate
* @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 secret access keys used for authenticating connections to redis.
+ * @return the {@link SyncPoller} for polling of access keys.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, AccessKeysInner> beginRegenerateKey(
String resourceGroupName, String clusterName, String databaseName, RegenerateKeyParameters parameters) {
return beginRegenerateKeyAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller();
@@ -1750,9 +1786,9 @@ public SyncPoller, AccessKeysInner> beginRegenerateK
* @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 secret access keys used for authenticating connections to redis.
+ * @return the {@link SyncPoller} for polling of access keys.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, AccessKeysInner> beginRegenerateKey(
String resourceGroupName,
String clusterName,
@@ -1773,7 +1809,7 @@ public SyncPoller, AccessKeysInner> beginRegenerateK
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono regenerateKeyAsync(
@@ -1794,7 +1830,7 @@ private Mono regenerateKeyAsync(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono regenerateKeyAsync(
@@ -1818,7 +1854,7 @@ private Mono regenerateKeyAsync(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public AccessKeysInner regenerateKey(
@@ -1837,7 +1873,7 @@ public AccessKeysInner regenerateKey(
* @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 secret access keys used for authenticating connections to redis.
+ * @return access keys.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public AccessKeysInner regenerateKey(
@@ -1850,7 +1886,7 @@ public AccessKeysInner regenerateKey(
}
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -1859,7 +1895,7 @@ public AccessKeysInner regenerateKey(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> importMethodWithResponseAsync(
@@ -1910,7 +1946,7 @@ private Mono>> importMethodWithResponseAsync(
}
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -1920,7 +1956,7 @@ private Mono>> importMethodWithResponseAsync(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> importMethodWithResponseAsync(
@@ -1972,7 +2008,7 @@ private Mono>> importMethodWithResponseAsync(
}
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -1981,20 +2017,21 @@ private Mono>> importMethodWithResponseAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginImportMethodAsync(
String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters) {
Mono>> mono =
importMethodWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -2004,9 +2041,9 @@ private PollerFlux, Void> beginImportMethodAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginImportMethodAsync(
String resourceGroupName,
String clusterName,
@@ -2022,7 +2059,7 @@ private PollerFlux, Void> beginImportMethodAsync(
}
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -2031,16 +2068,16 @@ private PollerFlux, Void> beginImportMethodAsync(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginImportMethod(
String resourceGroupName, String clusterName, String databaseName, ImportClusterParameters parameters) {
return beginImportMethodAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller();
}
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -2050,9 +2087,9 @@ public SyncPoller, Void> beginImportMethod(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginImportMethod(
String resourceGroupName,
String clusterName,
@@ -2064,7 +2101,7 @@ public SyncPoller, Void> beginImportMethod(
}
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -2073,7 +2110,7 @@ public SyncPoller, Void> beginImportMethod(
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono importMethodAsync(
@@ -2084,7 +2121,7 @@ private Mono importMethodAsync(
}
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -2094,7 +2131,7 @@ private Mono importMethodAsync(
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono importMethodAsync(
@@ -2109,7 +2146,7 @@ private Mono importMethodAsync(
}
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -2126,7 +2163,7 @@ public void importMethod(
}
/**
- * Imports a database file to target database.
+ * Imports database files to target database.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the RedisEnterprise cluster.
@@ -2157,7 +2194,7 @@ public void importMethod(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> exportWithResponseAsync(
@@ -2218,7 +2255,7 @@ private Mono>> exportWithResponseAsync(
* @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 completion.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> exportWithResponseAsync(
@@ -2279,16 +2316,17 @@ private Mono>> exportWithResponseAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginExportAsync(
String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters) {
Mono>> mono =
exportWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters);
return this
.client
- .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
}
/**
@@ -2302,9 +2340,9 @@ private PollerFlux, Void> beginExportAsync(
* @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 completion.
+ * @return the {@link PollerFlux} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, Void> beginExportAsync(
String resourceGroupName,
String clusterName,
@@ -2329,9 +2367,9 @@ private PollerFlux, Void> beginExportAsync(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginExport(
String resourceGroupName, String clusterName, String databaseName, ExportClusterParameters parameters) {
return beginExportAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller();
@@ -2348,9 +2386,9 @@ public SyncPoller, Void> beginExport(
* @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 completion.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginExport(
String resourceGroupName,
String clusterName,
@@ -2370,7 +2408,7 @@ public SyncPoller, Void> beginExport(
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono exportAsync(
@@ -2391,7 +2429,7 @@ private Mono exportAsync(
* @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 completion.
+ * @return A {@link Mono} that completes when a successful response is received.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono exportAsync(
@@ -2444,6 +2482,304 @@ public void export(
exportAsync(resourceGroupName, clusterName, databaseName, parameters, context).block();
}
+ /**
+ * Forcibly removes the link to the specified database resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Information identifying the database to be unlinked.
+ * @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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> forceUnlinkWithResponseAsync(
+ String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .forceUnlink(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Forcibly removes the link to the specified database resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Information identifying the database to be unlinked.
+ * @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 Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> forceUnlinkWithResponseAsync(
+ String resourceGroupName,
+ String clusterName,
+ String databaseName,
+ ForceUnlinkParameters parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (databaseName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter databaseName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .forceUnlink(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ databaseName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Forcibly removes the link to the specified database resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the RedisEnterprise cluster.
+ * @param databaseName The name of the database.
+ * @param parameters Information identifying the database to be unlinked.
+ * @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, Void> beginForceUnlinkAsync(
+ String resourceGroupName, String clusterName, String databaseName, ForceUnlinkParameters parameters) {
+ Mono>> mono =
+ forceUnlinkWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters);
+ return this
+ .client
+ .