Microsoft.Azure.Storage.Blob.CloudBlob
Represents a blob.
Gets the type of the blob.
Gets a CloudBlobContainer object representing the blob's container.
Gets the state of the most recent or pending copy operation.
Gets a value indicating whether or not this blob has been deleted.
Gets a value indicating whether this blob is a snapshot.
Gets the user-defined metadata for the blob.
Gets the name of the blob.
Gets the CloudBlobDirectory object representing the virtual parent directory for the blob.
Gets the blob's system properties.
Gets the CloudBlobClient object that represents the Blob service.
Gets the blob's URI for both the primary and secondary locations, including query string information if the blob is a snapshot.
Gets the absolute URI to the blob, including query string information if the blob is a snapshot.
Gets the date and time that the blob snapshot was taken, if this blob is a snapshot.
Gets the blob's URIs for both the primary and secondary locations.
Gets or sets the minimum number of bytes to buffer when reading from a blob stream.
Gets the blob's URI for the primary location.
Initializes a new instance of the CloudBlob class using an absolute URI to the blob.
Initializes a new instance of the CloudBlob class using an absolute URI to the blob.
Initializes a new instance of the CloudBlob class using an absolute URI to the blob.
Initializes a new instance of the CloudBlob class using an absolute URI to the blob.
Initializes a new instance of the CloudBlob class using an absolute URI to the blob.
public CloudBlob(StorageUri blobAbsoluteUri, DateTimeOffset? snapshotTime, StorageCredentials credentials)
Initializes a new instance of the CloudBlob class using an absolute URI to the blob.
Initializes a new instance of the CloudBlob class using an absolute URI to the blob.
Aborts an ongoing blob copy operation.
public virtual Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Aborts an ongoing blob copy operation.
public virtual Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Aborts an ongoing blob copy operation.
Acquires a lease on this blob.
public virtual Task<string> AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Acquires a lease on this blob.
public virtual Task<string> AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Acquires a lease on this blob.
Breaks the current lease on this blob.
public virtual Task<TimeSpan> BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Breaks the current lease on this blob.
public virtual Task<TimeSpan> BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Breaks the current lease on this blob.
public virtual Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition)
Changes the lease ID on this blob.
public virtual Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Changes the lease ID on this blob.
public virtual Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Changes the lease ID on this blob.
Deletes the blob.
public virtual Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Deletes the blob.
public virtual Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Deletes the blob.
Deletes the blob if it already exists.
public virtual Task<bool> DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Deletes the blob if it already exists.
public virtual Task<bool> DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Deletes the blob if it already exists.
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length)
Downloads a range of bytes from a blob to a byte array.
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Downloads a range of bytes from a blob to a byte array.
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Downloads a range of bytes from a blob to a byte array.
public virtual Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Downloads a range of bytes from a blob to a byte array.
Downloads a range of bytes from a blob to a stream.
public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Downloads a range of bytes from a blob to a stream.
public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Downloads a range of bytes from a blob to a stream.
public virtual Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Downloads a range of bytes from a blob to a stream.
Downloads the contents of a blob to a byte array.
public virtual Task<int> DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Downloads the contents of a blob to a byte array.
public virtual Task<int> DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Downloads the contents of a blob to a byte array.
public virtual Task<int> DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Downloads the contents of a blob to a byte array.
public virtual Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
public virtual Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Downloads the contents of a blob to a file.
public virtual Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Downloads the contents of a blob to a file.
Downloads the contents of a blob to a stream.
public virtual Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Downloads the contents of a blob to a stream.
public virtual Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Downloads the contents of a blob to a stream.
public virtual Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Downloads the contents of a blob to a stream.
Checks existence of the blob.
public virtual Task<bool> ExistsAsync(BlobRequestOptions options, OperationContext operationContext)
Checks existence of the blob.
public virtual Task<bool> ExistsAsync(BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Checks existence of the blob.
Populates a blob's properties and metadata.
public virtual Task FetchAttributesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Populates a blob's properties and metadata.
public virtual Task FetchAttributesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Populates a blob's properties and metadata.
Initiates an asynchronous operation to get properties for the account this blob resides on.
public virtual Task<AccountProperties> GetAccountPropertiesAsync(CancellationToken cancellationToken)
Initiates an asynchronous operation to get properties for the account this blob resides on.
public virtual Task<AccountProperties> GetAccountPropertiesAsync(BlobRequestOptions requestOptions, OperationContext operationContext)
Initiates an asynchronous operation to get properties for the account this blob resides on.
public virtual Task<AccountProperties> GetAccountPropertiesAsync(BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
Initiates an asynchronous operation to get properties for the account this blob resides on.
Returns a shared access signature for the blob.
Returns a shared access signature for the blob.
public string GetSharedAccessSignature(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers)
Returns a shared access signature for the blob.
public string GetSharedAccessSignature(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers, string groupPolicyIdentifier)
Returns a shared access signature for the blob.
public string GetSharedAccessSignature(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers, string groupPolicyIdentifier, SharedAccessProtocol? protocols, IPAddressOrRange ipAddressOrRange)
Returns a shared access signature for the blob.
public string GetUserDelegationSharedAccessSignature(UserDelegationKey delegationKey, SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers = null, SharedAccessProtocol? protocols = default, IPAddressOrRange ipAddressOrRange = null)
Returns an user-delegation-based shared access signature for the blob, with credentials solely based on the UserDelegationKey provided.
Opens a stream for reading from the blob.
public virtual Task<Stream> OpenReadAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Opens a stream for reading from the blob.
public virtual Task<Stream> OpenReadAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Opens a stream for reading from the blob.
Releases the lease on this blob.
public virtual Task ReleaseLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Releases the lease on this blob.
public virtual Task ReleaseLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Releases the lease on this blob.
Renews a lease on this blob.
public virtual Task RenewLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Renews a lease on this blob.
public virtual Task RenewLeaseAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Renews a lease on this blob.
Updates the blob's metadata.
public virtual Task SetMetadataAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Updates the blob's metadata.
public virtual Task SetMetadataAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Updates the blob's metadata.
Updates the blob's properties.
public virtual Task SetPropertiesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Updates the blob's properties.
public virtual Task SetPropertiesAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Updates the blob's properties.
Creates a snapshot of the blob.
public virtual Task<CloudBlob> SnapshotAsync(IDictionary<string, string> metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Creates a snapshot of the blob.
public virtual Task<CloudBlob> SnapshotAsync(IDictionary<string, string> metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Creates a snapshot of the blob.
Begins an operation to start copying an existing blob's contents, properties, and metadata to a new blob.
Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata
to this blob.
public virtual Task<string> StartCopyAsync(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)
Begins an operation to start copying an existing blob's contents, properties, and metadata to a new blob.
public virtual Task<string> StartCopyAsync(Uri source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Begins an operation to start copying a blob's contents, properties, and metadata to a new blob.
public virtual Task<string> StartCopyAsync(Uri source, PremiumPageBlobTier? premiumPageBlobTier, StandardBlobTier? standardBlockBlobTier, RehydratePriority? rehydratePriority, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata
to this blob.
Initiates an asynchronous operation to undelete the soft-deleted blob.
Initiates an asynchronous operation to undelete the soft-deleted blob.
public virtual Task UndeleteAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Initiates an asynchronous operation to undelete the soft-deleted blob.
public virtual Task UndeleteAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Initiates an asynchronous operation to undelete the soft-deleted blob.