-
-
Notifications
You must be signed in to change notification settings - Fork 72
Azure Files Storage
In order to use Microsoft Azure blob or file storage you need to reference FluentStorage.Azure.Blobs.

To create file share by storage name and key:
IStore store = AzureFilesStorage.FromCredentials(accountName, accountKey);
IStore store = AzureFilesStorage.FromCredentials(accountName, accountKey, serviceUri);To create Azure Files with Shared Key:
IStore store = AzureFilesStorage.FromSharedKey(accountName, accountKey);
IStore store = AzureFilesStorage.FromSharedKey(accountName, accountKey, cloudEnvironment);
IStore store = AzureFilesStorage.FromSharedKey(accountName, accountKey, serviceUri, cloudEnvironment);To create Azure Files with Azure AD (optionally with AD Authority endpoint):
IStore store = AzureFilesStorage.FromAzureAd(accountName, tenantId, applicationId, applicationSecret);
IStore store = AzureFilesStorage.FromAzureAd(accountName, tenantId, applicationId, applicationSecret, cloudEnvironment);
IStore store = AzureFilesStorage.FromAzureAd(accountName, tenantId, applicationId, applicationSecret, activeDirectoryAuthEndpoint);
IStore store = AzureFilesStorage.FromAzureAd(accountName, tenantId, applicationId, applicationSecret, activeDirectoryAuthEndpoint, cloudEnvironment);To create Azure Files with Token Credentials:
IStore store = AzureFilesStorage.FromTokenCredential(accountName, tokenCredential);
IStore store = AzureFilesStorage.FromTokenCredential(accountName, tokenCredential, cloudEnvironment);To create Azure Files with Managed Identity:
IStore store = AzureFilesStorage.FromMsi(accountName);
IStore store = AzureFilesStorage.FromMsi(accountName, cloudEnvironment);
IStore store = AzureFilesStorage.FromMsi(accountName, clientId);
IStore store = AzureFilesStorage.FromMsi(accountName, clientId, cloudEnvironment);To create with connection string, first register the module when your program starts by calling StorageFactory.Modules.UseAzureBlobStorage(); then use the following:
IStore store = StorageFactory.FromConnectionString("azure.file://account=account_name;key=secret_value");To create an instance of Azure Files that wraps around the native SDK ShareServiceClient (use the native option with caution)
IStore store = AzureFilesStorage.FromClient(client);Use our simple polycloud API to perform file and object manipulation operations.
Access some Azure-specific operations by casting IStore to IAzureBlobStore.
Call the IStore.GetClient() method to return the native SDK client and perform any native operations.