Class AzureUtils
java.lang.Object
com.microsoftopentechnologies.windowsazurestorage.helper.AzureUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateBlobSASURL(StorageAccountInfo storageAccount, String containerName, String blobName, com.azure.storage.blob.sas.BlobSasPermission permissions) static StringgenerateFileSASURL(StorageAccountInfo storageAccount, String shareName, String fileName, com.azure.storage.file.share.sas.ShareFileSasPermission permissions) Generates SAS URL for file item in Azure storage File Share.static com.azure.storage.blob.BlobContainerClientgetBlobContainerReference(StorageAccountInfo storageAccount, String containerName, boolean createIfNotExist, boolean allowRetry, Boolean cntPubAccess) static com.azure.storage.blob.BlobServiceClientgetCloudStorageAccount(StorageAccountInfo storageAccount) static com.azure.storage.blob.BlobServiceClientgetCloudStorageAccount(StorageAccountInfo storageAccount, com.azure.storage.common.policy.RequestRetryOptions retryOptions) static com.azure.storage.file.share.ShareServiceClientgetShareClient(StorageAccountInfo storageAccount) static booleanvalidateStorageAccount(StorageAccountInfo storageAccount, boolean allowRetry) This method validates Storage Account credentials by checking for a dummy container existence.
-
Method Details
-
validateStorageAccount
public static boolean validateStorageAccount(StorageAccountInfo storageAccount, boolean allowRetry) throws WAStorageException This method validates Storage Account credentials by checking for a dummy container existence.- Parameters:
storageAccount-- Returns:
- true if valid
- Throws:
WAStorageException
-
getCloudStorageAccount
public static com.azure.storage.blob.BlobServiceClient getCloudStorageAccount(StorageAccountInfo storageAccount) -
getCloudStorageAccount
public static com.azure.storage.blob.BlobServiceClient getCloudStorageAccount(StorageAccountInfo storageAccount, com.azure.storage.common.policy.RequestRetryOptions retryOptions) -
getBlobContainerReference
public static com.azure.storage.blob.BlobContainerClient getBlobContainerReference(StorageAccountInfo storageAccount, String containerName, boolean createIfNotExist, boolean allowRetry, Boolean cntPubAccess) throws URISyntaxException, IOException - Throws:
URISyntaxExceptionIOException
-
generateBlobSASURL
public static String generateBlobSASURL(StorageAccountInfo storageAccount, String containerName, String blobName, com.azure.storage.blob.sas.BlobSasPermission permissions)
-