azure.mgmt.search.operations module

class azure.mgmt.search.operations.AdminKeysOperations(client, config, serializer, deserializer)[source]

Bases: object

AdminKeysOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
get(resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config)[source]

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

Parameters:
  • resource_group_name (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.
  • search_service_name (str) – The name of the Azure Search service associated with the specified resource group.
  • search_management_request_options (SearchManagementRequestOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

AdminKeyResult

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

regenerate(resource_group_name, search_service_name, key_kind, search_management_request_options=None, custom_headers=None, raw=False, **operation_config)[source]

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

Parameters:
  • resource_group_name (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.
  • search_service_name (str) – The name of the Azure Search service associated with the specified resource group.
  • key_kind (str or AdminKeyKind) – Specifies which key to regenerate. Valid values include ‘primary’ and ‘secondary’. Possible values include: ‘primary’, ‘secondary’
  • search_management_request_options (SearchManagementRequestOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

AdminKeyResult

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

class azure.mgmt.search.operations.QueryKeysOperations(client, config, serializer, deserializer)[source]

Bases: object

QueryKeysOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
create(resource_group_name, search_service_name, name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config)[source]

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

Parameters:
  • resource_group_name (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.
  • search_service_name (str) – The name of the Azure Search service associated with the specified resource group.
  • name (str) – The name of the new query API key.
  • search_management_request_options (SearchManagementRequestOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

QueryKey

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(resource_group_name, search_service_name, key, search_management_request_options=None, custom_headers=None, raw=False, **operation_config)[source]

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.

Parameters:
  • resource_group_name (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.
  • search_service_name (str) – The name of the Azure Search service associated with the specified resource group.
  • key (str) – The query key to be deleted. Query keys are identified by value, not by name.
  • search_management_request_options (SearchManagementRequestOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

list_by_search_service(resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config)[source]

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

Parameters:
  • resource_group_name (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.
  • search_service_name (str) – The name of the Azure Search service associated with the specified resource group.
  • search_management_request_options (SearchManagementRequestOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

QueryKeyPaged

Raises:

CloudError

class azure.mgmt.search.operations.ServicesOperations(client, config, serializer, deserializer)[source]

Bases: object

ServicesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
check_name_availability(name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config)[source]

Checks whether or not the given Search service name is available for use. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net).

Parameters:
  • name (str) – The Search service name to validate. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length.
  • search_management_request_options (SearchManagementRequestOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

CheckNameAvailabilityOutput

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

create_or_update(resource_group_name, search_service_name, service, search_management_request_options=None, custom_headers=None, raw=False, **operation_config)[source]

Creates or updates a Search service in the given resource group. If the Search service already exists, all properties will be updated with the given values.

Parameters:
  • resource_group_name (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.
  • search_service_name (str) – The name of the Azure Search service to create or update. Search service names must only contain lowercase letters, digits or dashes, cannot use dash as the first two or last one characters, cannot contain consecutive dashes, and must be between 2 and 60 characters in length. Search service names must be globally unique since they are part of the service URI (https://<name>.search.windows.net). You cannot change the service name after the service is created.
  • service (SearchService) – The definition of the Search service to create or update.
  • search_management_request_options (SearchManagementRequestOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

SearchService

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config)[source]

Deletes a Search service in the given resource group, along with its associated resources.

Parameters:
  • resource_group_name (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.
  • search_service_name (str) – The name of the Azure Search service associated with the specified resource group.
  • search_management_request_options (SearchManagementRequestOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get(resource_group_name, search_service_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets the Search service with the given name in the given resource group.

Parameters:
  • resource_group_name (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.
  • search_service_name (str) – The name of the Azure Search service associated with the specified resource group.
  • search_management_request_options (SearchManagementRequestOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

SearchService

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

list_by_resource_group(resource_group_name, search_management_request_options=None, custom_headers=None, raw=False, **operation_config)[source]

Gets a list of all Search services in the given resource group.

Parameters:
  • resource_group_name (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.
  • search_management_request_options (SearchManagementRequestOptions) – Additional parameters for the operation
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

SearchServicePaged

Raises:

CloudError