Class BlobBaseClient
The BlobClient allows you to manipulate Azure Storage blobs.
Namespace: Azure.Storage.Blobs.Specialized
Assembly: Azure.Storage.Blobs.dll
Syntax
public class BlobBaseClient
Constructors
BlobBaseClient()
BlobBaseClient(Uri, BlobClientOptions)
Initializes a new instance of the BlobClient class.
Declaration
public BlobBaseClient (Uri blobUri, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
Uri
blobUri
A Uri referencing the blob that includes the name of the account, the name of the container, and the name of the blob. |
BlobClientOptions
options
Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
BlobBaseClient(String, String, String)
Initializes a new instance of the BlobClient class.
Declaration
public BlobBaseClient (string connectionString, string blobContainerName, string blobName);
Parameters
String
connectionString
A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime. |
String
blobContainerName
The name of the container containing this blob. |
String
blobName
The name of this blob. |
BlobBaseClient(Uri, TokenCredential, BlobClientOptions)
Initializes a new instance of the BlobClient class.
Declaration
public BlobBaseClient (Uri blobUri, Azure.Core.TokenCredential credential, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
Uri
blobUri
A Uri referencing the blob that includes the name of the account, the name of the container, and the name of the blob. |
TokenCredential
credential
The token credential used to sign requests. |
BlobClientOptions
options
Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
BlobBaseClient(Uri, StorageSharedKeyCredential, BlobClientOptions)
BlobBaseClient(String, String, String, BlobClientOptions)
Initializes a new instance of the BlobClient class.
Declaration
public BlobBaseClient (string connectionString, string blobContainerName, string blobName, Azure.Storage.Blobs.BlobClientOptions options);
Parameters
String
connectionString
A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime. |
String
blobContainerName
The name of the container containing this blob. |
String
blobName
The name of this blob. |
BlobClientOptions
options
Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
Properties
AccountName
Gets the Storage account name corresponding to the blob client.
Declaration
public virtual string AccountName { get; }
Property Value
String
|
BlobContainerName
Gets the container name corresponding to the blob client.
Declaration
public virtual string BlobContainerName { get; }
Property Value
String
|
Name
Uri
Gets the blob's primary Uri endpoint.
Declaration
public virtual Uri Uri { get; }
Property Value
Uri
|
Methods
AbortCopyFromUri(String, BlobRequestConditions, CancellationToken)
The AbortCopyFromUri(String, BlobRequestConditions, CancellationToken) operation aborts a pending CopyFromUriOperation, and leaves a this blob with zero length and full metadata.
Declaration
public virtual Azure.Response AbortCopyFromUri (string copyId, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
String
copyId
ID of the copy operation to abort. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on aborting the copy operation. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response
A Response on successfully aborting. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
AbortCopyFromUriAsync(String, BlobRequestConditions, CancellationToken)
The AbortCopyFromUriAsync(String, BlobRequestConditions, CancellationToken) operation aborts a pending CopyFromUriOperation, and leaves a this blob with zero length and full metadata.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> AbortCopyFromUriAsync (string copyId, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
String
copyId
ID of the copy operation to abort. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on aborting the copy operation. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response>
A Response on successfully aborting. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
CreateSnapshot(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
The CreateSnapshot(IDictionary<String,String>, BlobRequestConditions, CancellationToken) operation creates a read-only snapshot of a blob.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobSnapshotInfo> CreateSnapshot (System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
IDictionary<String,String>
metadata
Optional custom metadata to set for this blob snapshot. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting creating this snapshot. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response<BlobSnapshotInfo>
A Response<T> describing the new blob snapshot. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
CreateSnapshotAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
The CreateSnapshotAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken) operation creates a read-only snapshot of a blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobSnapshotInfo>> CreateSnapshotAsync (System.Collections.Generic.IDictionary<string,string> metadata = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
IDictionary<String,String>
metadata
Optional custom metadata to set for this blob snapshot. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting creating this snapshot. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response<BlobSnapshotInfo>>
A Response<T> describing the new blob snapshot. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
Delete(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)
The Delete(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection.
Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time using IncludeSnapshots.
Declaration
public virtual Azure.Response Delete (Azure.Storage.Blobs.Models.DeleteSnapshotsOption snapshotsOption = Azure.Storage.Blobs.Models.DeleteSnapshotsOption.None, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
DeleteSnapshotsOption
snapshotsOption
Specifies options for deleting blob snapshots. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on deleting this blob. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response
A Response on successfully deleting. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DeleteAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)
The DeleteAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection.
Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time using IncludeSnapshots.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteAsync (Azure.Storage.Blobs.Models.DeleteSnapshotsOption snapshotsOption = Azure.Storage.Blobs.Models.DeleteSnapshotsOption.None, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
DeleteSnapshotsOption
snapshotsOption
Specifies options for deleting blob snapshots. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on deleting this blob. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response>
A Response on successfully deleting. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DeleteIfExists(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)
The DeleteIfExists(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion, if the blob exists. The blob is later deleted during garbage collection.
Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time using IncludeSnapshots.
Declaration
public virtual Azure.Response<bool> DeleteIfExists (Azure.Storage.Blobs.Models.DeleteSnapshotsOption snapshotsOption = Azure.Storage.Blobs.Models.DeleteSnapshotsOption.None, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
DeleteSnapshotsOption
snapshotsOption
Specifies options for deleting blob snapshots. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on deleting this blob. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response<Boolean>
A Response on successfully deleting. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DeleteIfExistsAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken)
The DeleteIfExistsAsync(DeleteSnapshotsOption, BlobRequestConditions, CancellationToken) operation marks the specified blob or snapshot for deletion, if the blob exists. The blob is later deleted during garbage collection.
Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time using IncludeSnapshots.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<bool>> DeleteIfExistsAsync (Azure.Storage.Blobs.Models.DeleteSnapshotsOption snapshotsOption = Azure.Storage.Blobs.Models.DeleteSnapshotsOption.None, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
DeleteSnapshotsOption
snapshotsOption
Specifies options for deleting blob snapshots. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on deleting this blob. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response<Boolean>>
A Response on successfully deleting. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
Download()
The Download() operation downloads a blob from the service, including its metadata and properties.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadInfo> Download ();
Returns
Response<BlobDownloadInfo>
A Response<T> describing the downloaded blob. Content contains the blob's data. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
Download(CancellationToken)
The Download(CancellationToken) operation downloads a blob from the service, including its metadata and properties.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadInfo> Download (System.Threading.CancellationToken cancellationToken = null);
Parameters
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response<BlobDownloadInfo>
A Response<T> describing the downloaded blob. Content contains the blob's data. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
Download(HttpRange, BlobRequestConditions, Boolean, CancellationToken)
The Download(HttpRange, BlobRequestConditions, Boolean, CancellationToken) operation downloads a blob from the service, including its metadata and properties.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadInfo> Download (Azure.HttpRange range = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, bool rangeGetContentHash = false, System.Threading.CancellationToken cancellationToken = null);
Parameters
HttpRange
range
If provided, only donwload the bytes of the blob in the specified range. If not provided, download the entire blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on donwloading this blob. |
Boolean
rangeGetContentHash
When set to true and specified together with the |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response<BlobDownloadInfo>
A Response<T> describing the downloaded blob. Content contains the blob's data. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadAsync()
The DownloadAsync() operation downloads a blob from the service, including its metadata and properties.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadInfo>> DownloadAsync ();
Returns
Task<Response<BlobDownloadInfo>>
A Response<T> describing the downloaded blob. Content contains the blob's data. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadAsync(CancellationToken)
The DownloadAsync(CancellationToken) operation downloads a blob from the service, including its metadata and properties.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadInfo>> DownloadAsync (System.Threading.CancellationToken cancellationToken);
Parameters
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response<BlobDownloadInfo>>
A Response<T> describing the downloaded blob. Content contains the blob's data. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadAsync(HttpRange, BlobRequestConditions, Boolean, CancellationToken)
The DownloadAsync(HttpRange, BlobRequestConditions, Boolean, CancellationToken) operation downloads a blob from the service, including its metadata and properties.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadInfo>> DownloadAsync (Azure.HttpRange range = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, bool rangeGetContentHash = false, System.Threading.CancellationToken cancellationToken = null);
Parameters
HttpRange
range
If provided, only donwload the bytes of the blob in the specified range. If not provided, download the entire blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on donwloading this blob. |
Boolean
rangeGetContentHash
When set to true and specified together with the |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response<BlobDownloadInfo>>
A Response<T> describing the downloaded blob. Content contains the blob's data. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadTo(String, BlobRequestConditions, StorageTransferOptions, CancellationToken)
The DownloadTo(String, BlobRequestConditions, StorageTransferOptions, CancellationToken)
operation downloads a blob using parallel requests,
and writes the content to path
.
Declaration
public virtual Azure.Response DownloadTo (string path, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, Azure.Storage.StorageTransferOptions transferOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
String
path
A file path to write the downloaded content to. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on the creation of this new block blob. |
Azure.Storage.StorageTransferOptions
transferOptions
Optional Azure.Storage.StorageTransferOptions to configure parallel transfer behavior. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadTo(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken)
The DownloadTo(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken)
operation downloads a blob using parallel requests,
and writes the content to destination
.
Declaration
public virtual Azure.Response DownloadTo (System.IO.Stream destination, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, Azure.Storage.StorageTransferOptions transferOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
Stream
destination
A Stream to write the downloaded content to. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on the creation of this new block blob. |
Azure.Storage.StorageTransferOptions
transferOptions
Optional Azure.Storage.StorageTransferOptions to configure parallel transfer behavior. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadTo(String, CancellationToken)
The DownloadTo(String, CancellationToken) operation
downloads a blob using parallel requests,
and writes the content to path
.
Declaration
public virtual Azure.Response DownloadTo (string path, System.Threading.CancellationToken cancellationToken);
Parameters
String
path
A file path to write the downloaded content to. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadTo(Stream, CancellationToken)
The DownloadTo(Stream, CancellationToken) operation
downloads a blob using parallel requests,
and writes the content to destination
.
Declaration
public virtual Azure.Response DownloadTo (System.IO.Stream destination, System.Threading.CancellationToken cancellationToken);
Parameters
Stream
destination
A Stream to write the downloaded content to. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadTo(String)
The DownloadTo(String) operation downloads a blob using parallel requests,
and writes the content to path
.
Declaration
public virtual Azure.Response DownloadTo (string path);
Parameters
String
path
A file path to write the downloaded content to. |
Returns
Response
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadTo(Stream)
The DownloadTo(Stream) operation downloads a blob using parallel requests,
and writes the content to destination
.
Declaration
public virtual Azure.Response DownloadTo (System.IO.Stream destination);
Parameters
Stream
destination
A Stream to write the downloaded content to. |
Returns
Response
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadToAsync(Stream)
The DownloadToAsync(Stream) downloads a blob using parallel requests,
and writes the content to destination
.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (System.IO.Stream destination);
Parameters
Stream
destination
A Stream to write the downloaded content to. |
Returns
Task<Response>
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadToAsync(String)
The DownloadToAsync(String) downloads a blob using parallel requests,
and writes the content to path
.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (string path);
Parameters
String
path
A file path to write the downloaded content to. |
Returns
Task<Response>
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadToAsync(Stream, CancellationToken)
The DownloadToAsync(Stream, CancellationToken) operation
downloads a blob using parallel requests,
and writes the content to destination
.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (System.IO.Stream destination, System.Threading.CancellationToken cancellationToken);
Parameters
Stream
destination
A Stream to write the downloaded content to. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response>
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadToAsync(String, CancellationToken)
The DownloadToAsync(String, CancellationToken) operation
downloads a blob using parallel requests,
and writes the content to path
.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (string path, System.Threading.CancellationToken cancellationToken);
Parameters
String
path
A file path to write the downloaded content to. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response>
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadToAsync(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken)
The DownloadToAsync(Stream, BlobRequestConditions, StorageTransferOptions, CancellationToken)
operation downloads a blob using parallel requests,
and writes the content to destination
.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (System.IO.Stream destination, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, Azure.Storage.StorageTransferOptions transferOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
Stream
destination
A Stream to write the downloaded content to. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on the creation of this new block blob. |
Azure.Storage.StorageTransferOptions
transferOptions
Optional Azure.Storage.StorageTransferOptions to configure parallel transfer behavior. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response>
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
DownloadToAsync(String, BlobRequestConditions, StorageTransferOptions, CancellationToken)
The DownloadToAsync(String, BlobRequestConditions, StorageTransferOptions, CancellationToken)
operation downloads a blob using parallel requests,
and writes the content to path
.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> DownloadToAsync (string path, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, Azure.Storage.StorageTransferOptions transferOptions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
String
path
A file path to write the downloaded content to. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on the creation of this new block blob. |
Azure.Storage.StorageTransferOptions
transferOptions
Optional Azure.Storage.StorageTransferOptions to configure parallel transfer behavior. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response>
A Response describing the operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
GetProperties(BlobRequestConditions, CancellationToken)
The GetProperties(BlobRequestConditions, CancellationToken) operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobProperties> GetProperties (Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on getting the blob's properties. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response<BlobProperties>
A Response<T> describing the blob's properties. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
GetPropertiesAsync(BlobRequestConditions, CancellationToken)
The GetPropertiesAsync(BlobRequestConditions, CancellationToken) operation returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobProperties>> GetPropertiesAsync (Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on getting the blob's properties. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response<BlobProperties>>
A Response<T> describing the blob's properties. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
SetAccessTier(AccessTier, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
The SetAccessTier(AccessTier, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken) operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage or general purpose v2 account.
A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag. For detailed information about block blob level tiering
Declaration
public virtual Azure.Response SetAccessTier (Azure.Storage.Blobs.Models.AccessTier accessTier, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, Nullable<Azure.Storage.Blobs.Models.RehydratePriority> rehydratePriority = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
AccessTier
accessTier
Indicates the tier to be set on the blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting the access tier. |
Nullable<RehydratePriority>
rehydratePriority
Optional RehydratePriority Indicates the priority with which to rehydrate an archived blob. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response
A Response on successfully setting the tier. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
SetAccessTierAsync(AccessTier, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
The SetAccessTierAsync(AccessTier, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken) operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage or general purpose v2 account.
A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag. For detailed information about block blob level tiering
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> SetAccessTierAsync (Azure.Storage.Blobs.Models.AccessTier accessTier, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, Nullable<Azure.Storage.Blobs.Models.RehydratePriority> rehydratePriority = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
AccessTier
accessTier
Indicates the tier to be set on the blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting the access tier. |
Nullable<RehydratePriority>
rehydratePriority
Optional RehydratePriority Indicates the priority with which to rehydrate an archived blob. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response>
A Response on successfully setting the tier. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
SetHttpHeaders(BlobHttpHeaders, BlobRequestConditions, CancellationToken)
The SetHttpHeaders(BlobHttpHeaders, BlobRequestConditions, CancellationToken) operation sets system properties on the blob.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobInfo> SetHttpHeaders (Azure.Storage.Blobs.Models.BlobHttpHeaders httpHeaders = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobHttpHeaders
httpHeaders
Optional. The standard HTTP header system properties to set. If not specified, existing values will be cleared. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting the blob's HTTP headers. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response<BlobInfo>
A Response<T> describing the updated blob. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
SetHttpHeadersAsync(BlobHttpHeaders, BlobRequestConditions, CancellationToken)
The SetHttpHeadersAsync(BlobHttpHeaders, BlobRequestConditions, CancellationToken) operation sets system properties on the blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobInfo>> SetHttpHeadersAsync (Azure.Storage.Blobs.Models.BlobHttpHeaders httpHeaders = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobHttpHeaders
httpHeaders
Optional. The standard HTTP header system properties to set. If not specified, existing values will be cleared. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting the blob's HTTP headers. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response<BlobInfo>>
A Response<T> describing the updated blob. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
SetMetadata(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
The SetMetadata(IDictionary<String,String>, BlobRequestConditions, CancellationToken) operation sets user-defined metadata for the specified blob as one or more name-value pairs.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobInfo> SetMetadata (System.Collections.Generic.IDictionary<string,string> metadata, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
IDictionary<String,String>
metadata
Custom metadata to set for this blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting the blob's metadata. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response<BlobInfo>
A Response<T> describing the updated blob. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
SetMetadataAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
The SetMetadataAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken) operation sets user-defined metadata for the specified blob as one or more name-value pairs.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobInfo>> SetMetadataAsync (System.Collections.Generic.IDictionary<string,string> metadata, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
IDictionary<String,String>
metadata
Custom metadata to set for this blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting the blob's metadata. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response<BlobInfo>>
A Response<T> describing the updated blob. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
StartCopyFromUri(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
The StartCopyFromUri(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
operation copies data at from the source
to this
blob. You can check the CopyStatus
returned from the GetProperties(BlobRequestConditions, CancellationToken) to determine if the
copy has completed.
Declaration
public virtual Azure.Storage.Blobs.Models.CopyFromUriOperation StartCopyFromUri (Uri source, System.Collections.Generic.IDictionary<string,string> metadata = null, Nullable<Azure.Storage.Blobs.Models.AccessTier> accessTier = null, Azure.Storage.Blobs.Models.BlobRequestConditions sourceConditions = null, Azure.Storage.Blobs.Models.BlobRequestConditions destinationConditions = null, Nullable<Azure.Storage.Blobs.Models.RehydratePriority> rehydratePriority = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
Uri
source
Specifies the Uri of the source blob. The value may be a Uri of up to 2 KB in length that specifies a blob. A source blob in the same storage account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob must either be public or must be authenticated via a shared access signature. If the source blob is public, no authentication is required to perform the copy operation. The source object may be a file in the Azure File service. If the source object is a file that is to be copied to a blob, then the source file must be authenticated using a shared access signature, whether it resides in the same account or in a different account. |
IDictionary<String,String>
metadata
Optional custom metadata to set for this blob. |
Nullable<AccessTier>
accessTier
Optional AccessTier Indicates the tier to be set on the blob. |
BlobRequestConditions
sourceConditions
Optional BlobRequestConditions to add conditions on the copying of data from this source blob. |
BlobRequestConditions
destinationConditions
Optional BlobRequestConditions to add conditions on the copying of data to this blob. |
Nullable<RehydratePriority>
rehydratePriority
Optional RehydratePriority Indicates the priority with which to rehydrate an archived blob. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
CopyFromUriOperation
A CopyFromUriOperation describing the state of the copy operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
StartCopyFromUriAsync(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
The StartCopyFromUri(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
operation copies data at from the source
to this
blob. You can check the CopyStatus
returned from the GetPropertiesAsync(BlobRequestConditions, CancellationToken) to determine if
the copy has completed.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Storage.Blobs.Models.CopyFromUriOperation> StartCopyFromUriAsync (Uri source, System.Collections.Generic.IDictionary<string,string> metadata = null, Nullable<Azure.Storage.Blobs.Models.AccessTier> accessTier = null, Azure.Storage.Blobs.Models.BlobRequestConditions sourceConditions = null, Azure.Storage.Blobs.Models.BlobRequestConditions destinationConditions = null, Nullable<Azure.Storage.Blobs.Models.RehydratePriority> rehydratePriority = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
Uri
source
Specifies the Uri of the source blob. The value may be a Uri of up to 2 KB in length that specifies a blob. A source blob in the same storage account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob must either be public or must be authenticated via a shared access signature. If the source blob is public, no authentication is required to perform the copy operation. The source object may be a file in the Azure File service. If the source object is a file that is to be copied to a blob, then the source file must be authenticated using a shared access signature, whether it resides in the same account or in a different account. |
IDictionary<String,String>
metadata
Optional custom metadata to set for this blob. |
Nullable<AccessTier>
accessTier
Optional AccessTier Indicates the tier to be set on the blob. |
BlobRequestConditions
sourceConditions
Optional BlobRequestConditions to add conditions on the copying of data from this source blob. |
BlobRequestConditions
destinationConditions
Optional BlobRequestConditions to add conditions on the copying of data to this blob. |
Nullable<RehydratePriority>
rehydratePriority
Optional RehydratePriority Indicates the priority with which to rehydrate an archived blob. |
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<CopyFromUriOperation>
A CopyFromUriOperation describing the state of the copy operation. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
Undelete(CancellationToken)
The Undelete(CancellationToken) operation restores the contents and metadata of a soft deleted blob and any associated soft deleted snapshots.
Declaration
public virtual Azure.Response Undelete (System.Threading.CancellationToken cancellationToken = null);
Parameters
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Response
A Response on successfully deleting. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
UndeleteAsync(CancellationToken)
The UndeleteAsync(CancellationToken) operation restores the contents and metadata of a soft deleted blob and any associated soft deleted snapshots.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> UndeleteAsync (System.Threading.CancellationToken cancellationToken = null);
Parameters
CancellationToken
cancellationToken
Optional CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Task<Response>
A Response on successfully deleting. |
Remarks
A RequestFailedException will be thrown if a failure occurs.
WithSnapshot(String)
Initializes a new instance of the BlobClient
class with an identical Uri source but the specified
snapshot
timestamp.
Declaration
public virtual Azure.Storage.Blobs.Specialized.BlobBaseClient WithSnapshot (string snapshot);
Parameters
String
snapshot
The snapshot identifier. |
Returns
BlobBaseClient
A new BlobClient instance. |
Remarks
Pass null or empty string to remove the snapshot returning a URL
to the base blob.
WithSnapshotCore(String)
Creates a new instance of the BlobClient class
with an identical Uri source but the specified
snapshot
timestamp.
Declaration
protected virtual Azure.Storage.Blobs.Specialized.BlobBaseClient WithSnapshotCore (string snapshot);
Parameters
String
snapshot
The snapshot identifier. |
Returns
BlobBaseClient
A new BlobClient instance. |