Skip to content
DocsTry Aspire
DocsTry

AzureBicepResource Methods

ClassMethods3 members
Represents an Azure Bicep resource.
Gets the path to the bicep file. If the template is a string or embedded resource, it will be written to a temporary file.
public class AzureBicepResource
{
public virtual BicepTemplateFile GetBicepTemplateFile(
string? directory = null,
bool deleteTemporaryFileOnDispose = true)
{
// ...
}
}
directorystring?optionalThe directory where the bicep file will be written to (if it's a temporary file)
deleteTemporaryFileOnDisposebooloptionalA boolean that determines if the file should be deleted on disposal of the BicepTemplateFile.
BicepTemplateFileA BicepTemplateFile that represents the bicep file.
InvalidOperationException
GetBicepTemplateStringSection titled GetBicepTemplateStringvirtualstring
Get the bicep template as a string. Does not write to disk.
public class AzureBicepResource
{
public virtual string GetBicepTemplateString()
{
// ...
}
}
WriteToManifest(ManifestPublishingContext)Section titled WriteToManifest(ManifestPublishingContext)virtual
Writes the resource to the manifest.
public class AzureBicepResource
{
public virtual void WriteToManifest(
ManifestPublishingContext context)
{
// ...
}
}
contextManifestPublishingContextThe Publishing.ManifestPublishingContext.