SearchIndexClient.GetIndex Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| GetIndex(String, RequestContext) |
[Protocol Method] Retrieves an index definition.
|
| GetIndex(String, CancellationToken) |
Retrieves an index definition. |
GetIndex(String, RequestContext)
- Source:
- SearchIndexClient.cs
- 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 Azure.Response GetIndex(string indexName, Azure.RequestContext context);
abstract member GetIndex : string * Azure.RequestContext -> Azure.Response
override this.GetIndex : string * Azure.RequestContext -> Azure.Response
Public Overridable Function GetIndex (indexName As String, context As RequestContext) As 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
GetIndex(String, CancellationToken)
- Source:
- SearchIndexClient.cs
- Source:
- SearchIndexClient.cs
Retrieves an index definition.
public virtual Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndex> GetIndex(string indexName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIndex : string * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndex>
override this.GetIndex : string * System.Threading.CancellationToken -> Azure.Response<Azure.Search.Documents.Indexes.Models.SearchIndex>
Public Overridable Function GetIndex (indexName As String, Optional cancellationToken As CancellationToken = Nothing) As 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.