# AzureOpenAIResource Properties

- Package: [Aspire.Hosting.Azure.CognitiveServices](/reference/api/csharp/aspire.hosting.azure.cognitiveservices.md)
- Type: [AzureOpenAIResource](/reference/api/csharp/aspire.hosting.azure.cognitiveservices/azureopenairesource.md)
- Kind: `Properties`
- Members: `7`

Represents an Azure OpenAI resource.

## ConnectionString

- Name: `ConnectionString`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIResource.cs#L29)

Gets the "connectionString" output reference from the Azure OpenAI resource.

```csharp
public BicepOutputReference ConnectionString { get; }
```

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIResource.cs#L59)

Gets the connection string template for the manifest for the resource.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

## Deployments

> **Obsolete:** AzureOpenAIDeployment is deprecated.

- Name: `Deployments`
- Modifiers: `get`
- Returns: [IReadOnlyList<AzureOpenAIDeployment>](/reference/api/csharp/aspire.hosting.azure.cognitiveservices/azureopenaideployment.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIResource.cs#L68)

Gets the list of deployments of the Azure OpenAI resource.

```csharp
public IReadOnlyList<AzureOpenAIDeployment> Deployments { get; }
```

## Endpoint

- Name: `Endpoint`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIResource.cs#L34)

Gets the service endpoint URI expression for the Azure OpenAI resource.

```csharp
public BicepOutputReference Endpoint { get; }
```

## Id

- Name: `Id`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIResource.cs#L44)

Gets the "id" output reference for the resource.

```csharp
public BicepOutputReference Id { get; }
```

## NameOutputReference

- Name: `NameOutputReference`
- Modifiers: `get`
- Returns: `BicepOutputReference`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIResource.cs#L39)

Gets the "name" output reference for the resource.

```csharp
public BicepOutputReference NameOutputReference { get; }
```

## UriExpression

- Name: `UriExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.CognitiveServices/AzureOpenAIResource.cs#L53)

Gets the connection URI expression for the Azure OpenAI endpoint.

```csharp
public ReferenceExpression UriExpression { get; }
```

## Remarks

Format: The Azure OpenAI endpoint URL.
