Skip to content
Docs Try Aspire

AzureProvisionableAspireResource<T> Methods

Class Methods 4 members
An Aspire wrapper around an Azure.Provisioning.ProvisionableResource.
AddAsExistingResource(AzureResourceInfrastructure) Section titled AddAsExistingResource(AzureResourceInfrastructure) virtual T
public abstract class AzureProvisionableAspireResource<T>
{
public virtual T AddAsExistingResource(
AzureResourceInfrastructure infra)
{
// ...
}
}
infra AzureResourceInfrastructure
FromExisting(string) Section titled FromExisting(string) abstract T
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)
{
// ...
}
}
bicepIdentifier string
GetProvisionableResource(AzureResourceInfrastructure, string) Section titled GetProvisionableResource(AzureResourceInfrastructure, string) staticnullable T?
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)
{
// ...
}
}
infra AzureResourceInfrastructure
bicepIdentifier string
SetName(T, BicepValue<string>) Section titled SetName(T, BicepValue<string>) abstract
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)
{
// ...
}
}
provisionableResource T
name BicepValue<string>