EN
Dette innholdet er ikke tilgjengelig på ditt språk, men her er den engelske versjonen.

CloudBlobClient Class

 

Updated: September 1, 2016

Provides a client-side logical representation of Microsoft Azure Blob storage.

Namespace:   Microsoft.WindowsAzure.Storage.Blob
Assembly:  Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)

System.Object
  Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient

public class CloudBlobClient

NameDescription
System_CAPS_pubmethodCloudBlobClient(StorageUri, StorageCredentials)

Initializes a new instance of the CloudBlobClient class using the specified Blob service endpoint and account credentials.

System_CAPS_pubmethodCloudBlobClient(Uri)

Initializes a new instance of the CloudBlobClient class using the specified Blob service endpoint and anonymous credentials.

System_CAPS_pubmethodCloudBlobClient(Uri, StorageCredentials)

Initializes a new instance of the CloudBlobClient class using the specified Blob service endpoint and account credentials.

NameDescription
System_CAPS_pubpropertyAuthenticationScheme

Gets or sets the authentication scheme that the service client is using to sign HTTP requests (Shared Key or Shared Key Lite).

System_CAPS_pubpropertyBaseUri

Gets the base URI for the Blob service client at the primary location.

System_CAPS_pubpropertyBufferManager

Gets or sets a buffer manager that implements the IBufferManager interface, specifying a buffer pool for use with operations against the Blob service client.

System_CAPS_pubpropertyCredentials

Gets the account credentials used to create the Blob service client.

System_CAPS_pubpropertyDefaultDelimiter

Gets or sets the default delimiter that may be used to create a virtual directory structure of blobs.

System_CAPS_pubpropertyDefaultRequestOptions

Gets or sets the default request options for requests made via the Blob service client.

System_CAPS_pubpropertyRetryPolicy

Obsolete. Gets or sets the default retry policy for requests made via the Blob service client.

System_CAPS_pubpropertyStorageUri

Gets the Blob service endpoint for the primary location for all storage accounts, and the endpoint for the secondary location for accounts that support read-access geo-redundant storage (RA-GRS).

NameDescription
System_CAPS_pubmethodBeginGetBlobReferenceFromServer(StorageUri, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, Object)

Begins an asynchronous operation to get a reference to a blob by making a request to the service.

System_CAPS_pubmethodBeginGetBlobReferenceFromServer(Uri, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, Object)

Begins an asynchronous operation to get a reference to a blob by making a request to the service.

System_CAPS_pubmethodBeginGetBlobReferenceFromServer(Uri, AsyncCallback, Object)

Begins an asynchronous operation to get a reference to a blob by making a request to the service.

System_CAPS_pubmethodBeginGetServiceProperties(AsyncCallback, Object)

Begins an asynchronous operation to get service properties for the Blob service.

System_CAPS_pubmethodBeginGetServiceProperties(BlobRequestOptions, OperationContext, AsyncCallback, Object)

Begins an asynchronous operation to get service properties for the Blob service.

System_CAPS_pubmethodBeginGetServiceStats(AsyncCallback, Object)

Begins an asynchronous operation to get service stats for the secondary Blob service endpoint.

System_CAPS_pubmethodBeginGetServiceStats(BlobRequestOptions, OperationContext, AsyncCallback, Object)

Begins an asynchronous operation to get service stats for the secondary Blob service endpoint.

System_CAPS_pubmethodBeginListBlobsSegmented(String, BlobContinuationToken, AsyncCallback, Object)

Begins an asynchronous operation to return a result segment containing a collection of blob items in the container.

System_CAPS_pubmethodBeginListBlobsSegmented(String, Boolean, BlobListingDetails, Nullable<Int32>, BlobContinuationToken, BlobRequestOptions, OperationContext, AsyncCallback, Object)

Begins an asynchronous operation to return a result segment containing a collection of blob items in the container.

System_CAPS_pubmethodBeginListContainersSegmented(BlobContinuationToken, AsyncCallback, Object)

Begins an asynchronous request to return a result segment containing a collection of containers.

System_CAPS_pubmethodBeginListContainersSegmented(String, BlobContinuationToken, AsyncCallback, Object)

Begins an asynchronous request to return a result segment containing a collection of containers.

System_CAPS_pubmethodBeginListContainersSegmented(String, ContainerListingDetails, Nullable<Int32>, BlobContinuationToken, BlobRequestOptions, OperationContext, AsyncCallback, Object)

Begins an asynchronous request to return a result segment containing a collection of containers whose names begin with the specified prefix.

System_CAPS_pubmethodBeginSetServiceProperties(ServiceProperties, AsyncCallback, Object)

Begins an asynchronous operation to set service properties for the Blob service.

