Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionSt
{
var model = Parent.IsEmulator ? ModelId ?? ModelName : DeploymentName;
return Parent.CombineProperties([
new("Model", ReferenceExpression.Create($"{model}")),
new("ModelName", ReferenceExpression.Create($"{model}")),
new("Format", ReferenceExpression.Create($"{Format}")),
new("Version", ReferenceExpression.Create($"{ModelVersion}")),
]);
Expand Down
4 changes: 2 additions & 2 deletions src/Aspire.Hosting.Azure.AIFoundry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ The Azure AI Foundry deployment resource inherits all properties from its parent

| Property Name | Description |
|---------------|-------------|
| `Model` | The deployment name when targeting Azure or model identifier when running Foundry Local, e.g., `Phi-4`, `my-chat` |
| `ModelName` | The deployment name when targeting Azure or model identifier when running Foundry Local, e.g., `Phi-4`, `my-chat` |
| `Format` | The deployment format, .e.g., `OpenAI`, `Microsoft`, `xAi`, `Deepseek` |
| `Version` | The deployment version, e.g., `1`, `2025-08-07` |

Note: The property named `Model` refers to the deployment name when targeting Azure AI Foundry, but to the model identifier when running Foundry Local.
Note: The property named `ModelName` refers to the deployment name when targeting Azure AI Foundry, but to the model identifier when running Foundry Local.

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `chat` becomes `CHAT_URI`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionSt
yield return property;
}

yield return new("Model", ReferenceExpression.Create($"{DeploymentName}"));
yield return new("ModelName", ReferenceExpression.Create($"{DeploymentName}"));
}

private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null)
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Azure.CognitiveServices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The Azure OpenAI deployment resource inherits all properties from its parent Azu

| Property Name | Description |
|---------------|-------------|
| `Model` | The name of the Azure OpenAI deployment, e.g., `chat` |
| `ModelName` | The name of the Azure OpenAI deployment, e.g., `chat` |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `chat` becomes `CHAT_URI`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionSt
yield return property;
}

yield return new("Database", ReferenceExpression.Create($"{DatabaseName}"));
yield return new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}"));
}
}
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Azure.CosmosDB/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The Cosmos DB database resource inherits all properties from its parent Cosmos D

| Property Name | Description |
|---------------|-------------|
| `Database` | The name of the database |
| `DatabaseName` | The name of the database |

### Cosmos DB container

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionSt
yield return property;
}

yield return new("ConsumerGroup", ReferenceExpression.Create($"{ConsumerGroupName}"));
yield return new("ConsumerGroupName", ReferenceExpression.Create($"{ConsumerGroupName}"));
}
}
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Azure.EventHubs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The Event Hub consumer group resource inherits all properties from its parent Ev

| Property Name | Description |
|---------------|-------------|
| `ConsumerGroup` | The name of the consumer group |
| `ConsumerGroupName` | The name of the consumer group |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionSt
yield return property;
}

yield return new("Database", ReferenceExpression.Create($"{DatabaseName}"));
yield return new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}"));
}
}
}
4 changes: 2 additions & 2 deletions src/Aspire.Hosting.Azure.Kusto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ When you reference Azure Kusto resources using `WithReference`, the following co
| Property Name | Description |
|---------------|-------------|
| `Uri` | The cluster endpoint URI (inherited from parent cluster) |
| `Database` | The name of the database |
| `DatabaseName` | The name of the database |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `mydb` becomes `MYDB_URI`, and the `Database` property becomes `MYDB_DATABASE`.
Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `mydb` becomes `MYDB_URI`, and the `DatabaseName` property becomes `MYDB_DATABASENAME`.

## Additional documentation

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ internal void SetInnerResource(PostgresDatabaseResource innerResource)

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties([
new("Database", ReferenceExpression.Create($"{DatabaseName}")),
new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")),
new("Uri", UriExpression),
new("JdbcConnectionString", JdbcConnectionString),
]);
Expand Down
6 changes: 3 additions & 3 deletions src/Aspire.Hosting.Azure.PostgreSQL/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ The Azure PostgreSQL database resource inherits all properties from its parent s

