SearchServiceCollection.CreateOrUpdate Method

Definition

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.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}
  • Operation Id: Services_CreateOrUpdate
  • Default Api Version: 2024-03-01-preview
  • Resource: SearchServiceResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Search.SearchServiceResource> CreateOrUpdate (Azure.WaitUntil waitUntil, string searchServiceName, Azure.ResourceManager.Search.SearchServiceData data, Azure.ResourceManager.Search.Models.SearchManagementRequestOptions searchManagementRequestOptions = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Search.SearchServiceData * Azure.ResourceManager.Search.Models.SearchManagementRequestOptions * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Search.SearchServiceResource>
override this.CreateOrUpdate : Azure.WaitUntil * string * Azure.ResourceManager.Search.SearchServiceData * Azure.ResourceManager.Search.Models.SearchManagementRequestOptions * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Search.SearchServiceResource>
Public Overridable Function CreateOrUpdate (waitUntil As WaitUntil, searchServiceName As String, data As SearchServiceData, Optional searchManagementRequestOptions As SearchManagementRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of SearchServiceResource)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

searchServiceName
String

The name of the Azure AI 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.

data
SearchServiceData

The definition of the search service to create or update.

searchManagementRequestOptions
SearchManagementRequestOptions

Parameter group.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

searchServiceName is an empty string, and was expected to be non-empty.

searchServiceName or data is null.

Applies to