System_CAPS_pubmethodBeginSetServiceProperties(ServiceProperties, BlobRequestOptions, OperationContext, AsyncCallback, Object)

Begins an asynchronous operation to set service properties for the Blob service.

System_CAPS_pubmethodEndGetBlobReferenceFromServer(IAsyncResult)

Ends an asynchronous operation to get a reference to a blob by making a request to the service.

System_CAPS_pubmethodEndGetServiceProperties(IAsyncResult)

Ends an asynchronous operation to get service properties for the Blob service.

System_CAPS_pubmethodEndGetServiceStats(IAsyncResult)

Ends an asynchronous operation to get service stats for the secondary Blob service endpoint.

System_CAPS_pubmethodEndListBlobsSegmented(IAsyncResult)

Ends an asynchronous operation to return a result segment containing a collection of blob items in the container.

System_CAPS_pubmethodEndListContainersSegmented(IAsyncResult)

Ends an asynchronous operation to return a result segment containing a collection of containers.

System_CAPS_pubmethodEndSetServiceProperties(IAsyncResult)

Ends an asynchronous operation to set service properties for the Blob service.

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetBlobReferenceFromServer(StorageUri, AccessCondition, BlobRequestOptions, OperationContext)

Gets a reference to a blob by making a request to the service.

System_CAPS_pubmethodGetBlobReferenceFromServer(Uri, AccessCondition, BlobRequestOptions, OperationContext)

Gets a reference to a blob by making a request to the service.

