Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithRelationship

Method
📦 Aspire.Hosting v17.0.0
func (Resource) WithRelationship(
resourceBuilder Resource,
type_ string,
) Resource

Signature

methodWithRelationshipbuilder
Adds a relationship to another resource using its builder.
WithRelationship(
resourceBuilder Resource,
type_ string,
) Resource
resourceBuilderResourceThe resource builder that the relationship is to.
type_stringThe relationship type.
Resource

A resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: