CloudBlob Constructor (String, Nullable, StorageCredentials)

Updated: April 24, 2013

[This topic is part of the Microsoft Azure Storage Client Library 1.7, which has been deprecated. See Storage Client Library for the latest version.]

Initializes a new instance of the CloudBlob class using an absolute URI to the blob, and the snapshot timestamp, if the blob is a snapshot.

Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)

Dim blobAbsoluteUri As String
Dim snapshotTime As Nullable(Of DateTime)
Dim credentials As StorageCredentials

Dim instance As New CloudBlob(blobAbsoluteUri, snapshotTime, credentials)

public CloudBlob (
	string blobAbsoluteUri,
	Nullable<DateTime> snapshotTime,
	StorageCredentials credentials



Type: System.String

The absolute URI to the blob.


Type: System.Nullable

The snapshot timestamp, if the blob is a snapshot.


Type: Microsoft.WindowsAzure.StorageCredentials

The account credentials.

The following code example creates a new blob snapshot using a relative URI, a timestamp of an existing snapshot, and storage credentials.

static void CreateBlobSnapshot2(Uri blobEndpoint, string accountName, string accountKey)
    // Use the account name and key to create storage credentials.
    StorageCredentialsAccountAndKey storageCredentials = new StorageCredentialsAccountAndKey(accountName, accountKey);

    // Create a service client for credentialed access to the Blob service.
    CloudBlobClient blobClient = new CloudBlobClient(blobEndpoint, storageCredentials);

    // Get a reference to a blob.
    CloudBlob blob = blobClient.GetBlobReference("mycontainer/myblob.txt");

    // Create a snapshot of the blob.
    CloudBlob snapshot = blob.CreateSnapshot();

    // Get the snapshot timestamp.
    DateTime timestamp = (DateTime)snapshot.Attributes.Snapshot;

    // Use the timestamp to get a second reference to the snapshot.
    CloudBlob snapshot2 = new CloudBlob("mycontainer/myblob.txt", timestamp, storageCredentials);

    // Write out the snapshot URI.

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012



CloudBlob Class
CloudBlob Members
Microsoft.WindowsAzure.StorageClient Namespace