Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Storage.Files.Shares;
using Azure.Storage.Files.Shares.Models;

namespace Azure.Storage.DataMovement.Files.Shares
{
Expand Down Expand Up @@ -300,7 +301,10 @@ public StorageResource FromDirectory(Uri directoryUri, ShareFileStorageResourceO
{
CredentialType.None => new ShareDirectoryClient(directoryUri),
CredentialType.SharedKey => new ShareDirectoryClient(directoryUri, _getStorageSharedKeyCredential(directoryUri, false)),
CredentialType.Token => new ShareDirectoryClient(directoryUri, _getTokenCredential(directoryUri, false)),
CredentialType.Token => new ShareDirectoryClient(
directoryUri,
_getTokenCredential(directoryUri, false),
new ShareClientOptions { ShareTokenIntent = ShareTokenIntent.Backup }),
CredentialType.Sas => new ShareDirectoryClient(directoryUri, _getAzureSasCredential(directoryUri, false)),
_ => throw BadCredentialTypeException(_credentialType),
};
Expand All @@ -327,7 +331,10 @@ public StorageResource FromFile(
{
CredentialType.None => new ShareFileClient(fileUri),
CredentialType.SharedKey => new ShareFileClient(fileUri, _getStorageSharedKeyCredential(fileUri, false)),
CredentialType.Token => new ShareFileClient(fileUri, _getTokenCredential(fileUri, false)),
CredentialType.Token => new ShareFileClient(
fileUri,
_getTokenCredential(fileUri, false),
new ShareClientOptions { ShareTokenIntent = ShareTokenIntent.Backup }),
CredentialType.Sas => new ShareFileClient(fileUri, _getAzureSasCredential(fileUri, false)),
_ => throw BadCredentialTypeException(_credentialType),
};
Expand Down
Loading