ShareFileClient Constructors

Definition

Overloads

ShareFileClient()

Initializes a new instance of the ShareFileClient class for mocking.

ShareFileClient(Uri, ShareClientOptions)

Initializes a new instance of the ShareFileClient class.

ShareFileClient(String, String, String)

Initializes a new instance of the ShareFileClient class.

ShareFileClient(Uri, AzureSasCredential, ShareClientOptions)

Initializes a new instance of the ShareFileClient class.

ShareFileClient(Uri, TokenCredential, ShareClientOptions)

Initializes a new instance of the ShareFileClient class.

Note that ShareTokenIntent is currently required for token authentication.

ShareFileClient(Uri, StorageSharedKeyCredential, ShareClientOptions)

Initializes a new instance of the ShareFileClient class.

ShareFileClient(String, String, String, ShareClientOptions)

Initializes a new instance of the ShareFileClient class.

ShareFileClient()

Source:
ShareFileClient.cs
Source:
ShareFileClient.cs

Initializes a new instance of the ShareFileClient class for mocking.

protected ShareFileClient ();
Protected Sub New ()

Applies to

ShareFileClient(Uri, ShareClientOptions)

Source:
ShareFileClient.cs
Source:
ShareFileClient.cs

Initializes a new instance of the ShareFileClient class.

public ShareFileClient (Uri fileUri, Azure.Storage.Files.Shares.ShareClientOptions options = default);
new Azure.Storage.Files.Shares.ShareFileClient : Uri * Azure.Storage.Files.Shares.ShareClientOptions -> Azure.Storage.Files.Shares.ShareFileClient
Public Sub New (fileUri As Uri, Optional options As ShareClientOptions = Nothing)

Parameters

fileUri
Uri

A Uri referencing the file that includes the name of the account, the name of the share, and the path of the file.

options
ShareClientOptions

Optional ShareClientOptions that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

Applies to

ShareFileClient(String, String, String)

Source:
ShareFileClient.cs
Source:
ShareFileClient.cs

Initializes a new instance of the ShareFileClient class.

public ShareFileClient (string connectionString, string shareName, string filePath);
new Azure.Storage.Files.Shares.ShareFileClient : string * string * string -> Azure.Storage.Files.Shares.ShareFileClient
Public Sub New (connectionString As String, shareName As String, filePath As String)

Parameters

connectionString
String

A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime.

For more information, see Configure Azure Storage connection strings

shareName
String

The name of the share in the storage account to reference.

filePath
String

The path of the file in the storage account to reference.

Applies to

ShareFileClient(Uri, AzureSasCredential, ShareClientOptions)

Source:
ShareFileClient.cs
Source:
ShareFileClient.cs

Initializes a new instance of the ShareFileClient class.

public ShareFileClient (Uri fileUri, Azure.AzureSasCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = default);
new Azure.Storage.Files.Shares.ShareFileClient : Uri * Azure.AzureSasCredential * Azure.Storage.Files.Shares.ShareClientOptions -> Azure.Storage.Files.Shares.ShareFileClient
Public Sub New (fileUri As Uri, credential As AzureSasCredential, Optional options As ShareClientOptions = Nothing)

Parameters

fileUri
Uri

A Uri referencing the file that includes the name of the account, the name of the share, and the path of the file. Must not contain shared access signature, which should be passed in the second parameter.

credential
AzureSasCredential

The shared access signature credential used to sign requests.

options
ShareClientOptions

Optional ShareClientOptions that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

Remarks

This constructor should only be used when shared access signature needs to be updated during lifespan of this client.

Applies to

ShareFileClient(Uri, TokenCredential, ShareClientOptions)

Source:
ShareFileClient.cs
Source:
ShareFileClient.cs

Initializes a new instance of the ShareFileClient class.

Note that ShareTokenIntent is currently required for token authentication.

public ShareFileClient (Uri fileUri, Azure.Core.TokenCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = default);
new Azure.Storage.Files.Shares.ShareFileClient : Uri * Azure.Core.TokenCredential * Azure.Storage.Files.Shares.ShareClientOptions -> Azure.Storage.Files.Shares.ShareFileClient
Public Sub New (fileUri As Uri, credential As TokenCredential, Optional options As ShareClientOptions = Nothing)

Parameters

fileUri
Uri

A Uri referencing the file that includes the name of the account, the name of the share, and the path of the file.

credential
TokenCredential

The token credential used to sign requests.

options
ShareClientOptions

Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

Applies to

ShareFileClient(Uri, StorageSharedKeyCredential, ShareClientOptions)

Source:
ShareFileClient.cs
Source:
ShareFileClient.cs

Initializes a new instance of the ShareFileClient class.

public ShareFileClient (Uri fileUri, Azure.Storage.StorageSharedKeyCredential credential, Azure.Storage.Files.Shares.ShareClientOptions options = default);
new Azure.Storage.Files.Shares.ShareFileClient : Uri * Azure.Storage.StorageSharedKeyCredential * Azure.Storage.Files.Shares.ShareClientOptions -> Azure.Storage.Files.Shares.ShareFileClient
Public Sub New (fileUri As Uri, credential As StorageSharedKeyCredential, Optional options As ShareClientOptions = Nothing)

Parameters

fileUri
Uri

A Uri referencing the file that includes the name of the account, the name of the share, and the path of the file.

credential
StorageSharedKeyCredential

The shared key credential used to sign requests.

options
ShareClientOptions

Optional ShareClientOptions that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

Applies to

ShareFileClient(String, String, String, ShareClientOptions)

Source:
ShareFileClient.cs
Source:
ShareFileClient.cs

Initializes a new instance of the ShareFileClient class.

public ShareFileClient (string connectionString, string shareName, string filePath, Azure.Storage.Files.Shares.ShareClientOptions options);
new Azure.Storage.Files.Shares.ShareFileClient : string * string * string * Azure.Storage.Files.Shares.ShareClientOptions -> Azure.Storage.Files.Shares.ShareFileClient
Public Sub New (connectionString As String, shareName As String, filePath As String, options As ShareClientOptions)

Parameters

connectionString
String

A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime.

For more information, see Configure Azure Storage connection strings

shareName
String

The name of the share in the storage account to reference.

filePath
String

The path of the file in the storage account to reference.

options
ShareClientOptions

Optional ShareClientOptions that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

Applies to