| Property Name | Description |
|---------------|-------------|
| `Database` | The name of the database |
| `Uri` | The database-specific connection URI, with the format `postgresql://{Username}:{Password}@{Host}/{Database}` (credentials omitted when not applicable) |
| `JdbcConnectionString` | JDBC-format connection string for the database, with the format `jdbc:postgresql://{Host}/{Database}?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin` |
| `DatabaseName` | The name of the database |
| `Uri` | The database-specific connection URI, with the format `postgresql://{Username}:{Password}@{Host}/{DatabaseName}` (credentials omitted when not applicable) |
| `JdbcConnectionString` | JDBC-format connection string for the database, with the format `jdbc:postgresql://{Host}/{DatabaseName}?sslmode=require&authenticationPluginClassName=com.azure.identity.extensions.jdbc.postgresql.AzurePostgresqlAuthenticationPlugin` |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`.

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Azure.Sql/AzureSqlDatabaseResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ internal void SetInnerResource(SqlServerDatabaseResource innerResource)
IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties(
[
new ("Database", ReferenceExpression.Create($"{DatabaseName}")),
new ("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")),
new ("Uri", UriExpression),
new ("JdbcConnectionString", JdbcConnectionString),
]);
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Azure.Sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ The Azure SQL database resource inherits all properties from its parent Azure SQ

| Property Name | Description |
|---------------|-------------|
| `Database` | The name of the database |
| `DatabaseName` | The name of the database |
| `Uri` | The connection URI, with the format `mssql://{Host}:{Port}/{DatabaseName}` |
| `JdbcConnectionString` | JDBC connection string with the format `jdbc:sqlserver://{Host}:{Port};database={DatabaseName};encrypt=true;trustServerCertificate=false`; |

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.GitHub.Models/GitHubModelResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionSt
{
yield return new("Uri", UriExpression);
yield return new("Key", ReferenceExpression.Create($"{Key}"));
yield return new("Model", ReferenceExpression.Create($"{Model}"));
yield return new("ModelName", ReferenceExpression.Create($"{Model}"));

if (Organization is not null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.GitHub.Models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The GitHub Model resource exposes the following connection properties:
|---------------|-------------|
| `Uri` | The GitHub Models inference endpoint URI, with the format `https://models.github.ai/inference` |
| `Key` | The API key (PAT or GitHub App token) for authentication |
| `Model` | The model identifier for inference requests, for instance `openai/gpt-4o-mini` |
| `ModelName` | The model identifier for inference requests, for instance `openai/gpt-4o-mini` |
| `Organization` | The organization attributed to the request (available when configured) |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `chat` becomes `CHAT_URI`.
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Milvus/MilvusDatabaseResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties([
new("Database", ReferenceExpression.Create($"{DatabaseName}"))
new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}"))
]);
}
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Milvus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The Milvus database resource combines the server properties above and adds the f

| Property Name | Description |
|---------------|-------------|
| `Database` | The Milvus database name |
| `DatabaseName` | The Milvus database name |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`.

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.MongoDB/MongoDBDatabaseResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties([
new("Database", ReferenceExpression.Create($"{DatabaseName}")),
new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")),
new("Uri", UriExpression),
]);
}
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.MongoDB/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The MongoDB database resource combines the server properties above and adds the

| Property Name | Description |
|---------------|-------------|
| `Database` | The MongoDB database name |
| `DatabaseName` | The MongoDB database name |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`.

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.MySql/MySqlDatabaseResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties([
new("Database", ReferenceExpression.Create($"{DatabaseName}")),
new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")),
new("Uri", UriExpression),
new("JdbcConnectionString", JdbcConnectionString),
]);
Expand Down
6 changes: 3 additions & 3 deletions src/Aspire.Hosting.MySql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ The MySQL database resource combines the server properties above and adds the fo

