ShareServiceClient Constructors

Definition

Overloads

ShareServiceClient()

Initializes a new instance of the ShareServiceClient class for mocking.

ShareServiceClient(String)

Initializes a new instance of the ShareServiceClient class.

ShareServiceClient(String, ShareClientOptions)

Initializes a new instance of the ShareServiceClient class.

ShareServiceClient(Uri, ShareClientOptions)

Initializes a new instance of the ShareServiceClient class.

ShareServiceClient(Uri, AzureSasCredential, ShareClientOptions)

Initializes a new instance of the ShareServiceClient class.

ShareServiceClient(Uri, TokenCredential, ShareClientOptions)

Initializes a new instance of the ShareServiceClient class.

Note that service-level operations do not support token credential authentication. This constructor exists to allow the construction of a ShareServiceClient that can be used to derive a ShareClient that has token credential authentication.

Also note that ShareTokenIntent is currently required for token authentication.

ShareServiceClient(Uri, StorageSharedKeyCredential, ShareClientOptions)

Initializes a new instance of the ShareServiceClient class.

ShareServiceClient()

Source:
ShareServiceClient.cs
Source:
ShareServiceClient.cs

Initializes a new instance of the ShareServiceClient class for mocking.

protected ShareServiceClient ();
Protected Sub New ()

Applies to

ShareServiceClient(String)

Source:
ShareServiceClient.cs
Source:
ShareServiceClient.cs

Initializes a new instance of the ShareServiceClient class.

public ShareServiceClient (string connectionString);
new Azure.Storage.Files.Shares.ShareServiceClient : string -> Azure.Storage.Files.Shares.ShareServiceClient
Public Sub New (connectionString 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, Configure Azure Storage connection strings.

Applies to

ShareServiceClient(String, ShareClientOptions)

Source:
ShareServiceClient.cs
Source:
ShareServiceClient.cs

Initializes a new instance of the ShareServiceClient class.

public ShareServiceClient (string connectionString, Azure.Storage.Files.Shares.ShareClientOptions options);
new Azure.Storage.Files.Shares.ShareServiceClient : string * Azure.Storage.Files.Shares.ShareClientOptions -> Azure.Storage.Files.Shares.ShareServiceClient
Public Sub New (connectionString 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, Configure Azure Storage connection strings.

options
ShareClientOptions

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

Applies to

ShareServiceClient(Uri, ShareClientOptions)

Source:
ShareServiceClient.cs
Source:
ShareServiceClient.cs

Initializes a new instance of the ShareServiceClient class.

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

Parameters

serviceUri
Uri

A Uri referencing the file service.

options
ShareClientOptions

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

Applies to

ShareServiceClient(Uri, AzureSasCredential, ShareClientOptions)

Source:
ShareServiceClient.cs
Source:
ShareServiceClient.cs

Initializes a new instance of the ShareServiceClient class.

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

Parameters

serviceUri
Uri

A Uri referencing the file service. 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 client options 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

ShareServiceClient(Uri, TokenCredential, ShareClientOptions)

Source:
ShareServiceClient.cs
Source:
ShareServiceClient.cs

Initializes a new instance of the ShareServiceClient class.

Note that service-level operations do not support token credential authentication. This constructor exists to allow the construction of a ShareServiceClient that can be used to derive a ShareClient that has token credential authentication.

Also note that ShareTokenIntent is currently required for token authentication.

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

Parameters

serviceUri
Uri

A Uri referencing the file service.

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

ShareServiceClient(Uri, StorageSharedKeyCredential, ShareClientOptions)

Source:
ShareServiceClient.cs
Source:
ShareServiceClient.cs

Initializes a new instance of the ShareServiceClient class.

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

Parameters

serviceUri
Uri

A Uri referencing the file service.

credential
StorageSharedKeyCredential

The shared key 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