AzureProvisionableAspireResource<T> Methods
ClassMethods4 members
An Aspire wrapper around an Azure.Provisioning.ProvisionableResource.
AddAsExistingResource(AzureResourceInfrastructure)Section titled AddAsExistingResource(AzureResourceInfrastructure)overrideT Adds a new
Primitives.ProvisionableResource into infra. The new resource represents a reference to the current Azure.AzureProvisioningResource via https://learn.microsoft.com/azure/azure-resource-manager/bicep/existing-resource. public abstract class AzureProvisionableAspireResource<T>{ public override T AddAsExistingResource( AzureResourceInfrastructure infra) { // ... }}Parameters
infraAzureResourceInfrastructureThe Azure.AzureResourceInfrastructure to add the existing resource into.Returns
TA new Primitives.ProvisionableResource, typically using the FromExisting method on the derived Primitives.ProvisionableResource class. Gets the Azure.Provisioning resource from an existing Bicep identifier. Because static methods can't be abstract, this is an instance method.
public abstract class AzureProvisionableAspireResource<T>{ public abstract T FromExisting( string bicepIdentifier) { // ... }}Parameters
bicepIdentifierstringGetProvisionableResource(AzureResourceInfrastructure, string)Section titled GetProvisionableResource(AzureResourceInfrastructure, string)staticnullableT? Get the underlying provisionable resource of type T for the given AzureProvisioningResource.
public abstract class AzureProvisionableAspireResource<T>{ public static T? GetProvisionableResource( AzureResourceInfrastructure infra, string bicepIdentifier) { // ... }}Parameters
infraAzureResourceInfrastructurebicepIdentifierstring Sets the name of the provisionable resource. This is needed because not all ProvisionableResource classes have a name property with a setter, and we can't put a type bound on T to require it.
public abstract class AzureProvisionableAspireResource<T>{ public abstract void SetName( T provisionableResource, BicepValue<string> name) { // ... }}Parameters
provisionableResourceTnameBicepValue<string>