# AzureSearchResource

- Kind: `class`
- Package: [Aspire.Hosting.Azure.Search](/reference/api/csharp/aspire.hosting.azure.search.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.Azure`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Search/AzureSearchResource.cs)
- Inherits: `AzureProvisioningResource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IValueProvider`, `IValueWithReferences`, `IAzureNspAssociationTarget`, `IAzurePrivateEndpointTarget`

Represents an Azure AI Search resource.

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzureSearchResource
    : Aspire.Hosting.Azure.AzureProvisioningResource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences,
      Aspire.Hosting.Azure.IAzureNspAssociationTarget,
      Aspire.Hosting.Azure.IAzurePrivateEndpointTarget
{
    // ...
}
```

## Constructors

- [AzureSearchResource(string, Action<AzureResourceInfrastructure>)](/reference/api/csharp/aspire.hosting.azure.search/azuresearchresource/constructors.md#constructor-string-action-azureresourceinfrastructure) -- Represents an Azure AI Search resource.

## Properties

- [ConnectionString](/reference/api/csharp/aspire.hosting.azure.search/azuresearchresource/properties.md#connectionstring) : `BicepOutputReference` `get` -- Gets the "connectionString" output reference from the Azure AI Search resource.
- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.azure.search/azuresearchresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string template for the manifest for the resource.
- [Endpoint](/reference/api/csharp/aspire.hosting.azure.search/azuresearchresource/properties.md#endpoint) : `BicepOutputReference` `get` -- Gets the service endpoint URI expression for the Azure AI Search resource.
- [Id](/reference/api/csharp/aspire.hosting.azure.search/azuresearchresource/properties.md#id) : `BicepOutputReference` `get` -- Gets the "id" output reference for the resource.
- [NameOutputReference](/reference/api/csharp/aspire.hosting.azure.search/azuresearchresource/properties.md#nameoutputreference) : `BicepOutputReference` `get` -- Gets the "name" output reference for the resource.
- [UriExpression](/reference/api/csharp/aspire.hosting.azure.search/azuresearchresource/properties.md#uriexpression) : `ReferenceExpression` `get` -- Gets the service endpoint URI expression for the Azure AI Search resource.

## Methods

- [AddAsExistingResource(AzureResourceInfrastructure)](/reference/api/csharp/aspire.hosting.azure.search/azuresearchresource/methods.md#addasexistingresource-azureresourceinfrastructure) : `ProvisionableResource`
