Class BlobBaseClient
The BlobBaseClient allows you to manipulate Azure Storage blobs.
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Storage.Blobs.dll
Syntax
public class BlobBaseClient
Constructors
BlobBaseClient()
BlobBaseClient(Uri, BlobClientOptions)
Initializes a new instance of the BlobBaseClient class.
Declaration
public BlobBaseClient (Uri blobUri, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
System.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. This is likely to be similar to "https://{account_name}.blob.core.windows.net/{container_name}/{blob_name}". |
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 BlobBaseClient class.
Declaration
public BlobBaseClient (string connectionString, string blobContainerName, string blobName);
Parameters
System.String
connectionString
A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime. For more information, Configure Azure Storage connection strings |
System.String
blobContainerName
The name of the container containing this blob. |
System.String
blobName
The name of this blob. |
BlobBaseClient(Uri, AzureSasCredential, BlobClientOptions)
Initializes a new instance of the BlobBaseClient class.
Declaration
public BlobBaseClient (Uri blobUri, Azure.AzureSasCredential credential, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
System.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. This is likely to be similar to "https://{account_name}.blob.core.windows.net/{container_name}/{blob_name}". Must not contain shared access signature, which should be passed in the second parameter. |
Azure.AzureSasCredential
credential
The shared access signature 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. |
Remarks
This constructor should only be used when shared access signature needs to be updated during lifespan of this client.
BlobBaseClient(Uri, TokenCredential, BlobClientOptions)
Initializes a new instance of the BlobBaseClient class.
Declaration
public BlobBaseClient (Uri blobUri, Azure.Core.TokenCredential credential, Azure.Storage.Blobs.BlobClientOptions options = null);
Parameters
System.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. This is likely to be similar to "https://{account_name}.blob.core.windows.net/{container_name}/{blob_name}". |
Azure.Core.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 BlobBaseClient class.
Declaration
public BlobBaseClient (string connectionString, string blobContainerName, string blobName, Azure.Storage.Blobs.BlobClientOptions options);
Parameters
System.String
connectionString
A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime. For more information, Configure Azure Storage connection strings |
System.String
blobContainerName
The name of the container containing this blob. |
System.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
System.String
|
BlobContainerName
Gets the container name corresponding to the blob client.
Declaration
public virtual string BlobContainerName { get; }
Property Value
System.String
|
CanGenerateSasUri
Determines whether the client is able to generate a SAS. If the client is authenticated with a Azure.Storage.StorageSharedKeyCredential.
Declaration
public bool CanGenerateSasUri { get; }
Property Value
System.Boolean
|
Name
Gets the name of the blob.
Declaration
public virtual string Name { get; }
Property Value
System.String
|
Uri
Gets the blob's primary Uri endpoint.
Declaration
public virtual Uri Uri { get; }
Property Value
System.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.
For more information, see Abort Copy Blob.
Declaration
public virtual Azure.Response AbortCopyFromUri (string copyId, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.String
copyId
ID of the copy operation to abort. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on aborting the copy operation. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response
A Azure.Response on successfully aborting. |
Remarks
A Azure.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.
For more information, see Abort Copy Blob.
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
System.String
copyId
ID of the copy operation to abort. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on aborting the copy operation. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response on successfully aborting. |
Remarks
A Azure.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.
For more information, see Snapshot 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
System.Collections.Generic.IDictionary<System.String,System.String>
metadata
Optional custom metadata to set for this blob snapshot. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting creating this snapshot. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobSnapshotInfo>
A Azure.Response describing the new blob snapshot. |
Remarks
A Azure.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.
For more information, see Snapshot 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
System.Collections.Generic.IDictionary<System.String,System.String>
metadata
Optional custom metadata to set for this blob snapshot. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting creating this snapshot. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobSnapshotInfo>>
A Azure.Response describing the new blob snapshot. |
Remarks
A Azure.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.
For more information, see Delete Blob.
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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response
A Azure.Response on successfully deleting. |
Remarks
A Azure.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.
For more information, see Delete Blob.
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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response on successfully deleting. |
Remarks
A Azure.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.
For more information, see Delete Blob.
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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<System.Boolean>
A Azure.Response Returns true if blob exists and was deleted, return false otherwise. |
Remarks
A Azure.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.
For more information, see Delete Blob.
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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<System.Boolean>>
A Azure.Response Returns true if blob exists and was deleted, return false otherwise. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
Download()
The Download() operation downloads a blob from the service, including its metadata and properties.
For more information, see Get Blob.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadInfo> Download ();
Returns
Azure.Response<BlobDownloadInfo>
A Azure.Response describing the downloaded blob. Content contains the blob's data. |
Remarks
A Azure.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.
For more information, see Get Blob.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadInfo> Download (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobDownloadInfo>
A Azure.Response describing the downloaded blob. Content contains the blob's data. |
Remarks
A Azure.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.
For more information, see Get Blob.
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
Azure.HttpRange
range
If provided, only download the bytes of the blob in the specified range. If not provided, download the entire blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on downloading this blob. |
System.Boolean
rangeGetContentHash
When set to true and specified together with the |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobDownloadInfo>
A Azure.Response describing the downloaded blob. Content contains the blob's data. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
DownloadAsync()
The DownloadAsync() operation downloads a blob from the service, including its metadata and properties.
For more information, see Get Blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadInfo>> DownloadAsync ();
Returns
System.Threading.Tasks.Task<Azure.Response<BlobDownloadInfo>>
A Azure.Response describing the downloaded blob. Content contains the blob's data. |
Remarks
A Azure.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.
For more information, see Get Blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobDownloadInfo>> DownloadAsync (System.Threading.CancellationToken cancellationToken);
Parameters
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobDownloadInfo>>
A Azure.Response describing the downloaded blob. Content contains the blob's data. |
Remarks
A Azure.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.
For more information, see Get Blob.
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
Azure.HttpRange
range
If provided, only download the bytes of the blob in the specified range. If not provided, download the entire blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on downloading this blob. |
System.Boolean
rangeGetContentHash
When set to true and specified together with the |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobDownloadInfo>>
A Azure.Response describing the downloaded blob. Content contains the blob's data. |
Remarks
A Azure.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
System.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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.IO.Stream
destination
A System.IO.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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.String
path
A file path to write the downloaded content to. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.IO.Stream
destination
A System.IO.Stream to write the downloaded content to. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.String
path
A file path to write the downloaded content to. |
Returns
Azure.Response
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.IO.Stream
destination
A System.IO.Stream to write the downloaded content to. |
Returns
Azure.Response
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.IO.Stream
destination
A System.IO.Stream to write the downloaded content to. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.String
path
A file path to write the downloaded content to. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.IO.Stream
destination
A System.IO.Stream to write the downloaded content to. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.String
path
A file path to write the downloaded content to. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.IO.Stream
destination
A System.IO.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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response describing the operation. |
Remarks
A Azure.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
System.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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response describing the operation. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
Exists(CancellationToken)
The Exists(CancellationToken) operation can be called on a BlobBaseClient to see if the associated blob exists in the container on the storage account in the storage service.
Declaration
public virtual Azure.Response<bool> Exists (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<System.Boolean>
Returns true if the blob exists. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
ExistsAsync(CancellationToken)
The ExistsAsync(CancellationToken) operation can be called on a BlobBaseClient to see if the associated blob exists in the container on the storage account in the storage service.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<bool>> ExistsAsync (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<System.Boolean>>
Returns true if the blob exists. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
GenerateSasUri(BlobSasBuilder)
The GenerateSasUri(BlobSasBuilder) returns a Uri that generates a Blob Service Shared Access Signature (SAS) Uri based on the Client properties and and builder. The SAS is signed by the shared key credential of the client.
To check if the client is able to sign a Service Sas see CanGenerateSasUri.
For more information, see Constructing a Service SAS.
Declaration
public virtual Uri GenerateSasUri (Azure.Storage.Sas.BlobSasBuilder builder);
Parameters
BlobSasBuilder
builder
Used to generate a Shared Access Signature (SAS). |
Returns
System.Uri
A Uri containing the SAS Uri. |
Remarks
A System.Exception will be thrown if a failure occurs.
GenerateSasUri(BlobSasPermissions, DateTimeOffset)
The GenerateSasUri(BlobSasPermissions, DateTimeOffset) returns a Uri that generates a Blob Service Shared Access Signature (SAS) Uri based on the Client properties and parameters passed. The SAS is signed by the shared key credential of the client.
To check if the client is able to sign a Service Sas see CanGenerateSasUri.
For more information, see Constructing a service SAS.
Declaration
public virtual Uri GenerateSasUri (Azure.Storage.Sas.BlobSasPermissions permissions, DateTimeOffset expiresOn);
Parameters
BlobSasPermissions
permissions
Required. Specifies the list of permissions to be associated with the SAS. See BlobSasPermissions. |
System.DateTimeOffset
expiresOn
Required. Specifies the time at which the SAS becomes invalid. This field must be omitted if it has been specified in an associated stored access policy. |
Returns
System.Uri
A Uri containing the SAS Uri. |
Remarks
A System.Exception will be thrown if a failure occurs.
GetBlobLeaseClientCore(String)
Initializes a new instance of the BlobLeaseClient class.
Declaration
protected internal virtual Azure.Storage.Blobs.Specialized.BlobLeaseClient GetBlobLeaseClientCore (string leaseId);
Parameters
System.String
leaseId
An optional lease ID. If no lease ID is provided, a random lease ID will be created. |
Returns
BlobLeaseClient
|
GetParentBlobContainerClientCore()
Create a new BlobContainerClient that pointing to this BlobBaseClient's parent container. The new BlockBlobClient uses the same request policy pipeline as the BlobBaseClient.
Declaration
protected internal virtual Azure.Storage.Blobs.BlobContainerClient GetParentBlobContainerClientCore ();
Returns
BlobContainerClient
A new BlobContainerClient instance. |
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.
For more information, see Get Blob Properties.
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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobProperties>
A Azure.Response describing the blob's properties. |
Remarks
A Azure.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.
For more information, see Get Blob Properties.
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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobProperties>>
A Azure.Response describing the blob's properties. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
GetTags(BlobRequestConditions, CancellationToken)
Gets the tags associated with the underlying blob.
For more information, see Get Blob Tags
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.GetBlobTagResult> GetTags (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 tags. Note that TagConditions is currently the only condition supported by GetTags. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<GetBlobTagResult>
A Azure.Response on successfully getting tags. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
GetTagsAsync(BlobRequestConditions, CancellationToken)
Gets the tags associated with the underlying blob.
For more information, see Get Blob Tags
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.GetBlobTagResult>> GetTagsAsync (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 tags. Note that TagConditions is currently the only condition supported by GetTags. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<GetBlobTagResult>>
A Azure.Response on successfully getting tags. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
OpenRead(BlobOpenReadOptions, CancellationToken)
Opens a stream for reading from the blob. The stream will only download the blob as the stream is read from.
Declaration
public virtual System.IO.Stream OpenRead (Azure.Storage.Blobs.Models.BlobOpenReadOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobOpenReadOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.IO.Stream
Returns a stream that will download the blob as the stream is read from. |
OpenRead(Boolean, Int64, Nullable<Int32>, CancellationToken)
Opens a stream for reading from the blob. The stream will only download the blob as the stream is read from.
Declaration
[System.ComponentModel.EditorBrowsable]
public virtual System.IO.Stream OpenRead (bool allowBlobModifications, long position = 0, Nullable<int> bufferSize = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Boolean
allowBlobModifications
If true, you can continue streaming a blob even if it has been modified. |
System.Int64
position
The position within the blob to begin the stream. Defaults to the beginning of the blob. |
System.Nullable<System.Int32>
bufferSize
The buffer size to use when the stream downloads parts of the blob. Defaults to 1 MB. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.IO.Stream
Returns a stream that will download the blob as the stream is read from. |
OpenRead(Int64, Nullable<Int32>, BlobRequestConditions, CancellationToken)
Opens a stream for reading from the blob. The stream will only download the blob as the stream is read from.
Declaration
[System.ComponentModel.EditorBrowsable]
public virtual System.IO.Stream OpenRead (long position = 0, Nullable<int> bufferSize = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
position
The position within the blob to begin the stream. Defaults to the beginning of the blob. |
System.Nullable<System.Int32>
bufferSize
The buffer size to use when the stream downloads parts of the blob. Defaults to 1 MB. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on the download of the blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.IO.Stream
Returns a stream that will download the blob as the stream is read from. |
OpenReadAsync(BlobOpenReadOptions, CancellationToken)
Opens a stream for reading from the blob. The stream will only download the blob as the stream is read from.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<System.IO.Stream> OpenReadAsync (Azure.Storage.Blobs.Models.BlobOpenReadOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
BlobOpenReadOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<System.IO.Stream>
Returns a stream that will download the blob as the stream is read from. |
OpenReadAsync(Boolean, Int64, Nullable<Int32>, CancellationToken)
Opens a stream for reading from the blob. The stream will only download the blob as the stream is read from.
Declaration
[System.ComponentModel.EditorBrowsable]
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<System.IO.Stream> OpenReadAsync (bool allowBlobModifications, long position = 0, Nullable<int> bufferSize = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Boolean
allowBlobModifications
If true, you can continue streaming a blob even if it has been modified. |
System.Int64
position
The position within the blob to begin the stream. Defaults to the beginning of the blob. |
System.Nullable<System.Int32>
bufferSize
The buffer size to use when the stream downloads parts of the blob. Defaults to 1 MB. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<System.IO.Stream>
Returns a stream that will download the blob as the stream is read from. |
OpenReadAsync(Int64, Nullable<Int32>, BlobRequestConditions, CancellationToken)
Opens a stream for reading from the blob. The stream will only download the blob as the stream is read from.
Declaration
[System.ComponentModel.EditorBrowsable]
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<System.IO.Stream> OpenReadAsync (long position = 0, Nullable<int> bufferSize = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Int64
position
The position within the blob to begin the stream. Defaults to the beginning of the blob. |
System.Nullable<System.Int32>
bufferSize
The buffer size to use when the stream downloads parts of the blob. Defaults to 1 MB. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on the download of the blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<System.IO.Stream>
Returns a stream that will download the blob as the stream is read from. |
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 Blob Storage Tiers.
For more information about setting the tier, see Blob Storage Tiers.
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. |
System.Nullable<RehydratePriority>
rehydratePriority
Optional RehydratePriority Indicates the priority with which to rehydrate an archived blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response
A Azure.Response on successfully setting the tier. |
Remarks
A Azure.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 Blob Storage Tiers.
For more information about setting the tier, see Blob Storage Tiers.
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. |
System.Nullable<RehydratePriority>
rehydratePriority
Optional RehydratePriority Indicates the priority with which to rehydrate an archived blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response on successfully setting the tier. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
SetHttpHeaders(BlobHttpHeaders, BlobRequestConditions, CancellationToken)
The SetHttpHeaders(BlobHttpHeaders, BlobRequestConditions, CancellationToken) operation sets system properties on the blob.
For more information, see Set Blob Properties.
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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobInfo>
A Azure.Response describing the updated blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
SetHttpHeadersAsync(BlobHttpHeaders, BlobRequestConditions, CancellationToken)
The SetHttpHeadersAsync(BlobHttpHeaders, BlobRequestConditions, CancellationToken) operation sets system properties on the blob.
For more information, see Set Blob Properties.
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. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobInfo>>
A Azure.Response describing the updated blob. |
Remarks
A Azure.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.
For more information, see Set Blob Metadata.
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
System.Collections.Generic.IDictionary<System.String,System.String>
metadata
Custom metadata to set for this blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting the blob's metadata. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobInfo>
A Azure.Response describing the updated blob. |
Remarks
A Azure.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.
For more information, see Set Blob Metadata.
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
System.Collections.Generic.IDictionary<System.String,System.String>
metadata
Custom metadata to set for this blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting the blob's metadata. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobInfo>>
A Azure.Response describing the updated blob. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
SetTags(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
Sets tags on the underlying blob. A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. Valid tag key and value characters include lower and upper case letters, digits (0-9), space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_').
For more information, see Set Blob Tags.
Declaration
public virtual Azure.Response SetTags (System.Collections.Generic.IDictionary<string,string> tags, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Collections.Generic.IDictionary<System.String,System.String>
tags
The tags to set on the blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting the blob's tags. Note that TagConditions is currently the only condition supported by SetTags. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response
A Azure.Response on successfully setting the blob tags.. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
SetTagsAsync(IDictionary<String,String>, BlobRequestConditions, CancellationToken)
Sets tags on the underlying blob. A blob can have up to 10 tags. Tag keys must be between 1 and 128 characters. Tag values must be between 0 and 256 characters. Valid tag key and value characters include lower and upper case letters, digits (0-9), space (' '), plus ('+'), minus ('-'), period ('.'), foward slash ('/'), colon (':'), equals ('='), and underscore ('_').
For more information, see Set Blob Tags.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> SetTagsAsync (System.Collections.Generic.IDictionary<string,string> tags, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Collections.Generic.IDictionary<System.String,System.String>
tags
The tags to set on the blob. |
BlobRequestConditions
conditions
Optional BlobRequestConditions to add conditions on setting the blob's tags. Note that TagConditions is currently the only condition supported by SetTags. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response on successfully setting the blob tags.. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
StartCopyFromUri(Uri, BlobCopyFromUriOptions, CancellationToken)
The StartCopyFromUri(Uri, BlobCopyFromUriOptions, CancellationToken)
operation begins an asynchronous copy of the data from the source
to this blob.
You can check the CopyStatus
returned from the GetProperties(BlobRequestConditions, CancellationToken) to determine if the
copy has completed.
For more information, see Copy Blob.
Declaration
public virtual Azure.Storage.Blobs.Models.CopyFromUriOperation StartCopyFromUri (Uri source, Azure.Storage.Blobs.Models.BlobCopyFromUriOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.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. |
BlobCopyFromUriOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
CopyFromUriOperation
A CopyFromUriOperation describing the state of the copy operation. |
Remarks
A Azure.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 begins an asynchronous copy of the data from the source
to this blob.
You can check the CopyStatus
returned from the GetProperties(BlobRequestConditions, CancellationToken) to determine if the
copy has completed.
For more information, see Copy Blob.
Declaration
[System.ComponentModel.EditorBrowsable]
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
System.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. |
System.Collections.Generic.IDictionary<System.String,System.String>
metadata
Optional custom metadata to set for this blob. |
System.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. |
System.Nullable<RehydratePriority>
rehydratePriority
Optional RehydratePriority Indicates the priority with which to rehydrate an archived blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
CopyFromUriOperation
A CopyFromUriOperation describing the state of the copy operation. |
Remarks
A Azure.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 begins an asynchronous copy of the data from the source
to this blob.You can check the CopyStatus
returned from the GetPropertiesAsync(BlobRequestConditions, CancellationToken) to determine if
the copy has completed.
For more information, see Copy Blob.
Declaration
[System.ComponentModel.EditorBrowsable]
[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
System.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. |
System.Collections.Generic.IDictionary<System.String,System.String>
metadata
Optional custom metadata to set for this blob. |
System.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. |
System.Nullable<RehydratePriority>
rehydratePriority
Optional RehydratePriority Indicates the priority with which to rehydrate an archived blob. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<CopyFromUriOperation>
A CopyFromUriOperation describing the state of the copy operation. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
StartCopyFromUriAsync(Uri, BlobCopyFromUriOptions, CancellationToken)
The StartCopyFromUri(Uri, IDictionary<String,String>, Nullable<AccessTier>, BlobRequestConditions, BlobRequestConditions, Nullable<RehydratePriority>, CancellationToken)
operation begins an asynchronous copy of the data from the source
to this blob. You can check the CopyStatus
returned from the GetPropertiesAsync(BlobRequestConditions, CancellationToken) to determine if
the copy has completed.
For more information, see Copy Blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Storage.Blobs.Models.CopyFromUriOperation> StartCopyFromUriAsync (Uri source, Azure.Storage.Blobs.Models.BlobCopyFromUriOptions options, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.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. |
BlobCopyFromUriOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<CopyFromUriOperation>
A CopyFromUriOperation describing the state of the copy operation. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
SyncCopyFromUri(Uri, BlobCopyFromUriOptions, CancellationToken)
The Copy Blob From URL operation copies a blob to a destination within the storage account synchronously for source blob sizes up to 256 MB. This API is available starting in version 2018-03-28. The source for a Copy Blob From URL operation can be any committed block blob in any Azure storage account which is either public or authorized with a shared access signature.
The size of the source blob can be a maximum length of up to 256 MB.
For more information, see Copy Blob From URL.
Declaration
public virtual Azure.Response<Azure.Storage.Blobs.Models.BlobCopyInfo> SyncCopyFromUri (Uri source, Azure.Storage.Blobs.Models.BlobCopyFromUriOptions options = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Uri
source
Required. Specifies the URL of the source blob. The value may be a URL of up to 2 KB in length that specifies a blob. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authorized via a shared access signature. If the source blob is public, no authorization is required to perform the operation. If the size of the source blob is greater than 256 MB, the request will fail with 409 (Conflict). The blob type of the source blob has to be block blob. |
BlobCopyFromUriOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response<BlobCopyInfo>
A Azure.Response describing the state of the copy operation. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
SyncCopyFromUriAsync(Uri, BlobCopyFromUriOptions, CancellationToken)
The Copy Blob From URL operation copies a blob to a destination within the storage account synchronously for source blob sizes up to 256 MB. This API is available starting in version 2018-03-28. The source for a Copy Blob From URL operation can be any committed block blob in any Azure storage account which is either public or authorized with a shared access signature.
The size of the source blob can be a maximum length of up to 256 MB.
For more information, see Copy Blob From URL.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlobCopyInfo>> SyncCopyFromUriAsync (Uri source, Azure.Storage.Blobs.Models.BlobCopyFromUriOptions options = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Uri
source
Required. Specifies the URL of the source blob. The value may be a URL of up to 2 KB in length that specifies a blob. The value should be URL-encoded as it would appear in a request URI. The source blob must either be public or must be authorized via a shared access signature. If the source blob is public, no authorization is required to perform the operation. If the size of the source blob is greater than 256 MB, the request will fail with 409 (Conflict). The blob type of the source blob has to be block blob. |
BlobCopyFromUriOptions
options
Optional parameters. |
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response<BlobCopyInfo>>
A Azure.Response describing the state of the copy operation. |
Remarks
A Azure.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.
For more information, see Undelete Blob.
Declaration
public virtual Azure.Response Undelete (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
Azure.Response
A Azure.Response on successfully deleting. |
Remarks
A Azure.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.
For more information, see Undelete Blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public virtual System.Threading.Tasks.Task<Azure.Response> UndeleteAsync (System.Threading.CancellationToken cancellationToken = null);
Parameters
System.Threading.CancellationToken
cancellationToken
Optional System.Threading.CancellationToken to propagate notifications that the operation should be cancelled. |
Returns
System.Threading.Tasks.Task<Azure.Response>
A Azure.Response on successfully deleting. |
Remarks
A Azure.RequestFailedException will be thrown if a failure occurs.
WithSnapshot(String)
Initializes a new instance of the BlobBaseClient
class with an identical Uri source but the specified
snapshot
timestamp.
For more information, see Create a snapshot of a blob.
Declaration
public virtual Azure.Storage.Blobs.Specialized.BlobBaseClient WithSnapshot (string snapshot);
Parameters
System.String
snapshot
The snapshot identifier. |
Returns
BlobBaseClient
A new BlobBaseClient 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 BlobBaseClient class
with an identical Uri source but the specified
snapshot
timestamp.
Declaration
protected virtual Azure.Storage.Blobs.Specialized.BlobBaseClient WithSnapshotCore (string snapshot);
Parameters
System.String
snapshot
The snapshot identifier. |
Returns
BlobBaseClient
A new BlobBaseClient instance. |
WithVersion(String)
Initializes a new instance of the BlobBaseClient
class with an identical Uri source but the specified
versionId
timestamp.
Declaration
public virtual Azure.Storage.Blobs.Specialized.BlobBaseClient WithVersion (string versionId);
Parameters
System.String
versionId
The version identifier. |
Returns
BlobBaseClient
A new BlobBaseClient instance. |
Remarks
Pass null or empty string to remove the version returning a URL
to the base blob.