# BingGroundingConnectionResource

- Kind: `class`
- Package: [Aspire.Hosting.Foundry](/reference/api/csharp/aspire.hosting.foundry.md)
- Version: `13.3.0-preview.1.26254.5`
- Namespace: `Aspire.Hosting.Foundry`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Foundry/Project/ConnectionResource.cs)
- Inherits: `AzureProvisionableAspireResourceWithParent<CognitiveServicesConnection, AzureCognitiveServicesProjectResource>`

A Foundry project connection resource specifically for Grounding with Bing Search connections.

## Definition

```csharp
namespace Aspire.Hosting.Foundry;

public class BingGroundingConnectionResource
    : Aspire.Hosting.Foundry.AzureProvisionableAspireResourceWithParent<Azure.Provisioning.CognitiveServices.CognitiveServicesConnection, Aspire.Hosting.Foundry.AzureCognitiveServicesProjectResource>
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Foundry/BingGroundingConnectionResource`

## Remarks

This type is used to distinguish Bing grounding connections from other connection types, ensuring that only connections created by `AddBingGroundingConnection` can be linked to a [BingGroundingToolResource](/reference/api/csharp/aspire.hosting.foundry/binggroundingtoolresource.md).

## Constructors

- [BingGroundingConnectionResource(string, Action<AzureResourceInfrastructure>, AzureCognitiveServicesProjectResource)](/reference/api/csharp/aspire.hosting.foundry/binggroundingconnectionresource/constructors.md#constructor-string-action-azureresourceinfrastructure-azurecognitiveservicesprojectresource) -- A Foundry project connection resource specifically for Grounding with Bing Search connections.

## Methods

- [FromExisting(string)](/reference/api/csharp/aspire.hosting.foundry/binggroundingconnectionresource/methods.md#fromexisting-string) : `CognitiveServicesConnection` -- Gets the Azure.Provisioning resource from an existing Bicep identifier. Because static methods can't be abstract, this is an instance method.
- [SetName(CognitiveServicesConnection, BicepValue<string>)](/reference/api/csharp/aspire.hosting.foundry/binggroundingconnectionresource/methods.md#setname-cognitiveservicesconnection-bicepvalue-string) -- Sets the name of the provisionable resource. This is needed because not all ProvisionableResource classes have a name property with a setter, and we can't put a type bound on T to require it.
