SearchServiceResource.RegenerateAdminKeyAsync Method

Definition

Regenerates either the primary or secondary admin API key. You can only regenerate one key at a time.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}
  • Operation Id: AdminKeys_Regenerate
  • Default Api Version: 2024-03-01-preview
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Search.Models.SearchServiceAdminKeyResult>> RegenerateAdminKeyAsync (Azure.ResourceManager.Search.Models.SearchServiceAdminKeyKind keyKind, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RegenerateAdminKeyAsync : Azure.ResourceManager.Search.Models.SearchServiceAdminKeyKind * Azure.ResourceManager.Search.Models.SearchManagementRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Search.Models.SearchServiceAdminKeyResult>>
override this.RegenerateAdminKeyAsync : Azure.ResourceManager.Search.Models.SearchServiceAdminKeyKind * Azure.ResourceManager.Search.Models.SearchManagementRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.Search.Models.SearchServiceAdminKeyResult>>
Public Overridable Function RegenerateAdminKeyAsync (keyKind As SearchServiceAdminKeyKind, Optional searchManagementRequestOptions As SearchManagementRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SearchServiceAdminKeyResult))

Parameters

keyKind
SearchServiceAdminKeyKind

Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.

searchManagementRequestOptions
SearchManagementRequestOptions

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Applies to