System_CAPS_pubmethodGetBlobReferenceFromServerAsync(StorageUri, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation that gets a reference to a blob by making a request to the service.

System_CAPS_pubmethodGetBlobReferenceFromServerAsync(StorageUri, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation that gets a reference to a blob by making a request to the service.

System_CAPS_pubmethodGetBlobReferenceFromServerAsync(Uri)

Initiates an asynchronous operation that gets a reference to a blob by making a request to the service.

System_CAPS_pubmethodGetBlobReferenceFromServerAsync(Uri, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation that gets a reference to a blob by making a request to the service.

System_CAPS_pubmethodGetBlobReferenceFromServerAsync(Uri, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation that gets a reference to a blob by making a request to the service.

System_CAPS_pubmethodGetBlobReferenceFromServerAsync(Uri, CancellationToken)

Initiates an asynchronous operation that gets a reference to a blob by making a request to the service.

System_CAPS_pubmethodGetContainerReference(String)

Returns a reference to a CloudBlobContainer object with the specified name.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetRootContainerReference()

Returns a reference to the root container.

System_CAPS_pubmethodGetServiceProperties(BlobRequestOptions, OperationContext)

Gets service properties for the Blob service.

System_CAPS_pubmethodGetServicePropertiesAsync()

Initiates an asynchronous operation to get service properties for the Blob service.

System_CAPS_pubmethodGetServicePropertiesAsync(BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to get service properties for the Blob service.

System_CAPS_pubmethodGetServicePropertiesAsync(BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to get service properties for the Blob service.

System_CAPS_pubmethodGetServicePropertiesAsync(CancellationToken)

Initiates an asynchronous operation to get service properties for the Blob service.

System_CAPS_pubmethodGetServiceStats(BlobRequestOptions, OperationContext)

Gets service stats for the secondary Blob service endpoint.

System_CAPS_pubmethodGetServiceStatsAsync()

Initiates an asynchronous operation to get service stats for the secondary Blob service endpoint.

System_CAPS_pubmethodGetServiceStatsAsync(BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to get service stats for the secondary Blob service endpoint.

System_CAPS_pubmethodGetServiceStatsAsync(BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to get service stats for the secondary Blob service endpoint.

System_CAPS_pubmethodGetServiceStatsAsync(CancellationToken)

Initiates an asynchronous operation to get service stats for the secondary Blob service endpoint.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodListBlobs(String, Boolean, BlobListingDetails, BlobRequestOptions, OperationContext)

Returns an enumerable collection of blobs in the container, retrieved lazily.

System_CAPS_pubmethodListBlobsSegmented(String, BlobContinuationToken)

Returns a result segment containing a collection of blob items in the container.

System_CAPS_pubmethodListBlobsSegmented(String, Boolean, BlobListingDetails, Nullable<Int32>, BlobContinuationToken, BlobRequestOptions, OperationContext)

Returns a result segment containing a collection of blob items in the container.

System_CAPS_pubmethodListBlobsSegmentedAsync(String, BlobContinuationToken)

Initiates an asynchronous operation to return a result segment containing a collection of blob items in the container.

System_CAPS_pubmethodListBlobsSegmentedAsync(String, BlobContinuationToken, CancellationToken)

Initiates an asynchronous operation to return a result segment containing a collection of blob items in the container.

System_CAPS_pubmethodListBlobsSegmentedAsync(String, Boolean, BlobListingDetails, Nullable<Int32>, BlobContinuationToken, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to return a result segment containing a collection of blob items in the container.

System_CAPS_pubmethodListBlobsSegmentedAsync(String, Boolean, BlobListingDetails, Nullable<Int32>, BlobContinuationToken, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to return a result segment containing a collection of blob items in the container.

System_CAPS_pubmethodListContainers(String, ContainerListingDetails, BlobRequestOptions, OperationContext)

Returns an enumerable collection of containers whose names begin with the specified prefix and that are retrieved lazily.

System_CAPS_pubmethodListContainersSegmented(BlobContinuationToken)

Returns a result segment containing a collection of CloudBlobContainer objects.

System_CAPS_pubmethodListContainersSegmented(String, BlobContinuationToken)

Returns a result segment containing a collection of CloudBlobContainer objects.

System_CAPS_pubmethodListContainersSegmented(String, ContainerListingDetails, Nullable<Int32>, BlobContinuationToken, BlobRequestOptions, OperationContext)

Returns a result segment containing a collection of containers whose names begin with the specified prefix.

System_CAPS_pubmethodListContainersSegmentedAsync(BlobContinuationToken)

Initiates an asynchronous operation to return a result segment containing a collection of containers.

System_CAPS_pubmethodListContainersSegmentedAsync(BlobContinuationToken, CancellationToken)

Initiates an asynchronous operation to return a result segment containing a collection of containers.

System_CAPS_pubmethodListContainersSegmentedAsync(String, BlobContinuationToken)

Initiates an asynchronous operation to return a result segment containing a collection of containers.

System_CAPS_pubmethodListContainersSegmentedAsync(String, BlobContinuationToken, CancellationToken)

Initiates an asynchronous operation to return a result segment containing a collection of containers.

System_CAPS_pubmethodListContainersSegmentedAsync(String, ContainerListingDetails, Nullable<Int32>, BlobContinuationToken, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to return a result segment containing a collection of containers.

System_CAPS_pubmethodListContainersSegmentedAsync(String, ContainerListingDetails, Nullable<Int32>, BlobContinuationToken, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to return a result segment containing a collection of containers.

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodSetServiceProperties(ServiceProperties, BlobRequestOptions, OperationContext)

Sets service properties for the Blob service.

System_CAPS_pubmethodSetServicePropertiesAsync(ServiceProperties)

Initiates an asynchronous operation that sets service properties for the Blob service.

System_CAPS_pubmethodSetServicePropertiesAsync(ServiceProperties, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation that sets service properties for the Blob service.

System_CAPS_pubmethodSetServicePropertiesAsync(ServiceProperties, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation that sets service properties for the Blob service.

System_CAPS_pubmethodSetServicePropertiesAsync(ServiceProperties, CancellationToken)

Initiates an asynchronous operation that sets service properties for the Blob service.

System_CAPS_pubmethodToString()

(Inherited from Object.)

The Blob service client provides an abstraction for developing against Azure Blob storage. This object serves as an entry point in your code for programming with blobs.

The Blob service client stores credentials for use in subsequent operations. Valid credentials may be your account name and account key, or a shared access signature (SAS). You may also create a service client for anonymous operations.

You can use the service client to configure settings on the Blob service itself, such as storage analytics and CORS. The service client may also store other settings for requests against Blob storage. For example, you can specify options on the service client's DefaultRequestOptions property, such as a default retry policy or server timeout for all Blob service operations that use the service client.

A simple way to return an instance of a CloudBlobClient object is to create a CloudStorageAccount object to represent your account, and then call the CreateCloudBlobClient method (shown in the example below). You can also use the CloudBlobClient constructors to create a new instance.

Here's an example that parses a connection string from a configuration file (such as app.config or web.config) to create a CloudStorageAccount object, then calls CreateCloudBlobClient to create the service client. This example uses the Microsoft Azure Configuration Manager; to try it, you'll need to install that package from NuGet, and add a using statement to your code.

CloudStorageAccount storageAccount;

try
{
    // Use the Azure CloudConfigurationManager class to return a named connection string from a config file. 
    storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
}
catch (StorageException e)
{
    Console.WriteLine(e.Message);
    Console.ReadLine();
    throw;
}

// Create service client for credentialed access to the Blob service.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();

In the example above, the connection string may use Shared Key authentication, or a shared access signature (SAS). For more information on connection strings for Azure Storage, see Configure Azure Storage Connection Strings.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Vis: