Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AsExisting

Method
📦 Aspire.Hosting.Azure v17.0.0
func (AzureResource) AsExisting(
name any,
options ...*AsExistingOptions,
) AzureResource

Signature

methodAsExistingbuilder
Marks the resource as an existing resource in both run and publish modes.
AsExisting(
name any,
options ...*AsExistingOptions,
) AzureResource
nameanyThe name of the existing resource as a string or parameter resource.
options...*AsExistingOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AsExistingOptions argument.

ResourceGroupanyThe name of the existing resource group as a string or parameter resource.
AzureResource

The resource builder with the existing resource annotation added.

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

Applies to

This method applies to the following types: