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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions src/Search/Search.Management.Sdk/Generated/AdminKeysOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,19 @@ internal AdminKeysOperations (SearchManagementClient client)
public SearchManagementClient Client { get; private set; }

/// <summary>
/// Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
/// Gets the primary and secondary admin API keys for the specified Azure AI
/// Search service.
/// </summary>
/// <param name='searchManagementRequestOptions'>
///
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
/// The name of the resource group within the current subscription. You can
/// obtain this value from the Azure Resource Manager API or the portal.
/// </param>
/// <param name='searchServiceName'>
/// The name of the Azure Cognitive Search service associated with the specified resource group.
/// The name of the Azure AI Search service associated with the specified
/// resource group.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
Expand Down Expand Up @@ -87,7 +90,13 @@ internal AdminKeysOperations (SearchManagementClient client)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "searchServiceName");
}

if (searchServiceName != null)
{
if (!System.Text.RegularExpressions.Regex.IsMatch(searchServiceName, "^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$"))
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "searchServiceName", "^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$");
}
}

if (this.Client.ApiVersion == null)
{
Expand Down Expand Up @@ -271,19 +280,23 @@ internal AdminKeysOperations (SearchManagementClient client)

}
/// <summary>
/// Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
/// Regenerates either the primary or secondary admin API key. You can only
/// regenerate one key at a time.
/// </summary>
/// <param name='searchManagementRequestOptions'>
///
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
/// The name of the resource group within the current subscription. You can
/// obtain this value from the Azure Resource Manager API or the portal.
/// </param>
/// <param name='searchServiceName'>
/// The name of the Azure Cognitive Search service associated with the specified resource group.
/// The name of the Azure AI Search service associated with the specified
/// resource group.
/// </param>
/// <param name='keyKind'>
/// Specifies which key to regenerate. Valid values include &#39;primary&#39; and &#39;secondary&#39;.
/// Specifies which key to regenerate. Valid values include &#39;primary&#39; and
/// &#39;secondary&#39;.
/// </param>
/// <param name='customHeaders'>
/// Headers that will be added to request.
Expand Down Expand Up @@ -322,7 +335,13 @@ internal AdminKeysOperations (SearchManagementClient client)
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "searchServiceName");
}

if (searchServiceName != null)
{
if (!System.Text.RegularExpressions.Regex.IsMatch(searchServiceName, "^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$"))
{
throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "searchServiceName", "^(?=.{2,60}$)[a-z0-9][a-z0-9]+(-[a-z0-9]+)*$");
}
}


if (this.Client.ApiVersion == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ namespace Microsoft.Azure.Management.Search
public static partial class AdminKeysOperationsExtensions
{
/// <summary>
/// Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
/// Gets the primary and secondary admin API keys for the specified Azure AI
/// Search service.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -22,18 +23,21 @@ public static partial class AdminKeysOperationsExtensions
///
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
/// The name of the resource group within the current subscription. You can
/// obtain this value from the Azure Resource Manager API or the portal.
/// </param>
/// <param name='searchServiceName'>
/// The name of the Azure Cognitive Search service associated with the specified resource group.
/// The name of the Azure AI Search service associated with the specified
/// resource group.
/// </param>
public static AdminKeyResult Get(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
{
return ((IAdminKeysOperations)operations).GetAsync(resourceGroupName, searchServiceName, searchManagementRequestOptions).GetAwaiter().GetResult();
}

/// <summary>
/// Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
/// Gets the primary and secondary admin API keys for the specified Azure AI
/// Search service.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -42,10 +46,12 @@ public static partial class AdminKeysOperationsExtensions
///
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
/// The name of the resource group within the current subscription. You can
/// obtain this value from the Azure Resource Manager API or the portal.
/// </param>
/// <param name='searchServiceName'>
/// The name of the Azure Cognitive Search service associated with the specified resource group.
/// The name of the Azure AI Search service associated with the specified
/// resource group.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
Expand All @@ -58,7 +64,8 @@ public static partial class AdminKeysOperationsExtensions
}
}
/// <summary>
/// Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
/// Regenerates either the primary or secondary admin API key. You can only
/// regenerate one key at a time.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -67,21 +74,25 @@ public static partial class AdminKeysOperationsExtensions
///
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
/// The name of the resource group within the current subscription. You can
/// obtain this value from the Azure Resource Manager API or the portal.
/// </param>
/// <param name='searchServiceName'>
/// The name of the Azure Cognitive Search service associated with the specified resource group.
/// The name of the Azure AI Search service associated with the specified
/// resource group.
/// </param>
/// <param name='keyKind'>
/// Specifies which key to regenerate. Valid values include &#39;primary&#39; and &#39;secondary&#39;.
/// Specifies which key to regenerate. Valid values include &#39;primary&#39; and
/// &#39;secondary&#39;.
/// </param>
public static AdminKeyResult Regenerate(this IAdminKeysOperations operations, string resourceGroupName, string searchServiceName, AdminKeyKind keyKind, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions))
{
return ((IAdminKeysOperations)operations).RegenerateAsync(resourceGroupName, searchServiceName, keyKind, searchManagementRequestOptions).GetAwaiter().GetResult();
}

