Share via


SearchIndexClient Constructors

Definition

Overloads

SearchIndexClient()

Initializes a new instance of the SearchIndexClient class for mocking.

SearchIndexClient(Uri, AzureKeyCredential)

Initializes a new instance of the SearchIndexClient class.

SearchIndexClient(Uri, TokenCredential)

Initializes a new instance of the SearchIndexClient class.

SearchIndexClient(Uri, AzureKeyCredential, SearchClientOptions)

Initializes a new instance of the SearchIndexClient class.

SearchIndexClient(Uri, TokenCredential, SearchClientOptions)

Initializes a new instance of the SearchIndexClient class.

SearchIndexClient()

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.cs

Initializes a new instance of the SearchIndexClient class for mocking.

protected SearchIndexClient ();
Protected Sub New ()

Applies to

SearchIndexClient(Uri, AzureKeyCredential)

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.cs

Initializes a new instance of the SearchIndexClient class.

public SearchIndexClient (Uri endpoint, Azure.AzureKeyCredential credential);
new Azure.Search.Documents.Indexes.SearchIndexClient : Uri * Azure.AzureKeyCredential -> Azure.Search.Documents.Indexes.SearchIndexClient
Public Sub New (endpoint As Uri, credential As AzureKeyCredential)

Parameters

endpoint
Uri

Required. The URI endpoint of the Search service. This is likely to be similar to "https://{search_service}.search.windows.net". The URI must use HTTPS.

credential
AzureKeyCredential

Required. The API key credential used to authenticate requests against the Search service. You need to use an admin key to perform any operations on the SearchIndexClient. See Create and manage api-keys for an Azure Cognitive Search service for more information about API keys in Azure Cognitive Search.

Exceptions

Thrown when the endpoint or credential is null.

Thrown when the endpoint is not using HTTPS.

Applies to

SearchIndexClient(Uri, TokenCredential)

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.cs

Initializes a new instance of the SearchIndexClient class.

public SearchIndexClient (Uri endpoint, Azure.Core.TokenCredential tokenCredential);
new Azure.Search.Documents.Indexes.SearchIndexClient : Uri * Azure.Core.TokenCredential -> Azure.Search.Documents.Indexes.SearchIndexClient
Public Sub New (endpoint As Uri, tokenCredential As TokenCredential)

Parameters

endpoint
Uri

Required. The URI endpoint of the Search service. This is likely to be similar to "https://{search_service}.search.windows.net". The URI must use HTTPS.

tokenCredential
TokenCredential

Required. The token credential used to authenticate requests against the Search service. See Use role-based authorization in Azure Cognitive Search for more information about role-based authorization in Azure Cognitive Search.

Exceptions

Thrown when the endpoint or tokenCredential is null.

Thrown when the endpoint is not using HTTPS.

Applies to

SearchIndexClient(Uri, AzureKeyCredential, SearchClientOptions)

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.cs

Initializes a new instance of the SearchIndexClient class.

public SearchIndexClient (Uri endpoint, Azure.AzureKeyCredential credential, Azure.Search.Documents.SearchClientOptions options);
new Azure.Search.Documents.Indexes.SearchIndexClient : Uri * Azure.AzureKeyCredential * Azure.Search.Documents.SearchClientOptions -> Azure.Search.Documents.Indexes.SearchIndexClient
Public Sub New (endpoint As Uri, credential As AzureKeyCredential, options As SearchClientOptions)

Parameters

endpoint
Uri

Required. The URI endpoint of the Search service. This is likely to be similar to "https://{search_service}.search.windows.net". The URI must use HTTPS.

credential
AzureKeyCredential

Required. The API key credential used to authenticate requests against the Search service. You need to use an admin key to perform any operations on the SearchIndexClient. See Create and manage api-keys for an Azure Cognitive Search service for more information about API keys in Azure Cognitive Search.

options
SearchClientOptions

Client configuration options for connecting to Azure Cognitive Search.

Exceptions

Thrown when the endpoint or credential is null.

Thrown when the endpoint is not using HTTPS.

Applies to

SearchIndexClient(Uri, TokenCredential, SearchClientOptions)

Source:
SearchIndexClient.cs
Source:
SearchIndexClient.cs

Initializes a new instance of the SearchIndexClient class.

public SearchIndexClient (Uri endpoint, Azure.Core.TokenCredential tokenCredential, Azure.Search.Documents.SearchClientOptions options);
new Azure.Search.Documents.Indexes.SearchIndexClient : Uri * Azure.Core.TokenCredential * Azure.Search.Documents.SearchClientOptions -> Azure.Search.Documents.Indexes.SearchIndexClient
Public Sub New (endpoint As Uri, tokenCredential As TokenCredential, options As SearchClientOptions)

Parameters

endpoint
Uri

Required. The URI endpoint of the Search service. This is likely to be similar to "https://{search_service}.search.windows.net". The URI must use HTTPS.

tokenCredential
TokenCredential

Required. The token credential used to authenticate requests against the Search service. See Use role-based authorization in Azure Cognitive Search for more information about role-based authorization in Azure Cognitive Search.

options
SearchClientOptions

Client configuration options for connecting to Azure Cognitive Search.

Exceptions

Thrown when the endpoint or tokenCredential is null.

Thrown when the endpoint is not using HTTPS.

Applies to