diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperations.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperations.cs
index e0e036e936d8..8acca2a5beb2 100644
--- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperations.cs
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperations.cs
@@ -752,7 +752,7 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client)
}
///
- /// Imports a database file to target database.
+ /// Imports database files to target database.
///
///
/// The name of the resource group. The name is case insensitive.
@@ -763,8 +763,8 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client)
///
/// The name of the database.
///
- ///
- /// SAS URI for the target blob to import from
+ ///
+ /// SAS URIs for the target blobs to import from
///
///
/// The headers that will be added to request.
@@ -772,10 +772,10 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client)
///
/// The cancellation token.
///
- public async Task ImportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, string sasUri, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task ImportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList sasUris, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
// Send request
- AzureOperationResponse _response = await BeginImportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUri, customHeaders, cancellationToken).ConfigureAwait(false);
+ AzureOperationResponse _response = await BeginImportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUris, customHeaders, cancellationToken).ConfigureAwait(false);
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
@@ -807,6 +807,34 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client)
return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
}
+ ///
+ /// Forcibly removes the link to the specified database resource.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the RedisEnterprise cluster.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// The resource IDs of the database resources to be unlinked.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public async Task ForceUnlinkWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList ids, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ // Send request
+ AzureOperationResponse _response = await BeginForceUnlinkWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, ids, customHeaders, cancellationToken).ConfigureAwait(false);
+ return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false);
+ }
+
///
/// Creates a database
///
@@ -1646,7 +1674,7 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client)
}
///
- /// Imports a database file to target database.
+ /// Imports database files to target database.
///
///
/// The name of the resource group. The name is case insensitive.
@@ -1657,8 +1685,8 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client)
///
/// The name of the database.
///
- ///
- /// SAS URI for the target blob to import from
+ ///
+ /// SAS URIs for the target blobs to import from
///
///
/// Headers that will be added to request.
@@ -1678,7 +1706,7 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client)
///
/// A response object containing the response body and response headers.
///
- public async Task BeginImportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, string sasUri, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ public async Task BeginImportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList sasUris, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
{
if (resourceGroupName == null)
{
@@ -1700,14 +1728,14 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client)
{
throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
}
- if (sasUri == null)
+ if (sasUris == null)
{
- throw new ValidationException(ValidationRules.CannotBeNull, "sasUri");
+ throw new ValidationException(ValidationRules.CannotBeNull, "sasUris");
}
ImportClusterParameters parameters = new ImportClusterParameters();
- if (sasUri != null)
+ if (sasUris != null)
{
- parameters.SasUri = sasUri;
+ parameters.SasUris = sasUris;
}
// Tracing
bool _shouldTrace = ServiceClientTracing.IsEnabled;
@@ -2041,6 +2069,204 @@ internal DatabasesOperations(RedisEnterpriseManagementClient client)
return _result;
}
+ ///
+ /// Forcibly removes the link to the specified database resource.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the RedisEnterprise cluster.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// The resource IDs of the database resources to be unlinked.
+ ///
+ ///
+ /// Headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ ///
+ /// A response object containing the response body and response headers.
+ ///
+ public async Task BeginForceUnlinkWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList ids, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName");
+ }
+ if (clusterName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "clusterName");
+ }
+ if (databaseName == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "databaseName");
+ }
+ if (Client.ApiVersion == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
+ }
+ if (Client.SubscriptionId == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId");
+ }
+ if (ids == null)
+ {
+ throw new ValidationException(ValidationRules.CannotBeNull, "ids");
+ }
+ ForceUnlinkParameters parameters = new ForceUnlinkParameters();
+ if (ids != null)
+ {
+ parameters.Ids = ids;
+ }
+ // Tracing
+ bool _shouldTrace = ServiceClientTracing.IsEnabled;
+ string _invocationId = null;
+ if (_shouldTrace)
+ {
+ _invocationId = ServiceClientTracing.NextInvocationId.ToString();
+ Dictionary tracingParameters = new Dictionary();
+ tracingParameters.Add("resourceGroupName", resourceGroupName);
+ tracingParameters.Add("clusterName", clusterName);
+ tracingParameters.Add("databaseName", databaseName);
+ tracingParameters.Add("parameters", parameters);
+ tracingParameters.Add("cancellationToken", cancellationToken);
+ ServiceClientTracing.Enter(_invocationId, this, "BeginForceUnlink", tracingParameters);
+ }
+ // Construct URL
+ var _baseUrl = Client.BaseUri.AbsoluteUri;
+ var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/databases/{databaseName}/forceUnlink").ToString();
+ _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName));
+ _url = _url.Replace("{clusterName}", System.Uri.EscapeDataString(clusterName));
+ _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName));
+ _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId));
+ List _queryParameters = new List();
+ if (Client.ApiVersion != null)
+ {
+ _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
+ }
+ if (_queryParameters.Count > 0)
+ {
+ _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
+ }
+ // Create HTTP transport objects
+ var _httpRequest = new HttpRequestMessage();
+ HttpResponseMessage _httpResponse = null;
+ _httpRequest.Method = new HttpMethod("POST");
+ _httpRequest.RequestUri = new System.Uri(_url);
+ // Set Headers
+ if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
+ {
+ _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
+ }
+ if (Client.AcceptLanguage != null)
+ {
+ if (_httpRequest.Headers.Contains("accept-language"))
+ {
+ _httpRequest.Headers.Remove("accept-language");
+ }
+ _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
+ }
+
+
+ if (customHeaders != null)
+ {
+ foreach(var _header in customHeaders)
+ {
+ if (_httpRequest.Headers.Contains(_header.Key))
+ {
+ _httpRequest.Headers.Remove(_header.Key);
+ }
+ _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
+ }
+ }
+
+ // Serialize Request
+ string _requestContent = null;
+ if(parameters != null)
+ {
+ _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, Client.SerializationSettings);
+ _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
+ _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
+ }
+ // Set Credentials
+ if (Client.Credentials != null)
+ {
+ cancellationToken.ThrowIfCancellationRequested();
+ await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ }
+ // Send Request
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
+ _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
+ }
+ HttpStatusCode _statusCode = _httpResponse.StatusCode;
+ cancellationToken.ThrowIfCancellationRequested();
+ string _responseContent = null;
+ if ((int)_statusCode != 200 && (int)_statusCode != 202)
+ {
+ var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
+ try
+ {
+ _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
+ ErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings);
+ if (_errorBody != null)
+ {
+ ex.Body = _errorBody;
+ }
+ }
+ catch (JsonException)
+ {
+ // Ignore the exception
+ }
+ ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
+ ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Error(_invocationId, ex);
+ }
+ _httpRequest.Dispose();
+ if (_httpResponse != null)
+ {
+ _httpResponse.Dispose();
+ }
+ throw ex;
+ }
+ // Create Result
+ var _result = new AzureOperationResponse();
+ _result.Request = _httpRequest;
+ _result.Response = _httpResponse;
+ if (_httpResponse.Headers.Contains("x-ms-request-id"))
+ {
+ _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
+ }
+ if (_shouldTrace)
+ {
+ ServiceClientTracing.Exit(_invocationId, _result);
+ }
+ return _result;
+ }
+
///
/// Gets all databases in the specified RedisEnterprise cluster.
///
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperationsExtensions.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperationsExtensions.cs
index 1cdc136bdfe1..26e09155d40b 100644
--- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperationsExtensions.cs
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/DatabasesOperationsExtensions.cs
@@ -13,6 +13,8 @@ namespace Microsoft.Azure.Management.RedisEnterprise
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -355,7 +357,7 @@ public static AccessKeys RegenerateKey(this IDatabasesOperations operations, str
}
///
- /// Imports a database file to target database.
+ /// Imports database files to target database.
///
///
/// The operations group for this extension method.
@@ -369,16 +371,16 @@ public static AccessKeys RegenerateKey(this IDatabasesOperations operations, str
///
/// The name of the database.
///
- ///
- /// SAS URI for the target blob to import from
+ ///
+ /// SAS URIs for the target blobs to import from
///
- public static void Import(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, string sasUri)
+ public static void Import(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList sasUris)
{
- operations.ImportAsync(resourceGroupName, clusterName, databaseName, sasUri).GetAwaiter().GetResult();
+ operations.ImportAsync(resourceGroupName, clusterName, databaseName, sasUris).GetAwaiter().GetResult();
}
///
- /// Imports a database file to target database.
+ /// Imports database files to target database.
///
///
/// The operations group for this extension method.
@@ -392,15 +394,15 @@ public static void Import(this IDatabasesOperations operations, string resourceG
///
/// The name of the database.
///
- ///
- /// SAS URI for the target blob to import from
+ ///
+ /// SAS URIs for the target blobs to import from
///
///
/// The cancellation token.
///
- public static async Task ImportAsync(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, string sasUri, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task ImportAsync(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList sasUris, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.ImportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUri, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.ImportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUris, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -452,6 +454,55 @@ public static void Export(this IDatabasesOperations operations, string resourceG
(await operations.ExportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUri, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Forcibly removes the link to the specified database resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the RedisEnterprise cluster.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// The resource IDs of the database resources to be unlinked.
+ ///
+ public static void ForceUnlink(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList ids)
+ {
+ operations.ForceUnlinkAsync(resourceGroupName, clusterName, databaseName, ids).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Forcibly removes the link to the specified database resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the RedisEnterprise cluster.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// The resource IDs of the database resources to be unlinked.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task ForceUnlinkAsync(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList ids, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.ForceUnlinkWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, ids, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Creates a database
///
@@ -654,7 +705,7 @@ public static AccessKeys BeginRegenerateKey(this IDatabasesOperations operations
}
///
- /// Imports a database file to target database.
+ /// Imports database files to target database.
///
///
/// The operations group for this extension method.
@@ -668,16 +719,16 @@ public static AccessKeys BeginRegenerateKey(this IDatabasesOperations operations
///
/// The name of the database.
///
- ///
- /// SAS URI for the target blob to import from
+ ///
+ /// SAS URIs for the target blobs to import from
///
- public static void BeginImport(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, string sasUri)
+ public static void BeginImport(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList sasUris)
{
- operations.BeginImportAsync(resourceGroupName, clusterName, databaseName, sasUri).GetAwaiter().GetResult();
+ operations.BeginImportAsync(resourceGroupName, clusterName, databaseName, sasUris).GetAwaiter().GetResult();
}
///
- /// Imports a database file to target database.
+ /// Imports database files to target database.
///
///
/// The operations group for this extension method.
@@ -691,15 +742,15 @@ public static void BeginImport(this IDatabasesOperations operations, string reso
///
/// The name of the database.
///
- ///
- /// SAS URI for the target blob to import from
+ ///
+ /// SAS URIs for the target blobs to import from
///
///
/// The cancellation token.
///
- public static async Task BeginImportAsync(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, string sasUri, CancellationToken cancellationToken = default(CancellationToken))
+ public static async Task BeginImportAsync(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList sasUris, CancellationToken cancellationToken = default(CancellationToken))
{
- (await operations.BeginImportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUri, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ (await operations.BeginImportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUris, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
///
@@ -751,6 +802,55 @@ public static void BeginExport(this IDatabasesOperations operations, string reso
(await operations.BeginExportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUri, null, cancellationToken).ConfigureAwait(false)).Dispose();
}
+ ///
+ /// Forcibly removes the link to the specified database resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the RedisEnterprise cluster.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// The resource IDs of the database resources to be unlinked.
+ ///
+ public static void BeginForceUnlink(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList ids)
+ {
+ operations.BeginForceUnlinkAsync(resourceGroupName, clusterName, databaseName, ids).GetAwaiter().GetResult();
+ }
+
+ ///
+ /// Forcibly removes the link to the specified database resource.
+ ///
+ ///
+ /// The operations group for this extension method.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the RedisEnterprise cluster.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// The resource IDs of the database resources to be unlinked.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ public static async Task BeginForceUnlinkAsync(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList ids, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ (await operations.BeginForceUnlinkWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, ids, null, cancellationToken).ConfigureAwait(false)).Dispose();
+ }
+
///
/// Gets all databases in the specified RedisEnterprise cluster.
///
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/IDatabasesOperations.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/IDatabasesOperations.cs
index f210a716c3d3..8b47da28cafb 100644
--- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/IDatabasesOperations.cs
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/IDatabasesOperations.cs
@@ -224,7 +224,7 @@ public partial interface IDatabasesOperations
///
Task> RegenerateKeyWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, AccessKeyType keyType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Imports a database file to target database.
+ /// Imports database files to target database.
///
///
/// The name of the resource group. The name is case insensitive.
@@ -235,8 +235,8 @@ public partial interface IDatabasesOperations
///
/// The name of the database.
///
- ///
- /// SAS URI for the target blob to import from
+ ///
+ /// SAS URIs for the target blobs to import from
///
///
/// The headers that will be added to request.
@@ -250,7 +250,7 @@ public partial interface IDatabasesOperations
///
/// Thrown when a required parameter is null
///
- Task ImportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, string sasUri, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task ImportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList sasUris, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Exports a database file from target database.
///
@@ -280,6 +280,34 @@ public partial interface IDatabasesOperations
///
Task ExportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, string sasUri, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Forcibly removes the link to the specified database resource.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the RedisEnterprise cluster.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// The resource IDs of the database resources to be unlinked.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task ForceUnlinkWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList ids, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Creates a database
///
///
@@ -399,7 +427,7 @@ public partial interface IDatabasesOperations
///
Task> BeginRegenerateKeyWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, AccessKeyType keyType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Imports a database file to target database.
+ /// Imports database files to target database.
///
///
/// The name of the resource group. The name is case insensitive.
@@ -410,8 +438,8 @@ public partial interface IDatabasesOperations
///
/// The name of the database.
///
- ///
- /// SAS URI for the target blob to import from
+ ///
+ /// SAS URIs for the target blobs to import from
///
///
/// The headers that will be added to request.
@@ -425,7 +453,7 @@ public partial interface IDatabasesOperations
///
/// Thrown when a required parameter is null
///
- Task BeginImportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, string sasUri, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ Task BeginImportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList sasUris, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
/// Exports a database file from target database.
///
@@ -455,6 +483,34 @@ public partial interface IDatabasesOperations
///
Task BeginExportWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, string sasUri, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
///
+ /// Forcibly removes the link to the specified database resource.
+ ///
+ ///
+ /// The name of the resource group. The name is case insensitive.
+ ///
+ ///
+ /// The name of the RedisEnterprise cluster.
+ ///
+ ///
+ /// The name of the database.
+ ///
+ ///
+ /// The resource IDs of the database resources to be unlinked.
+ ///
+ ///
+ /// The headers that will be added to request.
+ ///
+ ///
+ /// The cancellation token.
+ ///
+ ///
+ /// Thrown when the operation returned an invalid status code
+ ///
+ ///
+ /// Thrown when a required parameter is null
+ ///
+ Task BeginForceUnlinkWithHttpMessagesAsync(string resourceGroupName, string clusterName, string databaseName, IList ids, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken));
+ ///
/// Gets all databases in the specified RedisEnterprise cluster.
///
///
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Database.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Database.cs
index 78cae236bd9a..f8317bca0fdc 100644
--- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Database.cs
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Database.cs
@@ -64,7 +64,9 @@ public Database()
/// Persistence settings
/// Optional set of redis modules to enable in
/// this database - modules can only be added at creation time.
- public Database(string id = default(string), string name = default(string), string type = default(string), string clientProtocol = default(string), int? port = default(int?), string provisioningState = default(string), string resourceState = default(string), string clusteringPolicy = default(string), string evictionPolicy = default(string), Persistence persistence = default(Persistence), IList modules = default(IList))
+ /// Optional set of properties to
+ /// configure geo replication for this database.
+ public Database(string id = default(string), string name = default(string), string type = default(string), string clientProtocol = default(string), int? port = default(int?), string provisioningState = default(string), string resourceState = default(string), string clusteringPolicy = default(string), string evictionPolicy = default(string), Persistence persistence = default(Persistence), IList modules = default(IList), DatabasePropertiesGeoReplication geoReplication = default(DatabasePropertiesGeoReplication))
: base(id, name, type)
{
ClientProtocol = clientProtocol;
@@ -75,6 +77,7 @@ public Database()
EvictionPolicy = evictionPolicy;
Persistence = persistence;
Modules = modules;
+ GeoReplication = geoReplication;
CustomInit();
}
@@ -145,5 +148,12 @@ public Database()
[JsonProperty(PropertyName = "properties.modules")]
public IList Modules { get; set; }
+ ///
+ /// Gets or sets optional set of properties to configure geo
+ /// replication for this database.
+ ///
+ [JsonProperty(PropertyName = "properties.geoReplication")]
+ public DatabasePropertiesGeoReplication GeoReplication { get; set; }
+
}
}
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabasePropertiesGeoReplication.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabasePropertiesGeoReplication.cs
new file mode 100644
index 000000000000..dc931d588e4a
--- /dev/null
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabasePropertiesGeoReplication.cs
@@ -0,0 +1,66 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.RedisEnterprise.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Optional set of properties to configure geo replication for this
+ /// database.
+ ///
+ public partial class DatabasePropertiesGeoReplication
+ {
+ ///
+ /// Initializes a new instance of the DatabasePropertiesGeoReplication
+ /// class.
+ ///
+ public DatabasePropertiesGeoReplication()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the DatabasePropertiesGeoReplication
+ /// class.
+ ///
+ /// Name for the group of linked database
+ /// resources
+ /// List of database resources to link
+ /// with this database
+ public DatabasePropertiesGeoReplication(string groupNickname = default(string), IList linkedDatabases = default(IList))
+ {
+ GroupNickname = groupNickname;
+ LinkedDatabases = linkedDatabases;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets name for the group of linked database resources
+ ///
+ [JsonProperty(PropertyName = "groupNickname")]
+ public string GroupNickname { get; set; }
+
+ ///
+ /// Gets or sets list of database resources to link with this database
+ ///
+ [JsonProperty(PropertyName = "linkedDatabases")]
+ public IList LinkedDatabases { get; set; }
+
+ }
+}
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabaseUpdate.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabaseUpdate.cs
index eadc36ff3bbc..a4d3cb2029f2 100644
--- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabaseUpdate.cs
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/DatabaseUpdate.cs
@@ -58,7 +58,9 @@ public DatabaseUpdate()
/// Persistence settings
/// Optional set of redis modules to enable in
/// this database - modules can only be added at creation time.
- public DatabaseUpdate(string clientProtocol = default(string), int? port = default(int?), string provisioningState = default(string), string resourceState = default(string), string clusteringPolicy = default(string), string evictionPolicy = default(string), Persistence persistence = default(Persistence), IList modules = default(IList))
+ /// Optional set of properties to
+ /// configure geo replication for this database.
+ public DatabaseUpdate(string clientProtocol = default(string), int? port = default(int?), string provisioningState = default(string), string resourceState = default(string), string clusteringPolicy = default(string), string evictionPolicy = default(string), Persistence persistence = default(Persistence), IList modules = default(IList), DatabasePropertiesGeoReplication geoReplication = default(DatabasePropertiesGeoReplication))
{
ClientProtocol = clientProtocol;
Port = port;
@@ -68,6 +70,7 @@ public DatabaseUpdate()
EvictionPolicy = evictionPolicy;
Persistence = persistence;
Modules = modules;
+ GeoReplication = geoReplication;
CustomInit();
}
@@ -138,5 +141,12 @@ public DatabaseUpdate()
[JsonProperty(PropertyName = "properties.modules")]
public IList Modules { get; set; }
+ ///
+ /// Gets or sets optional set of properties to configure geo
+ /// replication for this database.
+ ///
+ [JsonProperty(PropertyName = "properties.geoReplication")]
+ public DatabasePropertiesGeoReplication GeoReplication { get; set; }
+
}
}
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ForceUnlinkParameters.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ForceUnlinkParameters.cs
new file mode 100644
index 000000000000..b9af2c949fb2
--- /dev/null
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ForceUnlinkParameters.cs
@@ -0,0 +1,59 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.RedisEnterprise.Models
+{
+ using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+
+ ///
+ /// Forcibly unlink another database from this database.
+ ///
+ ///
+ /// Parameters for a Redis Enterprise Active Geo Replication Force Unlink
+ /// operation.
+ ///
+ public partial class ForceUnlinkParameters
+ {
+ ///
+ /// Initializes a new instance of the ForceUnlinkParameters class.
+ ///
+ public ForceUnlinkParameters()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the ForceUnlinkParameters class.
+ ///
+ /// The resource IDs of the database resources to be
+ /// unlinked.
+ public ForceUnlinkParameters(IList ids)
+ {
+ Ids = ids;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets the resource IDs of the database resources to be
+ /// unlinked.
+ ///
+ [JsonProperty(PropertyName = "ids")]
+ public IList Ids { get; set; }
+
+ }
+}
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ImportClusterParameters.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ImportClusterParameters.cs
index a5adbae21aec..7d94449cb55c 100644
--- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ImportClusterParameters.cs
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/ImportClusterParameters.cs
@@ -11,10 +11,12 @@
namespace Microsoft.Azure.Management.RedisEnterprise.Models
{
using Newtonsoft.Json;
+ using System.Collections;
+ using System.Collections.Generic;
using System.Linq;
///
- /// Import an RDB file into a target database
+ /// Import RDB files into a target database
///
///
/// Parameters for a Redis Enterprise import operation.
@@ -32,11 +34,11 @@ public ImportClusterParameters()
///
/// Initializes a new instance of the ImportClusterParameters class.
///
- /// SAS URI for the target blob to import
+ /// SAS URIs for the target blobs to import
/// from
- public ImportClusterParameters(string sasUri)
+ public ImportClusterParameters(IList sasUris)
{
- SasUri = sasUri;
+ SasUris = sasUris;
CustomInit();
}
@@ -46,10 +48,10 @@ public ImportClusterParameters(string sasUri)
partial void CustomInit();
///
- /// Gets or sets SAS URI for the target blob to import from
+ /// Gets or sets SAS URIs for the target blobs to import from
///
- [JsonProperty(PropertyName = "sasUri")]
- public string SasUri { get; set; }
+ [JsonProperty(PropertyName = "sasUris")]
+ public IList SasUris { get; set; }
}
}
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkState.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkState.cs
new file mode 100644
index 000000000000..b2b33657eadd
--- /dev/null
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkState.cs
@@ -0,0 +1,25 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.RedisEnterprise.Models
+{
+
+ ///
+ /// Defines values for LinkState.
+ ///
+ public static class LinkState
+ {
+ public const string Linked = "Linked";
+ public const string Linking = "Linking";
+ public const string Unlinking = "Unlinking";
+ public const string LinkFailed = "LinkFailed";
+ public const string UnlinkFailed = "UnlinkFailed";
+ }
+}
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkedDatabase.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkedDatabase.cs
new file mode 100644
index 000000000000..ee3fd514c91d
--- /dev/null
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/LinkedDatabase.cs
@@ -0,0 +1,68 @@
+//
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for
+// license information.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is
+// regenerated.
+//
+
+namespace Microsoft.Azure.Management.RedisEnterprise.Models
+{
+ using Newtonsoft.Json;
+ using System.Linq;
+
+ ///
+ /// Linked Database
+ ///
+ ///
+ /// Specifies details of a linked database resource.
+ ///
+ public partial class LinkedDatabase
+ {
+ ///
+ /// Initializes a new instance of the LinkedDatabase class.
+ ///
+ public LinkedDatabase()
+ {
+ CustomInit();
+ }
+
+ ///
+ /// Initializes a new instance of the LinkedDatabase class.
+ ///
+ /// Resource ID of a database resource to link with
+ /// this database.
+ /// State of the link between the database
+ /// resources. Possible values include: 'Linked', 'Linking',
+ /// 'Unlinking', 'LinkFailed', 'UnlinkFailed'
+ public LinkedDatabase(string id = default(string), string state = default(string))
+ {
+ Id = id;
+ State = state;
+ CustomInit();
+ }
+
+ ///
+ /// An initialization method that performs custom operations like setting defaults
+ ///
+ partial void CustomInit();
+
+ ///
+ /// Gets or sets resource ID of a database resource to link with this
+ /// database.
+ ///
+ [JsonProperty(PropertyName = "id")]
+ public string Id { get; set; }
+
+ ///
+ /// Gets state of the link between the database resources. Possible
+ /// values include: 'Linked', 'Linking', 'Unlinking', 'LinkFailed',
+ /// 'UnlinkFailed'
+ ///
+ [JsonProperty(PropertyName = "state")]
+ public string State { get; private set; }
+
+ }
+}
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Module.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Module.cs
index ac71ea2b1e2e..6302f6116a9e 100644
--- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Module.cs
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/Models/Module.cs
@@ -35,7 +35,7 @@ public Module()
/// The name of the module, e.g. 'RedisBloom',
/// 'RediSearch', 'RedisTimeSeries'
/// Configuration options for the module, e.g.
- /// 'ERROR_RATE 0.00 INITIAL_SIZE 400'.
+ /// 'ERROR_RATE 0.01 INITIAL_SIZE 400'.
/// The version of the module, e.g.
/// '1.0'.
public Module(string name, string args = default(string), string version = default(string))
@@ -60,7 +60,7 @@ public Module()
///
/// Gets or sets configuration options for the module, e.g. 'ERROR_RATE
- /// 0.00 INITIAL_SIZE 400'.
+ /// 0.01 INITIAL_SIZE 400'.
///
[JsonProperty(PropertyName = "args")]
public string Args { get; set; }
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/RedisEnterpriseManagementClient.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/RedisEnterpriseManagementClient.cs
index 6cdf73b64ae6..030c7e9bea88 100644
--- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/RedisEnterpriseManagementClient.cs
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/RedisEnterpriseManagementClient.cs
@@ -352,7 +352,7 @@ private void Initialize()
PrivateEndpointConnections = new PrivateEndpointConnectionsOperations(this);
PrivateLinkResources = new PrivateLinkResourcesOperations(this);
BaseUri = new System.Uri("https://management.azure.com");
- ApiVersion = "2021-03-01";
+ ApiVersion = "2022-01-01";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
GenerateClientRequestId = true;
diff --git a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/SdkInfo_RedisEnterpriseManagementClient.cs b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/SdkInfo_RedisEnterpriseManagementClient.cs
index 72a4529ff61f..4dfe668aa8c6 100644
--- a/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/SdkInfo_RedisEnterpriseManagementClient.cs
+++ b/sdk/redisenterprise/Microsoft.Azure.Management.RedisEnterpriseCache/src/Generated/SdkInfo_RedisEnterpriseManagementClient.cs
@@ -19,25 +19,14 @@ public static IEnumerable> ApiInfo_RedisEnterprise
{
return new Tuple[]
{
- new Tuple("Cache", "Databases", "2021-03-01"),
- new Tuple("Cache", "Operations", "2021-03-01"),
- new Tuple("Cache", "OperationsStatus", "2021-03-01"),
- new Tuple("Cache", "PrivateEndpointConnections", "2021-03-01"),
- new Tuple("Cache", "PrivateLinkResources", "2021-03-01"),
- new Tuple("Cache", "RedisEnterprise", "2021-03-01"),
+ new Tuple("Cache", "Databases", "2022-01-01"),
+ new Tuple("Cache", "Operations", "2022-01-01"),
+ new Tuple("Cache", "OperationsStatus", "2022-01-01"),
+ new Tuple("Cache", "PrivateEndpointConnections", "2022-01-01"),
+ new Tuple("Cache", "PrivateLinkResources", "2022-01-01"),
+ new Tuple("Cache", "RedisEnterprise", "2022-01-01"),
}.AsEnumerable();
}
}
- // BEGIN: Code Generation Metadata Section
- public static readonly String AutoRestVersion = "v2";
- public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413";
- public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/redisenterprise/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\repos\\feb21\\azure-sdk-for-net\\sdk";
- public static readonly String GithubForkName = "Azure";
- public static readonly String GithubBranchName = "master";
- public static readonly String GithubCommidId = "379ee7309b62268464be1e14b0f9022a9283c2a4";
- public static readonly String CodeGenerationErrors = "";
- public static readonly String GithubRepoName = "azure-rest-api-specs";
- // END: Code Generation Metadata Section
}
}
-