CloudBlobClient.GetBlockBlobReference Method (String, Nullable)

Storage Client Library NET API

[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.]

Returns a reference to a CloudBlockBlob with the specified address, and with the specified snapshot timestamp, if the blob is a snapshot.

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

Usage

Visual Basic
Dim instance As CloudBlobClient
Dim blobAddress As String
Dim snapshotTime As Nullable(Of DateTime)
Dim returnValue As CloudBlockBlob

returnValue = instance.GetBlockBlobReference(blobAddress, snapshotTime)

Syntax

Visual Basic
Public Function GetBlockBlobReference ( _
	blobAddress As String, _
	snapshotTime As Nullable(Of DateTime) _
) As CloudBlockBlob
C#
public CloudBlockBlob GetBlockBlobReference (
	string blobAddress,
	Nullable<DateTime> snapshotTime
)
C++
public:
CloudBlockBlob^ GetBlockBlobReference (
	String^ blobAddress, 
	Nullable<DateTime> snapshotTime
)
J#
JScript

Parameters

blobAddress

Type: System.String

The absolute URI to the blob, or a relative URI beginning with the container name.

snapshotTime

Type: System.Nullable

The snapshot timestamp, if the blob is a snapshot.

Return Value

Type: Microsoft.WindowsAzure.StorageClient.CloudBlockBlob

A reference to a block blob.

Remarks

The GetBlockBlobReference method returns a reference to the named block blob, but it does not indicate whether the blob exists, as it does not make a round-trip to the service. If you need to ascertain the blob's existence, call a method such as FetchAttributes, and handle the resulting StorageClientException in the event the blob does not exist. The FetchAttributes method executes a HEAD request to populate the blob's properties and metadata and as such is a lightweight option for determining whether the blob exists.


Thread Safety

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

Platforms

Development Platforms

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

See Also