Class SpecializedBlobExtensions
Add easy to discover methods to BlobContainerClient for creating AppendBlobClient instances.
Inheritance
Namespace: System.Dynamic.ExpandoObject
Assembly: Azure.Storage.Blobs.dll
Syntax
public static class SpecializedBlobExtensions
Methods
GetAppendBlobClient(BlobContainerClient, String)
Create a new AppendBlobClient object by
concatenating blobName to
the end of the client's
Uri. The new
AppendBlobClient
uses the same request policy pipeline as the
BlobContainerClient.
Declaration
public static Azure.Storage.Blobs.Specialized.AppendBlobClient GetAppendBlobClient (this Azure.Storage.Blobs.BlobContainerClient client, string blobName);
Parameters
|
BlobContainerClient
client
The BlobContainerClient. |
|
System.String
blobName
The name of the append blob. |
Returns
|
AppendBlobClient
A new AppendBlobClient instance. |
GetBlobBaseClient(BlobContainerClient, String)
Create a new BlobBaseClient object by concatenating
blobName to the end of the
client's Uri.
The new BlobBaseClient uses the same request policy
pipeline as the BlobContainerClient.
Declaration
public static Azure.Storage.Blobs.Specialized.BlobBaseClient GetBlobBaseClient (this Azure.Storage.Blobs.BlobContainerClient client, string blobName);
Parameters
|
BlobContainerClient
client
The BlobContainerClient. |
|
System.String
blobName
The name of the blob. |
Returns
|
BlobBaseClient
A new BlobBaseClient instance. |
GetBlobLeaseClient(BlobContainerClient, String)
Initializes a new instance of the BlobLeaseClient class.
Declaration
public static Azure.Storage.Blobs.Specialized.BlobLeaseClient GetBlobLeaseClient (this Azure.Storage.Blobs.BlobContainerClient client, string leaseId = null);
Parameters
|
BlobContainerClient
client
A BlobContainerClient representing the container being leased. |
|
System.String
leaseId
An optional lease ID. If no lease ID is provided, a random lease ID will be created. |
Returns
|
BlobLeaseClient
|
GetBlobLeaseClient(BlobBaseClient, String)
Initializes a new instance of the BlobLeaseClient class.
Declaration
public static Azure.Storage.Blobs.Specialized.BlobLeaseClient GetBlobLeaseClient (this Azure.Storage.Blobs.Specialized.BlobBaseClient client, string leaseId = null);
Parameters
|
BlobBaseClient
client
A BlobClient representing the blob being leased. |
|
System.String
leaseId
An optional lease ID. If no lease ID is provided, a random lease ID will be created. |
Returns
|
BlobLeaseClient
|
GetBlockBlobClient(BlobContainerClient, String)
Create a new BlockBlobClient object by
concatenating blobName to
the end of the client's
Uri. The new
BlockBlobClient
uses the same request policy pipeline as the
BlobContainerClient.
Declaration
public static Azure.Storage.Blobs.Specialized.BlockBlobClient GetBlockBlobClient (this Azure.Storage.Blobs.BlobContainerClient client, string blobName);
Parameters
|
BlobContainerClient
client
The BlobContainerClient. |
|
System.String
blobName
The name of the block blob. |
Returns
|
BlockBlobClient
A new BlockBlobClient instance. |
GetPageBlobClient(BlobContainerClient, String)
Create a new PageBlobClient object by
concatenating blobName to
the end of the client's
Uri. The new
PageBlobClient
uses the same request policy pipeline as the
BlobContainerClient.
Declaration
public static Azure.Storage.Blobs.Specialized.PageBlobClient GetPageBlobClient (this Azure.Storage.Blobs.BlobContainerClient client, string blobName);
Parameters
|
BlobContainerClient
client
The BlobContainerClient. |
|
System.String
blobName
The name of the page blob. |
Returns
|
PageBlobClient
A new PageBlobClient instance. |
GetParentBlobContainerClient(BlobBaseClient)
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
public static Azure.Storage.Blobs.BlobContainerClient GetParentBlobContainerClient (this Azure.Storage.Blobs.Specialized.BlobBaseClient client);
Parameters
|
BlobBaseClient
client
The BlobBaseClient. |
Returns
|
BlobContainerClient
A new BlobContainerClient instance. |
GetParentBlobServiceClient(BlobContainerClient)
Create a new BlobServiceClient that pointing to this BlobContainerClient's blob service. The new BlobServiceClient uses the same request policy pipeline as the BlobContainerClient.
Declaration
public static Azure.Storage.Blobs.BlobServiceClient GetParentBlobServiceClient (this Azure.Storage.Blobs.BlobContainerClient client);
Parameters
|
BlobContainerClient
client
|
Returns
|
BlobServiceClient
A new BlobServiceClient instance. |
UpdateClientSideKeyEncryptionKey(BlobClient, ClientSideEncryptionOptions, BlobRequestConditions, CancellationToken)
Rotates the Key Encryption Key (KEK) for a client-side encrypted blob without needing to reupload the entire blob.
Declaration
public static void UpdateClientSideKeyEncryptionKey (this Azure.Storage.Blobs.BlobClient client, Azure.Storage.ClientSideEncryptionOptions encryptionOptionsOverride = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
|
BlobClient
client
Client to the blob. |
|
Azure.Storage.ClientSideEncryptionOptions
encryptionOptionsOverride
Optional override for client-side encryption options to use when updating the key encryption key. Defaults to the Azure.Storage.ClientSideEncryptionOptions configured on the client when this is not populated. New key encryption key for the blob will be the Azure.Storage.ClientSideEncryptionOptions.KeyEncryptionKey on whichever encryption options are used for the operation. Options must have a resolver that can resolve the old key on the blob. |
|
BlobRequestConditions
conditions
Optional request conditions for the operation. |
|
System.Threading.CancellationToken
cancellationToken
Cancellation token for the operation. |
UpdateClientSideKeyEncryptionKeyAsync(BlobClient, ClientSideEncryptionOptions, BlobRequestConditions, CancellationToken)
Rotates the Key Encryption Key (KEK) for a client-side encrypted blob without needing to reupload the entire blob.
Declaration
[System.Diagnostics.DebuggerStepThrough]
public static System.Threading.Tasks.Task UpdateClientSideKeyEncryptionKeyAsync (this Azure.Storage.Blobs.BlobClient client, Azure.Storage.ClientSideEncryptionOptions encryptionOptionsOverride = null, Azure.Storage.Blobs.Models.BlobRequestConditions conditions = null, System.Threading.CancellationToken cancellationToken = null);
Parameters
|
BlobClient
client
Client to the blob. |
|
Azure.Storage.ClientSideEncryptionOptions
encryptionOptionsOverride
Optional override for client-side encryption options to use when updating the key encryption key. Defaults to the Azure.Storage.ClientSideEncryptionOptions configured on the client when this is not populated. New key encryption key for the blob will be the Azure.Storage.ClientSideEncryptionOptions.KeyEncryptionKey on whichever encryption options are used for the operation. Options must have a resolver that can resolve the old key on the blob. |
|
BlobRequestConditions
conditions
Optional request conditions for the operation. |
|
System.Threading.CancellationToken
cancellationToken
Cancellation token for the operation. |
Returns
|
System.Threading.Tasks.Task
|
WithClientSideEncryptionOptions(BlobClient, ClientSideEncryptionOptions)
Creates a new instance of the BlobClient class, maintaining all the same internals but specifying new Azure.Storage.ClientSideEncryptionOptions.
Declaration
public static Azure.Storage.Blobs.BlobClient WithClientSideEncryptionOptions (this Azure.Storage.Blobs.BlobClient client, Azure.Storage.ClientSideEncryptionOptions clientSideEncryptionOptions);
Parameters
|
BlobClient
client
Client to base off of. |
|
Azure.Storage.ClientSideEncryptionOptions
clientSideEncryptionOptions
New encryption options. Setting this to will clear client-side encryption.
|
Returns
|
BlobClient
New instance with provided options and same internals otherwise. |