| Property Name | Description |
|---------------|-------------|
| `Database` | The MySQL database name |
| `Uri` | The database-specific URI, with the format `mysql://root:{Password}@{Host}:{Port}/{Database}` |
| `JdbcConnectionString` | The database-specific JDBC connection string, with the format `jdbc:mysql://{Host}:{Port}/{Database}`. User and password credentials are provided as separate `Username` and `Password` properties. |
| `DatabaseName` | The MySQL database name |
| `Uri` | The database-specific URI, with the format `mysql://root:{Password}@{Host}:{Port}/{DatabaseName}` |
| `JdbcConnectionString` | The database-specific JDBC connection string, with the format `jdbc:mysql://{Host}:{Port}/{DatabaseName}`. User and password credentials are provided as separate `Username` and `Password` properties. |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`.

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.OpenAI/OpenAIModelResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ public OpenAIModelResource(string name, string model, OpenAIResource parent) : b

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties([
new("Model", ReferenceExpression.Create($"{Model}")),
new("ModelName", ReferenceExpression.Create($"{Model}")),
]);
}
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.OpenAI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ The OpenAI model resource combines the parent properties above and adds the foll

| Property Name | Description |
|---------------|-------------|
| `Model` | The model identifier for inference requests, for instance `gpt-4o-mini` |
| `ModelName` | The model identifier for inference requests, for instance `gpt-4o-mini` |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `chat` becomes `CHAT_URI`.

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Oracle/OracleDatabaseResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties([
new("Database", ReferenceExpression.Create($"{DatabaseName}")),
new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")),
new("Uri", UriExpression),
new("JdbcConnectionString", JdbcConnectionString),
]);
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Oracle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The Oracle database resource inherits all properties from its parent `OracleData
|---------------|-------------|
| `Uri` | The connection URI in oracle:// format, with the format `oracle://{Username}:{Password}@{Host}:{Port}/{DatabaseName}` |
| `JdbcConnectionString` | JDBC connection string with database name, with the format `jdbc:oracle:thin:@//{Host}:{Port}/{DatabaseName}`. User and password credentials are provided as separate `Username` and `Password` properties. |
| `Database` | The name of the database |
| `DatabaseName` | The name of the database |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`.

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.PostgreSQL/PostgresDatabaseResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties([
new("Database", ReferenceExpression.Create($"{DatabaseName}")),
new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")),
new("Uri", UriExpression),
new("JdbcConnectionString", JdbcConnectionString),
]);
Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.PostgreSQL/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The PostgreSQL database resource inherits all properties from its parent `Postgr
|---------------|-------------|
| `Uri` | The connection URI with the database name, with the format `postgresql://{Username}:{Password}@{Host}:{Port}/{DatabaseName}` |
| `JdbcConnectionString` | JDBC connection string with database name, with the format `jdbc:postgresql://{Host}:{Port}/{DatabaseName}`. User and password credentials are provided as separate `Username` and `Password` properties. |
| `Database` | The name of the database |
| `DatabaseName` | The name of the database |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`.

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.SqlServer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The SQL Server database resource inherits all properties from its parent `SqlSer
|---------------|-------------|
| `Uri` | The connection URI in mssql:// format, with the format `mssql://{Username}:{Password}@{Host}:{Port}/{DatabaseName}` |
| `JdbcConnectionString` | JDBC connection string with database name, with the format `jdbc:sqlserver://{Host}:{Port};trustServerCertificate=true;databaseName={DatabaseName}`. User and password credentials are provided as separate `Username` and `Password` properties. |
| `Database` | The name of the database |
| `DatabaseName` | The name of the database |

Aspire exposes each property as an environment variable named `[RESOURCE]_[PROPERTY]`. For instance, the `Uri` property of a resource called `db1` becomes `DB1_URI`.

Expand Down
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ private static string ThrowIfNullOrEmpty([NotNull] string? argument, [CallerArgu

IEnumerable<KeyValuePair<string, ReferenceExpression>> IResourceWithConnectionString.GetConnectionProperties() =>
Parent.CombineProperties([
new("Database", ReferenceExpression.Create($"{DatabaseName}")),
new("DatabaseName", ReferenceExpression.Create($"{DatabaseName}")),
new("Uri", UriExpression),
new("JdbcConnectionString", JdbcConnectionString),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void AzureKustoDatabaseResourceGetConnectionPropertiesReturnsExpectedValu
},
property =>
{
Assert.Equal("Database", property.Key);
Assert.Equal("DatabaseName", property.Key);
Assert.Equal("testdb", property.Value.ValueExpression);
});
}
Expand All @@ -85,7 +85,7 @@ public void AzureKustoDatabaseResourceWithEmulatorGetConnectionPropertiesReturns
},
property =>
{
Assert.Equal("Database", property.Key);
Assert.Equal("DatabaseName", property.Key);
Assert.Equal("testdb", property.Value.ValueExpression);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void AzureAIFoundryDeploymentResourceGetConnectionPropertiesReturnsExpect
},
property =>
{
Assert.Equal("Model", property.Key);
Assert.Equal("ModelName", property.Key);
Assert.Equal(AIFoundryModel.Local.Phi4.Name, property.Value.ValueExpression);
},
property =>
Expand Down Expand Up @@ -69,7 +69,7 @@ public void AzureAIFoundryDeploymentResourceGetConnectionPropertiesReturnsExpect
},
property =>
{
Assert.Equal("Model", property.Key);
Assert.Equal("ModelName", property.Key);
// Should be AIFoundryModel.Microsoft.Phi4.Format but assigned dynamically
Assert.Equal("chat", property.Value.ValueExpression);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void AzureCosmosDBContainerResourceGetConnectionPropertiesReturnsExpected
},
property =>
{
Assert.Equal("Database", property.Key);
Assert.Equal("DatabaseName", property.Key);
Assert.Equal("mydb", property.Value.ValueExpression);
},
property =>
Expand Down Expand Up @@ -68,7 +68,7 @@ public void AzureCosmosDBContainerResourceWithAccessKeyAuthenticationGetConnecti
},
property =>
{
Assert.Equal("Database", property.Key);
Assert.Equal("DatabaseName", property.Key);
Assert.Equal("mydb", property.Value.ValueExpression);
},
property =>
Expand Down Expand Up @@ -108,7 +108,7 @@ public void AzureCosmosDBContainerResourceEmulatorGetConnectionPropertiesReturns
},
property =>
{
Assert.Equal("Database", property.Key);
Assert.Equal("DatabaseName", property.Key);
Assert.Equal("mydb", property.Value.ValueExpression);
},
property =>
Expand Down
Loading