ServicesOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

SearchManagementClient's

<xref:services> attribute.

Inheritance
builtins.object
ServicesOperations

Constructor

ServicesOperations(*args, **kwargs)

Methods

begin_create_or_update

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.

check_name_availability

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).

delete

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

get

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

list_by_resource_group

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

list_by_subscription

Gets a list of all Search services in the given subscription.

update

Updates an existing search service in the given resource group.

begin_create_or_update

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.

begin_create_or_update(resource_group_name: str, search_service_name: str, service: _models.SearchService, search_management_request_options: _models.SearchManagementRequestOptions | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.SearchService]

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

service
Required

The definition of the search service to create or update. Is either a SearchService type or a IO type. Required.

search_management_request_options
Required

Parameter group. Default value is None.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

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

continuation_token
str

A continuation token to restart a poller from a saved state.

polling

By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

Type Description

An instance of LROPoller that returns either SearchService or the result of cls(response)

Exceptions

Type Description
See also

check_name_availability

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).

check_name_availability(name: str, search_management_request_options: SearchManagementRequestOptions | None = None, **kwargs: Any) -> CheckNameAvailabilityOutput

Parameters

Name Description
name
Required
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. Required.

search_management_request_options
Required

Parameter group. Default value is None.

Keyword-Only Parameters

Name Description
type
str

The type of the resource whose name is to be validated. This value must always be 'searchServices'. Default value is "searchServices". Note that overriding this default value may result in unsupported behavior.

cls

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

Returns

Type Description

CheckNameAvailabilityOutput or the result of cls(response)

Exceptions

Type Description
See also

delete

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

delete(resource_group_name: str, search_service_name: 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.

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

get

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

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

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

SearchService or the result of cls(response)

Exceptions

Type Description
See also

list_by_resource_group

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

list_by_resource_group(resource_group_name: str, search_management_request_options: SearchManagementRequestOptions | None = None, **kwargs: Any) -> Iterable[SearchService]

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_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 SearchService or the result of cls(response)

Exceptions

Type Description
See also

list_by_subscription

Gets a list of all Search services in the given subscription.

list_by_subscription(search_management_request_options: SearchManagementRequestOptions | None = None, **kwargs: Any) -> Iterable[SearchService]

Parameters

Name Description
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 SearchService or the result of cls(response)

Exceptions

Type Description
See also

update

Updates an existing search service in the given resource group.

update(resource_group_name: str, search_service_name: str, service: _models.SearchServiceUpdate, search_management_request_options: _models.SearchManagementRequestOptions | None = None, *, content_type: str = 'application/json', **kwargs: Any) -> _models.SearchService

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 to update. Required.

service
Required

The definition of the search service to update. Is either a SearchServiceUpdate type or a IO type. Required.

search_management_request_options
Required

Parameter group. Default value is None.

Keyword-Only Parameters

Name Description
content_type
str

Body Parameter content-type. Known values are: 'application/json'. Default value is None.

cls

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

Returns

Type Description

SearchService 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'>