BlobBatch class

A BlobBatch represents an aggregated set of operations on blobs. Currently, only delete and setAccessTier are supported.

Constructors

BlobBatch()

Methods

deleteBlob(BlobClient, BlobDeleteOptions)

The deleteBlob operation marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection. Only one kind of operation is allowed per batch request. Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time. See delete operation details. The operation will be authenticated and authorized with specified credential. See blob batch authorization details.

deleteBlob(string, StorageSharedKeyCredential | AnonymousCredential | TokenCredential, BlobDeleteOptions)

The deleteBlob operation marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection. Only one kind of operation is allowed per batch request. Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time. See delete operation details. The operation will be authenticated and authorized with specified credential. See blob batch authorization details.

getHttpRequestBody()

Get assembled HTTP request body for sub requests.

getMultiPartContentType()

Get the value of Content-Type for a batch request. The value must be multipart/mixed with a batch boundary. Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252

getSubRequests()

Get sub requests that are added into the batch request.

setBlobAccessTier(BlobClient, AccessTier, BlobSetTierOptions)

The setBlobAccessTier operation sets the tier on a blob. The operation is allowed on block blobs in a blob storage or general purpose v2 account. Only one kind of operation is allowed per batch request. 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 see hot, cool, and archive access tiers. The operation will be authenticated and authorized with specified credential. See blob batch authorization details.

setBlobAccessTier(string, StorageSharedKeyCredential | AnonymousCredential | TokenCredential, AccessTier, BlobSetTierOptions)

The setBlobAccessTier operation sets the tier on a blob. The operation is allowed on block blobs in a blob storage or general purpose v2 account. Only one kind of operation is allowed per batch request. 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 see hot, cool, and archive access tiers. The operation will be authenticated and authorized with specified credential. See blob batch authorization details.

Constructor Details

BlobBatch()

new BlobBatch()

Method Details

deleteBlob(BlobClient, BlobDeleteOptions)

The deleteBlob operation marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection. Only one kind of operation is allowed per batch request. Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time. See delete operation details. The operation will be authenticated and authorized with specified credential. See blob batch authorization details.

function deleteBlob(blobClient: BlobClient, options?: BlobDeleteOptions)

Parameters

blobClient
BlobClient

The BlobClient.

Returns

Promise<void>

deleteBlob(string, StorageSharedKeyCredential | AnonymousCredential | TokenCredential, BlobDeleteOptions)

The deleteBlob operation marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection. Only one kind of operation is allowed per batch request. Note that in order to delete a blob, you must delete all of its snapshots. You can delete both at the same time. See delete operation details. The operation will be authenticated and authorized with specified credential. See blob batch authorization details.

function deleteBlob(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, options?: BlobDeleteOptions)

Parameters

url

string

The url 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.

Returns

Promise<void>

getHttpRequestBody()

Get assembled HTTP request body for sub requests.

function getHttpRequestBody()

Returns

string

getMultiPartContentType()

Get the value of Content-Type for a batch request. The value must be multipart/mixed with a batch boundary. Example: multipart/mixed; boundary=batch_a81786c8-e301-4e42-a729-a32ca24ae252

function getMultiPartContentType()

Returns

string

getSubRequests()

Get sub requests that are added into the batch request.

function getSubRequests()

Returns

Map<number, BatchSubRequest>

setBlobAccessTier(BlobClient, AccessTier, BlobSetTierOptions)

The setBlobAccessTier operation sets the tier on a blob. The operation is allowed on block blobs in a blob storage or general purpose v2 account. Only one kind of operation is allowed per batch request. 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 see hot, cool, and archive access tiers. The operation will be authenticated and authorized with specified credential. See blob batch authorization details.

function setBlobAccessTier(blobClient: BlobClient, tier: AccessTier, options?: BlobSetTierOptions)

Parameters

blobClient
BlobClient

The BlobClient.

tier
AccessTier

Returns

Promise<void>

setBlobAccessTier(string, StorageSharedKeyCredential | AnonymousCredential | TokenCredential, AccessTier, BlobSetTierOptions)

The setBlobAccessTier operation sets the tier on a blob. The operation is allowed on block blobs in a blob storage or general purpose v2 account. Only one kind of operation is allowed per batch request. 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 see hot, cool, and archive access tiers. The operation will be authenticated and authorized with specified credential. See blob batch authorization details.

function setBlobAccessTier(url: string, credential: StorageSharedKeyCredential | AnonymousCredential | TokenCredential, tier: AccessTier, options?: BlobSetTierOptions)

Parameters

url

string

The url 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

Returns

Promise<void>