Skip to content
DocsTry Aspire
DocsTry

AzureProvisionableAspireResource<T> Methods

ClassMethods4 members
An Aspire wrapper around an Azure.Provisioning.ProvisionableResource.
AddAsExistingResource(AzureResourceInfrastructure)Section titled AddAsExistingResource(AzureResourceInfrastructure)virtualT
public abstract class AzureProvisionableAspireResource<T>
{
public virtual T AddAsExistingResource(
AzureResourceInfrastructure infra)
{
// ...
}
}
infraAzureResourceInfrastructure
FromExisting(string)Section titled FromExisting(string)abstractT
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)
{
// ...
}
}
bicepIdentifierstring
GetProvisionableResource(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)
{
// ...
}
}
infraAzureResourceInfrastructure
bicepIdentifierstring
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)
{
// ...
}
}
provisionableResourceT
nameBicepValue<string>