共用方式為


SearchServiceResource.RegenerateAdminKey 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 Azure.Response<Azure.ResourceManager.Search.Models.SearchServiceAdminKeyResult> RegenerateAdminKey (Azure.ResourceManager.Search.Models.SearchServiceAdminKeyKind keyKind, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member RegenerateAdminKey : Azure.ResourceManager.Search.Models.SearchServiceAdminKeyKind * Azure.ResourceManager.Search.Models.SearchManagementRequestOptions * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Search.Models.SearchServiceAdminKeyResult>
override this.RegenerateAdminKey : Azure.ResourceManager.Search.Models.SearchServiceAdminKeyKind * Azure.ResourceManager.Search.Models.SearchManagementRequestOptions * System.Threading.CancellationToken -> Azure.Response<Azure.ResourceManager.Search.Models.SearchServiceAdminKeyResult>
Public Overridable Function RegenerateAdminKey (keyKind As SearchServiceAdminKeyKind, Optional searchManagementRequestOptions As SearchManagementRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As 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