QueryKeysOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

SearchManagementClient's

<xref:query_keys> attribute.

Inheritance
builtins.object
QueryKeysOperations

Constructor

QueryKeysOperations(*args, **kwargs)

Methods

create

Generates a new query key for the specified search service. You can create up to 50 query keys per service.

delete

Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating a query key is to delete and then recreate it.

list_by_search_service

Returns the list of query API keys for the given Azure Cognitive Search service.

create

Generates a new query key for the specified search service. You can create up to 50 query keys per service.

create(resource_group_name: str, search_service_name: str, name: str, search_management_request_options: SearchManagementRequestOptions | None = None, **kwargs: Any) -> QueryKey

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.

name
Required
str

The name of the new query API key. 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

QueryKey or the result of cls(response)

Exceptions

Type Description
See also

delete

Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for regenerating a query key is to delete and then recreate it.

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

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
Required
str

The query key to be deleted. Query keys are identified by value, not by name. 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

None or the result of cls(response)

Exceptions

Type Description
See also

list_by_search_service

Returns the list of query API keys for the given Azure Cognitive Search service.

list_by_search_service(resource_group_name: str, search_service_name: str, search_management_request_options: SearchManagementRequestOptions | None = None, **kwargs: Any) -> Iterable[QueryKey]

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

An iterator like instance of either QueryKey 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'>