Skip to content
Docs Try Aspire

AzureStorageExtensions

Class static net10.0
📦 Aspire.Hosting.Azure.Storage v13.1.2
Extension methods for adding Azure Storage resources to an application model.
namespace Aspire.Hosting;
public static class AzureStorageExtensions
{
// ...
}
AddAzureStorage(IDistributedApplicationBuilder, string)extension
IResourceBuilder<AzureStorageResource>
Adds an Azure Storage resource to the application model. This resource can be used to create Azure blob, table, and queue resources.
AddBlobContainer(IResourceBuilder<AzureStorageResource>, string, string?)extension
IResourceBuilder<AzureBlobStorageContainerResource>
Creates a builder for the AzureBlobStorageContainerResource which can be referenced to get the Azure Storage blob container endpoint for the storage account.
AddBlobContainer(IResourceBuilder<AzureBlobStorageResource>, string, string?)extensionobsolete
IResourceBuilder<AzureBlobStorageContainerResource>
Creates a builder for the AzureBlobStorageContainerResource which can be referenced to get the Azure Storage blob container endpoint for the storage account.
AddBlobs(IResourceBuilder<AzureStorageResource>, string)extension
IResourceBuilder<AzureBlobStorageResource>
Creates a builder for the AzureBlobStorageResource which can be referenced to get the Azure Storage blob endpoint for the storage account.
AddQueue(IResourceBuilder<AzureStorageResource>, string, string?)extension
IResourceBuilder<AzureQueueStorageQueueResource>
Creates a builder for the AzureQueueStorageQueueResource which can be referenced to get the Azure Storage queue for the storage account.
AddQueues(IResourceBuilder<AzureStorageResource>, string)extension
IResourceBuilder<AzureQueueStorageResource>
Creates a builder for the AzureQueueStorageResource which can be referenced to get the Azure Storage queues endpoint for the storage account.
AddTables(IResourceBuilder<AzureStorageResource>, string)extension
IResourceBuilder<AzureTableStorageResource>
Creates a builder for the AzureTableStorageResource which can be referenced to get the Azure Storage tables endpoint for the storage account.
RunAsEmulator(IResourceBuilder<AzureStorageResource>, Action<IResourceBuilder<AzureStorageEmulatorResource>>)extension
IResourceBuilder<AzureStorageResource>
WithApiVersionCheck(IResourceBuilder<AzureStorageEmulatorResource>, bool)extension
IResourceBuilder<AzureStorageEmulatorResource>
Ensures the emulator checks that the requested API version is valid.
WithBlobPort(IResourceBuilder<AzureStorageEmulatorResource>, int)extension
IResourceBuilder<AzureStorageEmulatorResource>
Modifies the host port that the storage emulator listens on for blob requests.
WithDataBindMount(IResourceBuilder<AzureStorageEmulatorResource>, string?, bool)extension
IResourceBuilder<AzureStorageEmulatorResource>
Adds a bind mount for the data folder to an Azure Storage emulator resource.
WithDataVolume(IResourceBuilder<AzureStorageEmulatorResource>, string?, bool)extension
IResourceBuilder<AzureStorageEmulatorResource>
Adds a named volume for the data folder to an Azure Storage emulator resource.
WithQueuePort(IResourceBuilder<AzureStorageEmulatorResource>, int)extension
IResourceBuilder<AzureStorageEmulatorResource>
Modifies the host port that the storage emulator listens on for queue requests.
WithRoleAssignments(IResourceBuilder<T>, IResourceBuilder<AzureStorageResource>, StorageBuiltInRole[])extension
IResourceBuilder<T>
Assigns the specified roles to the given resource, granting it the necessary permissions on the target Azure Storage account. This replaces the default role assignments for the resource.
WithTablePort(IResourceBuilder<AzureStorageEmulatorResource>, int)extension
IResourceBuilder<AzureStorageEmulatorResource>
Modifies the host port that the storage emulator listens on for table requests.
View all methods