Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BlobBatchClient

Package version

A BlobBatchClient allows you to make batched requests to the Azure Storage Blob service.

see

https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch

Hierarchy

  • BlobBatchClient

Index

Constructors

constructor

Methods

createBatch

deleteBlobs

setBlobsAccessTier

  • Create multiple set tier operations to set 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 account (locally redundant storage only). 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. See set blob tier details. The operation(subrequest) will be authenticated and authorized with specified credential.See blob batch authorization details.

    Parameters

    • urls: string[]

      The urls of the blob resource to delete.

    • credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential

      Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.

    • tier: AccessTier

      -

    • Optional options: BlobSetTierOptions

      -

    Returns Promise<BlobBatchSetBlobsAccessTierResponse>

  • Create multiple set tier operations to set 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 account (locally redundant storage only). 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. See set blob tier details. The operation(subrequest) will be authenticated and authorized with specified credential.See blob batch authorization details.

    Parameters

    Returns Promise<BlobBatchSetBlobsAccessTierResponse>

submitBatch

  • Submit batch request which consists of multiple subrequests.

    Get blobBatchClient and other details before running the snippets. blobServiceClient.getBlobBatchClient() gives the blobBatchClient

    Example usage:

    let batchRequest = new BlobBatch();
    await batchRequest.deleteBlob(urlInString0, credential0);
    await batchRequest.deleteBlob(urlInString1, credential1, {
     deleteSnapshots: "include"
    });
    const batchResp = await blobBatchClient.submitBatch(batchRequest);
    console.log(batchResp.subResponsesSucceededCount);

    Example using a lease:

    let batchRequest = new BlobBatch();
    await batchRequest.setBlobAccessTier(blockBlobClient0, "Cool");
    await batchRequest.setBlobAccessTier(blockBlobClient1, "Cool", {
     conditions: { leaseId: leaseId }
    });
    const batchResp = await blobBatchClient.submitBatch(batchRequest);
    console.log(batchResp.subResponsesSucceededCount);
    see

    https://docs.microsoft.com/en-us/rest/api/storageservices/blob-batch

    Parameters

    Returns Promise<BlobBatchSubmitBatchResponse>

Generated using TypeDoc