Share via


ExistingAzureResourceExtensions.RunAsExisting Method

Definition

Overloads

RunAsExisting<T>(IResourceBuilder<T>, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>)

Marks the resource as an existing resource when the application is running.

RunAsExisting<T>(IResourceBuilder<T>, String, String)

Marks the resource as an existing resource when the application is running.

RunAsExisting<T>(IResourceBuilder<T>, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>)

Source:
ExistingAzureResourceExtensions.cs

Marks the resource as an existing resource when the application is running.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> RunAsExisting<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> nameParameter, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource>? resourceGroupParameter = default) where T : Aspire.Hosting.ApplicationModel.IAzureResource;
static member RunAsExisting : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IAzureResource)> * Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> * Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IAzureResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.IAzureResource)
<Extension()>
Public Function RunAsExisting(Of T As IAzureResource) (builder As IResourceBuilder(Of T), nameParameter As IResourceBuilder(Of ParameterResource), Optional resourceGroupParameter As IResourceBuilder(Of ParameterResource) = Nothing) As IResourceBuilder(Of T)

Type Parameters

T

The type of the resource.

Parameters

builder
IResourceBuilder<T>

The resource builder.

nameParameter
IResourceBuilder<ParameterResource>

The name of the existing resource.

resourceGroupParameter
IResourceBuilder<ParameterResource>

The name of the existing resource group, or null to use the current resource group.

Returns

The resource builder with the existing resource annotation added.

Applies to

RunAsExisting<T>(IResourceBuilder<T>, String, String)

Source:
ExistingAzureResourceExtensions.cs

Marks the resource as an existing resource when the application is running.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<T> RunAsExisting<T>(this Aspire.Hosting.ApplicationModel.IResourceBuilder<T> builder, string name, string? resourceGroup = default) where T : Aspire.Hosting.ApplicationModel.IAzureResource;
static member RunAsExisting : Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IAzureResource)> * string * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<'T (requires 'T :> Aspire.Hosting.ApplicationModel.IAzureResource)> (requires 'T :> Aspire.Hosting.ApplicationModel.IAzureResource)
<Extension()>
Public Function RunAsExisting(Of T As IAzureResource) (builder As IResourceBuilder(Of T), name As String, Optional resourceGroup As String = Nothing) As IResourceBuilder(Of T)

Type Parameters

T

The type of the resource.

Parameters

builder
IResourceBuilder<T>

The resource builder.

name
String

The name of the existing resource.

resourceGroup
String

The name of the existing resource group, or null to use the current resource group.

Returns

The resource builder with the existing resource annotation added.

Applies to