Share via


ResourceExtensions.GetDeploymentTargetAnnotation Method

Definition

Gets the deployment target for the specified resource, if any. Throws an exception if there are multiple compute environments and a compute environment is not explicitly specified.

public static Aspire.Hosting.ApplicationModel.DeploymentTargetAnnotation? GetDeploymentTargetAnnotation(this Aspire.Hosting.ApplicationModel.IResource resource, Aspire.Hosting.ApplicationModel.IComputeEnvironmentResource? targetComputeEnvironment = default);
static member GetDeploymentTargetAnnotation : Aspire.Hosting.ApplicationModel.IResource * Aspire.Hosting.ApplicationModel.IComputeEnvironmentResource -> Aspire.Hosting.ApplicationModel.DeploymentTargetAnnotation
<Extension()>
Public Function GetDeploymentTargetAnnotation (resource As IResource, Optional targetComputeEnvironment As IComputeEnvironmentResource = Nothing) As DeploymentTargetAnnotation

Parameters

resource
IResource
targetComputeEnvironment
IComputeEnvironmentResource

Returns

Applies to