-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[New article]: Document child resource support in hosting and client generations #2907
Comments
@IEvangelist Outline of the new child resource client integration for you. You can find a sample app showcasing the feature at https://github.com/captainsafia/aspire-child-resources if you want to poke around with it. I think we can update the integration page for each resource individually with a new heading for the child integration bits. Let me know if you need any more info. |
@captainsafia — please send me a request for perspective! This is awesome, thank you so much. I cannot overstate how hopeful this is to delivering valuable developer content. 🥳 |
* Add CosmosDB parent-child relationship bits. Part of #2907 * A few fixes * Update docs/database/azure-cosmos-db-integration.md Co-authored-by: Safia Abdalla <[email protected]> * Update docs/database/azure-cosmos-db-integration.md Co-authored-by: Safia Abdalla <[email protected]> * A few updates based on feedback * Add a few more bits * Add more details about the web pubsub. * Apply suggestions from code review Co-authored-by: Safia Abdalla <[email protected]> --------- Co-authored-by: Safia Abdalla <[email protected]>
* Remove IsAspireHost bits. Fixes #2847 * New dashboard config to disable resource graph (#2874) * Fixes #2842 * Update configuration.md Co-authored-by: James Newton-King <[email protected]> --------- Co-authored-by: James Newton-King <[email protected]> * Position VS Code first * Add clarifying details about updates to `AddDatabase` APIs (#2878) * Contributes to #2789 * Added PostgreSQL and links to eventing * Quick edit pass * Apply suggestions from code review Co-authored-by: Andy (Steve) De George <[email protected]> --------- Co-authored-by: Andy (Steve) De George <[email protected]> * Adding GitHub Copilot prompts (#2896) * Initial prompts * Update prompts * Adding content for `WithHttpCommand` (#2875) * Initial setup * Rework HTTP command content with an example * Add images and more details. * Edit pass * Added playground sample * Update HTTP command content with updated source * Remove duplicated code snippet * Correct member over parameter * Fix name * Correct postgres connection command * Update kafka-integration.md (#2712) Change links von provectuslabs to Kafbat * Add role assignments with .NET Aspire (#2891) * Getting closer on adding roles details * Apply suggestions from code review Co-authored-by: Andy (Steve) De George <[email protected]> * Address feedback and update content * Add to TOC * Edit pass * Add link * Fix a few issues * Remove absolute URL --------- Co-authored-by: Andy (Steve) De George <[email protected]> * Breaking changes for .NET Aspire 9.2 (#2892) * Added breaking changes for 9.2, fixes #2888 and fixes #2889 * Correct TOC * Add clarifying type name * Fixes #2899 * Added new breaking changes docs * Remove link * Correct MD lint error/warnings * Bump bicep bits (#2930) * Update docs to use `EndpointProperty.HostAndPort` where appropriate (#2934) Fixes #2646 * Reorganize the order of the Azure storage content (#2937) * Fixes #2935 * Tweak table style * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> --------- Co-authored-by: Genevieve Warren <[email protected]> * Add content on customizing resource URLs (#2940) * Fixes #2936 * Correct TOC * Minor tweaks * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> * Apply suggestions from code review Co-authored-by: Damian Edwards <[email protected]> * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review --------- Co-authored-by: Genevieve Warren <[email protected]> Co-authored-by: Damian Edwards <[email protected]> * Add CosmosDB parent-child relationship bits. (#2912) * Add CosmosDB parent-child relationship bits. Part of #2907 * A few fixes * Update docs/database/azure-cosmos-db-integration.md Co-authored-by: Safia Abdalla <[email protected]> * Update docs/database/azure-cosmos-db-integration.md Co-authored-by: Safia Abdalla <[email protected]> * A few updates based on feedback * Add a few more bits * Add more details about the web pubsub. * Apply suggestions from code review Co-authored-by: Safia Abdalla <[email protected]> --------- Co-authored-by: Safia Abdalla <[email protected]> * Add new Azure PostgreSQL client integrations. (#2905) * Replace manual identity code with new package. Fixes #2883 * Add xref reminders. * Replace standard clients * Correct leading para * Apply suggestions from code review * Adjustment from peer reviews * Correct terminology * .NET Aspire 💜 Playwright (#2904) * WIP * Initial bits in place * Yeah, now we're cookin'! * OMG, I'm having too much fun! * Add a few more bits * Encapsulate selector. * Even more images automated, and better coverage. * More coverage... * Added more coverage. * More images and coverage. * A bit more clean up * Added a few more bits and updated. * Fixed link issue * Fix last issue * Tracing and structured log pages * Apply suggestions from code review * Update docs/fundamentals/dashboard/automation/aspire-dashboard/Aspire.Dashboard.ScreenCapture/README.md * Add "Configure Azure Container App environments" article (#3058) * Yuck, too rough of a draft but need to context switch. * Tweaks * Let's go, this fixes #2938 * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> --------- Co-authored-by: Genevieve Warren <[email protected]> * What's new in .NET Aspire 9.2 (#2877) * Add initial bits for #2869. What's new in .NET Aspire 9.2 * Add a few more what's new bits * Add dashboard config * Add initial details about HTTP commands * Apply suggestions from code review Co-authored-by: Andy (Steve) De George <[email protected]> * Edit pass * Add link to breaking changes * Removed MS-collected telemetry * Try toying with TOC * Expand product updates * Apply suggestions from code review Co-authored-by: Maddy Montaquila (Leger) <[email protected]> * Delete section * Update .NET Aspire 9.2 documentation * Update docs/whats-new/dotnet-aspire-9.2.md * Update connection string and deployment section * Added testing updates * Update docs/whats-new/dotnet-aspire-9.2.md Co-authored-by: James Newton-King <[email protected]> * Clean up * Minor updates * Apply suggestions from code review Co-authored-by: David Fowler <[email protected]> * Apply suggestions from code review Co-authored-by: David Fowler <[email protected]> * Apply suggestions from code review Co-authored-by: David Fowler <[email protected]> * Apply suggestions from code review Co-authored-by: David Fowler <[email protected]> * Add images * Final tweaks before release branch --------- Co-authored-by: Andy (Steve) De George <[email protected]> Co-authored-by: Maddy Montaquila (Leger) <[email protected]> Co-authored-by: David Fowler <[email protected]> Co-authored-by: Mitch Denny <[email protected]> Co-authored-by: James Newton-King <[email protected]> * Bump versions * nits (#3064) * Fix build issues * More fixes * Move things * Move even more things * Point to 9.2 * Fix bookmakrs --------- Co-authored-by: James Newton-King <[email protected]> Co-authored-by: Andy (Steve) De George <[email protected]> Co-authored-by: Stefan Nikolei <[email protected]> Co-authored-by: Alex Crome <[email protected]> Co-authored-by: Genevieve Warren <[email protected]> Co-authored-by: Damian Edwards <[email protected]> Co-authored-by: Safia Abdalla <[email protected]> Co-authored-by: Maddy Montaquila (Leger) <[email protected]> Co-authored-by: David Fowler <[email protected]> Co-authored-by: Mitch Denny <[email protected]>
Proposed topic or title
Child Resource Integration in .NET Aspire 9.2
Location in table of contents.
/ Integrations / Azure / Azure Cosmos DB
/ Integrations / Azure / Azure Service Bus
/ Integrations / Azure / Azure WebPub Sub
Reason for the article
In 9.1, we adeded support for modeling child resource dependencies on the host. In 9.2, we added support for modeling child resources on the client integrations. This issue outlines documenting the client integration portion.
Article abstract
Child resource support on the client integration side is a net new feature for:
Setting Up Azure Resources with Aspire AppHost
1. CosmosDB Integration
2. Service Bus Integration
3. Web PubSub Integration
Connecting Services to Resources
1. Reference-Based Resource Injection
2. Role-Based Access Control
We should make a note that when used in conjunction with the new role-based access control APIs, the role assignments can only be applied on the parent resource. We don't yet support granular assignments on child resources.
In the example below, to set write access on the ServiceBus
hub
we apply the role assignment to its parent (servcieBus
).Client Integration in Services
1. Service Bus Client Integration
For Service Bus, there are no new APIs on the client integration. However, it is possible to
WithReference
a child resource then use the connection string connfiguration injected by the child resource reference. In the example below, we use theappointment-requests
's resouce connection string to initialize the ServiceBus client.2. CosmosDB Client Integration
The CosmosDB client integration has the following new APIs:
The
AddAzureCosmosContainer
andAddKeyedAzureCosmosContainer
insert an instance the CosmosDBContainer
class into the DI container. In the example below, theAddAzureCosmosContainer
method injects aContainer
instance that points to the container referenced in theappointments
connection string.The
AddAzureCosmosDatabase
andAddKeyedAzureCosmosDatabase
overloads returns an instance of the newCosmosDatabaseBuilder
API that can be used to attach multiple containers that are all part of the same database.In the example below, we can inject
Container
instances associated with two different containers ("appointments" and "clients") in the same database.Some things to note about the
CosmosDatabaseBuilder
pattern:appointments-app-db
) needs to be included as a reference in the AppHost. Theappointments
andclients
strings in the above example refer to container names not database names.AddAzureCosmosDatabase
call share the sameCosmosClient
instance. This strategy can be used to associate the sameCosmosClientOptions
with multiple containers.3. Web PubSub Client Integration
The
WebPubSub
integration supports two new overloads:AddKeyedAzureWebPubSubServiceClient(string connectionName)
AddAzureWebPubSubServiceClient(string connectionName)
The
connectionName
that the overloads consume is the connection name associated with a child resource reference in the AppHost. In the example below,apptnotifications
is the name of a WebPubSub Hub that has been referenced.The keyed variants of the overload are helpful when multiple hubs need to be referenced from the same application.
Relevant searches
No response
Associated WorkItem - 416512
The text was updated successfully, but these errors were encountered: