Class AzureUtils
java.lang.Object
com.microsoftopentechnologies.windowsazurestorage.helper.AzureUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
generateBlobSASURL
(StorageAccountInfo storageAccount, String containerName, String blobName, com.azure.storage.blob.sas.BlobSasPermission permissions) static String
generateFileSASURL
(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.BlobContainerClient
getBlobContainerReference
(StorageAccountInfo storageAccount, String containerName, boolean createIfNotExist, boolean allowRetry, Boolean cntPubAccess) static com.azure.storage.blob.BlobServiceClient
getCloudStorageAccount
(StorageAccountInfo storageAccount) static com.azure.storage.blob.BlobServiceClient
getCloudStorageAccount
(StorageAccountInfo storageAccount, com.azure.storage.common.policy.RequestRetryOptions retryOptions) static com.azure.storage.file.share.ShareServiceClient
getShareClient
(StorageAccountInfo storageAccount) static boolean
validateStorageAccount
(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:
URISyntaxException
IOException
-
generateBlobSASURL
public static String generateBlobSASURL(StorageAccountInfo storageAccount, String containerName, String blobName, com.azure.storage.blob.sas.BlobSasPermission permissions)
-