SearchIndexClient.GetIndexAsync Method

Definition

Overloads

Name Description
GetIndexAsync(String, RequestContext)

[Protocol Method] Retrieves an index definition.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
GetIndexAsync(String, CancellationToken)

Retrieves an index definition.

GetIndexAsync(String, RequestContext)

Source:
SearchIndexClient.cs

[Protocol Method] Retrieves an index definition.

  • This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.Threading.Tasks.Task<Azure.Response> GetIndexAsync(string indexName, Azure.RequestContext context);
abstract member GetIndexAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
override this.GetIndexAsync : string * Azure.RequestContext -> System.Threading.Tasks.Task<Azure.Response>
Public Overridable Function GetIndexAsync (indexName As String, context As RequestContext) As Task(Of Response)

Parameters

indexName
String

The name of the index.

context
RequestContext

The request options, which can override default behaviors of the client pipeline on a per-call basis.

Returns

The response returned from the service.

Exceptions

indexName is null.

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

Service returned a non-success status code.

Applies to

GetIndexAsync(String, CancellationToken)

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.cs

Retrieves an index definition.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndex>> GetIndexAsync(string indexName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIndexAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndex>>
override this.GetIndexAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndex>>
Public Overridable Function GetIndexAsync (indexName As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SearchIndex))

Parameters

indexName
String

The name of the index.

cancellationToken
CancellationToken

The cancellation token that can be used to cancel the operation.

Returns

The Response<T> from the server containing the requested SearchIndex.

Exceptions

indexName is null.

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

Service returned a non-success status code.

Applies to