AdminKeysOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

SearchManagementClient's

<xref:admin_keys> attribute.

Inheritance
builtins.object
AdminKeysOperations

Constructor

AdminKeysOperations(*args, **kwargs)

Methods

get

Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.

regenerate

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

get

Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.

get(resource_group_name: str, search_service_name: str, search_management_request_options: SearchManagementRequestOptions | None = None, **kwargs: Any) -> AdminKeyResult

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required.

search_service_name
Required
str

The name of the Azure Cognitive Search service associated with the specified resource group. Required.

search_management_request_options
Required

Parameter group. Default value is None.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

AdminKeyResult or the result of cls(response)

Exceptions

Type Description
See also

regenerate

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

regenerate(resource_group_name: str, search_service_name: str, key_kind: str | AdminKeyKind, search_management_request_options: SearchManagementRequestOptions | None = None, **kwargs: Any) -> AdminKeyResult

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group within the current subscription. You can obtain this value from the Azure Resource Manager API or the portal. Required.

search_service_name
Required
str

The name of the Azure Cognitive Search service associated with the specified resource group. Required.

key_kind
Required

Specifies which key to regenerate. Valid values include 'primary' and 'secondary'. Known values are: "primary" and "secondary". Required.

search_management_request_options
Required

Parameter group. Default value is None.

Keyword-Only Parameters

Name Description
cls

A custom type or function that will be passed the direct response

Returns

Type Description

AdminKeyResult or the result of cls(response)

Exceptions

Type Description
See also

Attributes

models

models = <module 'azure.mgmt.search.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\search\\models\\__init__.py'>