/// <summary>
/// Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
/// Regenerates either the primary or secondary admin API key. You can only
/// regenerate one key at a time.
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
Expand All @@ -90,13 +101,16 @@ public static partial class AdminKeysOperationsExtensions
///
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
/// The name of the resource group within the current subscription. You can
/// obtain this value from the Azure Resource Manager API or the portal.
/// </param>
/// <param name='searchServiceName'>
/// The name of the Azure Cognitive Search service associated with the specified resource group.
/// The name of the Azure AI Search service associated with the specified
/// resource group.
/// </param>
/// <param name='keyKind'>
/// Specifies which key to regenerate. Valid values include &#39;primary&#39; and &#39;secondary&#39;.
/// Specifies which key to regenerate. Valid values include &#39;primary&#39; and
/// &#39;secondary&#39;.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
Expand Down
27 changes: 18 additions & 9 deletions src/Search/Search.Management.Sdk/Generated/IAdminKeysOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,23 @@ namespace Microsoft.Azure.Management.Search
public partial interface IAdminKeysOperations
{
/// <summary>
/// Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
/// Gets the primary and secondary admin API keys for the specified Azure AI
/// Search service.
/// </summary>
/// <remarks>
/// Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
/// Gets the primary and secondary admin API keys for the specified Azure AI
/// Search service.
/// </remarks>
/// <param name='searchManagementRequestOptions'>
///
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
/// The name of the resource group within the current subscription. You can
/// obtain this value from the Azure Resource Manager API or the portal.
/// </param>
/// <param name='searchServiceName'>
/// The name of the Azure Cognitive Search service associated with the specified resource group.
/// The name of the Azure AI Search service associated with the specified
/// resource group.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand All @@ -43,22 +47,27 @@ public partial interface IAdminKeysOperations
System.Threading.Tasks.Task<Microsoft.Rest.Azure.AzureOperationResponse<AdminKeyResult>> GetWithHttpMessagesAsync(string resourceGroupName, string searchServiceName, SearchManagementRequestOptions searchManagementRequestOptions = default(SearchManagementRequestOptions), System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));

/// <summary>
/// Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
/// Regenerates either the primary or secondary admin API key. You can only
/// regenerate one key at a time.
/// </summary>
/// <remarks>
/// Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.
/// Regenerates either the primary or secondary admin API key. You can only
/// regenerate one key at a time.
/// </remarks>
/// <param name='searchManagementRequestOptions'>
///
/// </param>
/// <param name='resourceGroupName'>
/// The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal.
/// The name of the resource group within the current subscription. You can
/// obtain this value from the Azure Resource Manager API or the portal.
/// </param>
/// <param name='searchServiceName'>
/// The name of the Azure Cognitive Search service associated with the specified resource group.
/// The name of the Azure AI Search service associated with the specified
/// resource group.
/// </param>
/// <param name='keyKind'>
/// Specifies which key to regenerate. Valid values include &#39;primary&#39; and &#39;secondary&#39;.
/// Specifies which key to regenerate. Valid values include &#39;primary&#39; and
/// &#39;secondary&#39;.
/// </param>
/// <param name='customHeaders'>
/// The headers that will be added to request.
Expand Down
Loading