Class: BlobService

BlobService

The BlobService class is used to perform operations on the Windows Azure Blob Service. The Blob Service provides storage for binary large objects, and provides functions for working with data stored in blobs as either streams or pages of data.

For more information on the Blob Service, as well as task focused information on using it in a Node.js application, see How to Use the Blob Service from Node.js.

new BlobService(storageAccountOrConnectionString, storageAccessKey, host, authenticationProvider)

Creates a new BlobService object. If no storageaccount or storageaccesskey are provided, the AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY environment variables will be used.

Parameters:
Name Type Argument Description
storageAccountOrConnectionString string <optional>

The storage account or the connection string.

storageAccessKey string <optional>

The storage access key.

host string <optional>

The host address.

authenticationProvider object <optional>

The authentication provider.

Source:

Extends

  • ServiceClient

Methods

_createBlobFromChunkStream(container, blob, blobType, (Stream), streamLength, optionsOrCallback, callback) → {SpeedSummary}

Uploads a block blob or page blob from a stream.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

blobType string

The blob type.

(Stream)

stream Stream to the data to store.

streamLength int

The length of the stream to upload.

optionsOrCallback object | function <optional>

The creating and request options.

Properties
Name Type Argument Description
speedSummary SpeedSummary <optional>

The download tracker objects;

ParallelOperationThreadCount int <optional>

Parallel operation thread count

useTransactionalMD5 bool <optional>

Calculate and send/validate content MD5 for transactions.

blockIdPrefix string <optional>

The prefix for block id.

leaseId string <optional>

The lease identifier.

metadata object <optional>

The metadata key/value pairs.

setBlobContentMD5 bool <optional>

Specifies whether the blob's ContentMD5 header should be set on uploads.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

The callback function.

Source:
Returns:
Type
SpeedSummary

abortCopyBlob(container, blob, copyId, options, callback)

Abort a blob copy operation.

This:
Parameters:
Name Type Argument Description
container string

The destination container name.

blob string

The destination blob name.

copyId string

The copy operation identifier.

options object <optional>

The blobs and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blob will contain the blob information. response will contain information related to this operation.

Source:

acquireLease(container, blob, options, callback)

Acquires a new lease on the blob.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
leaseDuration string <optional>

The lease duration. Default is never to expire.

proposedLeaseId string <optional>

The proposed lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise lease will contain the lease information. response will contain information related to this operation.

Source:

breakLease(container, blob, leaseId, options, callback)

Breaks the lease but ensures that another client cannot acquire a new lease until the current lease period has expired.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

leaseId string

The lease identifier.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
leaseBreakPeriod int <optional>

The lease break period.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise lease will contain the lease information. response will contain information related to this operation.

Source:

clearBlobPages(container, blob, rangeStart, rangeEnd, options, callback)

Clears a page blob.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

rangeStart int

The range start.

rangeEnd int

The range end.

options object <optional>

The page blob and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise response will contain information related to this operation.

Source:

commitBlobBlocks(container, blob, blockList, options, callback)

Writes a blob by specifying the list of block IDs that make up the blob. In order to be written as part of a blob, a block must have been successfully written to the server in a prior createBlobBlock operation.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

blockList object

The block identifiers.

options object <optional>

The blocklist and request options.

Properties
Name Type Argument Description
metadata object <optional>

The metadata key/value pairs.

leaseId string <optional>

The target blob lease identifier.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blocklist will contain the blocklist information. response will contain information related to this operation.

Source:

copyBlob(sourceUri, targetContainer, targetBlob, options, callback)

Copies a blob to a destination within the storage account. The Copy Blob operation copies the entire committed blob.

This:
Parameters:
Name Type Argument Description
sourceUri string

The source blob URI.

targetContainer string

The target container name.

targetBlob string

The target blob name.

options object <optional>

The blobs and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The source blob snapshot identifier.

metadata object <optional>

The target blob metadata key/value pairs.

leaseId string <optional>

The target blob lease identifier.

sourceLeaseId string <optional>

The source blob lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

sourceAccessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blob will contain the blob information. response will contain information related to this operation.

Source:

createBlob(container, blob, blobType, optionsOrCallback, callback) → {Stream}

Uploads a block blob.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

blobType string

The type of blob to create: block blob or page blob.

optionsOrCallback object | function <optional>

The creating and request options.

Properties
Name Type Argument Description
blockIdPrefix string <optional>

The prefix for block id.

leaseId string <optional>

The lease identifier.

metadata object <optional>

The metadata key/value pairs.

setBlobContentMD5 bool <optional>

Specifies whether the blob's ContentMD5 header should be set on uploads. This field is not supported for page blobs. The default value is false.

useTransactionalMD5 bool <optional>

Calculate and send/validate content MD5 for transactions.

blobType string <optional>

The type of blob to create: block blob or page blob.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

The callback function.

Source:
Returns:
Type
Stream

createBlobBlockFromStream(blockId, container, blob, readStream, streamLength, options, callback)

Creates a new block to be committed as part of a blob.

This:
Parameters:
Name Type Argument Description
blockId string

The block identifier.

container string

The container name.

blob string

The blob name.

readStream Stream

The read stream.

streamLength int

The stream length.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

contentMD5 string <optional>

The blob’s MD5 hash.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise response will contain information related to this operation.

Source:

createBlobBlockFromText(blockId, container, blob, content, options, callback) → {undefined}

Creates a new block to be committed as part of a blob.

This:
Parameters:
Name Type Argument Description
blockId string

The block identifier.

container string

The container name.

blob string

The blob name.

content string | buffer

The block content.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

contentMD5 string <optional>

The blob’s MD5 hash.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise response will contain information related to this operation.

Source:
Returns:
Type
undefined

createBlobPagesFromStream(container, blob, readStream, rangeStart, rangeEnd, options, callback)

Updates a page blob from a stream.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

readStream Stream

The read stream.

rangeStart int

The range start.

rangeEnd int

The range end.

options object <optional>

The page blob and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise pageBlob will contain the blob information. response will contain information related to this operation.

Source:

createBlobPagesFromText(container, blob, text, rangeStart, rangeEnd, options, callback)

Updates a page blob from text.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

text string

The text string.

rangeStart int

The range start.

rangeEnd int

The range end.

options object <optional>

The page blob and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise pageBlob will contain the blob information. response will contain information related to this operation.

Source:

createBlobSnapshot(container, blob, options, callback)

Creates a read-only snapshot of a blob.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The snapshot identifier.

metadata object <optional>

The metadata key/value pairs.

leaseId string <optional>

The lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise snapshotId will contain the ID of the snapshot. response will contain information related to this operation.

Source:

createBlockBlobFromFile(container, blob, localFilename, optionsOrCallback, callback) → {SpeedSummary}

Creates a new block blob or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List operation. Calling Put Blob to create a page blob only initializes the blob. To add content to a page blob, call the Put Page operation.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

localFilename string

The local path to the file to be uploaded.

optionsOrCallback object | function <optional>

The creating and request options.

Properties
Name Type Argument Description
blockIdPrefix string <optional>

The prefix for block id.

leaseId string <optional>

The lease identifier.

metadata object <optional>

The metadata key/value pairs.

setBlobContentMD5 bool <optional>

Specifies whether the blob's ContentMD5 header should be set on uploads. This field is not supported for page blobs. The default value is false.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

The callback function.

Source:
Returns:
Type
SpeedSummary

createBlockBlobFromStream(container, blob, (Stream), streamLength, optionsOrCallback, callback) → {SpeedSummary}

Uploads a block blob from a stream.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

(Stream)

stream Stream to the data to store.

streamLength int

The length of the stream to upload.

optionsOrCallback object | function <optional>

The creating and request options.

Properties
Name Type Argument Description
speedSummary SpeedSummary <optional>

The download tracker objects;

blockIdPrefix string <optional>

The prefix for block id.

leaseId string <optional>

The lease identifier.

metadata object <optional>

The metadata key/value pairs.

setBlobContentMD5 bool <optional>

Specifies whether the blob's ContentMD5 header should be set on uploads. This field is not supported for page blobs. The default value is false.

useTransactionalMD5 bool <optional>

Calculate and send/validate content MD5 for transactions.

blobType string <optional>

The type of blob to create: block blob or page blob.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

The callback function.

Source:
Returns:
Type
SpeedSummary

createBlockBlobFromText(container, blob, text, options, callback) → {undefined}

Uploads a block blob from a text string.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

text string

The blob text.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The lease identifier.

metadata object <optional>

The metadata key/value pairs.

setBlobContentMD5 bool <optional>

Specifies whether the blob's ContentMD5 header should be set on uploads. This field is not supported for page blobs. The default value is false.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blockBlob will contain information about the blob. response will contain information related to this operation.

Source:
Returns:
Type
undefined

createContainer(container, options, callback)

Creates a new container under the specified account. If a container with the same name already exists, the operation fails.

This:
Parameters:
Name Type Argument Description
container string

The container name.

options object <optional>

The optional container and request options.

Properties
Name Type Argument Description
metadata object <optional>

The metadata key/value pairs.

publicAccessLevel string <optional>

Specifies whether data in the container may be accessed publicly and the level of access.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise container will contain the BlobService~containerResult for the container. response will contain information related to this operation.

Source:

createContainerIfNotExists(container, options, callback)

Creates a new container under the specified account if the container does not exists.

This:
Parameters:
Name Type Argument Description
container string

The container name.

options object <optional>

The optional container and request options.

Properties
Name Type Argument Description
metadata object <optional>

The metadata key/value pairs.

publicAccessLevel string <optional>

Specifies whether data in the container may be accessed publicly and the level of access.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise containerCreated will contain be true if the container was created, or false if the container already exists. response will contain information related to this operation.

Source:
Example
var azure = require('azure');
var blobService = azure.createBlobService();
blobService.createContainerIfNotExists('taskcontainer', {publicAccessLevel : 'blob'}, function(error) {
  if(!error) {
    // Container created or exists, and is public
  }
}); 

createPageBlob(container, blob, length, options, callback)

Writes a range of pages to a page blob.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

length int

The length of the page blob in bytes.

options object <optional>

The page blob and request options.

Properties
Name Type Argument Description
metadata object <optional>

The metadata key/value pairs.

leaseId string <optional>

The target blob lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise response will contain information related to this operation.

Source:

createPageBlobFromFile(container, blob, (string), optionsOrCallback, callback) → {SpeedSummary}

Uploads a page blob from file.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

(string)

localFileName The local path to the file to be uploaded.

optionsOrCallback object | function <optional>

The creating and request options.

Properties
Name Type Argument Description
speedSummary SpeedSummary <optional>

The download tracker objects;

blockIdPrefix string <optional>

The prefix for block id.

leaseId string <optional>

The lease identifier.

metadata object <optional>

The metadata key/value pairs.

setBlobContentMD5 bool <optional>

Specifies whether the blob's ContentMD5 header should be set on uploads. This field is not supported for page blobs. The default value is false.

useTransactionalMD5 bool <optional>

Calculate and send/validate content MD5 for transactions.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

The callback function.

Source:
Returns:
Type
SpeedSummary

createPageBlobFromStream(container, blob, (Stream), streamLength, optionsOrCallback, callback) → {SpeedSummary}

Uploads a page blob from a stream.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

(Stream)

stream Stream to the data to store.

streamLength int

The length of the stream to upload.

optionsOrCallback object | function <optional>

The creating and request options.

Properties
Name Type Argument Description
speedSummary SpeedSummary <optional>

The download tracker objects;

blockIdPrefix string <optional>

The prefix for block id.

leaseId string <optional>

The lease identifier.

metadata object <optional>

The metadata key/value pairs.

setBlobContentMD5 bool <optional>

Specifies whether the blob's ContentMD5 header should be set on uploads. This field is not supported for page blobs. The default value is false.

useTransactionalMD5 bool <optional>

Calculate and send/validate content MD5 for transactions.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

The callback function.

Source:
Returns:
Type
SpeedSummary

deleteBlob(container, blob, options, callback)

Marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection. In order to delete a blob, you must delete all of its snapshots. You can delete both at the same time with the Delete Blob operation.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The snapshot identifier.

leaseId string <optional>

The lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise isSuccessful will contain true if the operation was successful. response will contain information related to this operation.

Source:

deleteContainer(container, options, callback)

Marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection.

This:
Parameters:
Name Type Argument Description
container string

The container name.

options object <optional>

The container and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise response will contain information related to this operation.

Source:

generateBlockIdPrefix()

Generate an random block id prefix

Source:

generateSharedAccessSignature(container, blob, sharedAccessPolicy) → {object}

Retrieves a shared access URL.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string <optional>

The blob name.

sharedAccessPolicy object

The shared access policy.

Properties
Name Type Argument Description
Id string <optional>

The signed identifier.

AccessPolicy.Permissions object <optional>

The permission type.

AccessPolicy.Start date | string <optional>

The time at which the Shared Access Signature becomes valid (The UTC value will be used).

AccessPolicy.Expiry date | string

The time at which the Shared Access Signature becomes expired (The UTC value will be used).

Source:
Returns:

An object with the shared access signature.

Type
object

getBlob(container, blob, options, callback)

Downloads a blob into a stream.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The snapshot identifier.

leaseId string <optional>

The lease identifier.

blobType string <optional>

The type of blob to create: block blob or page blob.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

rangeStart string <optional>

Return only the bytes of the blob in the specified range.

rangeEnd string <optional>

Return only the bytes of the blob in the specified range.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

rangeStartHeader string <optional>

Return only the bytes of the blob in the specified range. If both Range and x-ms-range are specified, the service uses the value of x-ms-range.

rangeEndHeader string <optional>

Return only the bytes of the blob in the specified range. If both Range and x-ms-range are specified, the service uses the value of x-ms-range.

rangeGetContentMd5 string <optional>

When this header is set to true and specified together with the Range header, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size.

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blockBlob will contain the blob information. response will contain information related to this operation.

Source:
Example
var azure = require('azure');
var blobService = azure.createBlobService();
blobService.getBlob('taskcontainer', 'task1', function(error, serverBlob) {
  if(!error) {
    // Blob available in serverBlob.blob variable
  }
});

blobService.getBlob('taskcontainer', 'task1').pipe(fs.createWriteStream('myfile.txt'));

getBlobMetadata(container, blob, options, callback)

Returns all user-defined metadata for the specified blob or snapshot.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The snapshot identifier.

leaseId string <optional>

The lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blob will contain information about the blob. response will contain information related to this operation.

Source:

getBlobProperties(container, blob, options, callback)

Returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The snapshot identifier.

leaseId string <optional>

The lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blob will contain information about the blob. response will contain information related to this operation.

Source:

getBlobToFile(container, blob, localFileName, options, callback) → {SpeedSummary}

Downloads a blob into a file.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

localFileName string

The local path to the file to be downloaded.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
speedSummary SpeedSummary <optional>

The download tracker objects

snapshotId string <optional>

The snapshot identifier.

leaseId string <optional>

The lease identifier.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

rangeStart string <optional>

Return only the bytes of the blob in the specified range.

rangeEnd string <optional>

Return only the bytes of the blob in the specified range.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

rangeStartHeader string <optional>

Return only the bytes of the blob in the specified range. If both Range and x-ms-range are specified, the service uses the value of x-ms-range.

rangeEndHeader string <optional>

Return only the bytes of the blob in the specified range. If both Range and x-ms-range are specified, the service uses the value of x-ms-range.

rangeGetContentMd5 string <optional>

When this header is set to true and specified together with the Range header, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size.

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blockBlob will contain the blob information. response will contain information related to this operation.

Source:
Returns:
Type
SpeedSummary

getBlobToStream(container, blob, writeStream, options, callback)

Downloads a blob into a stream.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

writeStream Stream

The write stream.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The snapshot identifier.

leaseId string <optional>

The lease identifier.

blobType string <optional>

The type of blob to create: block blob or page blob.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

rangeStart string <optional>

Return only the bytes of the blob in the specified range.

rangeEnd string <optional>

Return only the bytes of the blob in the specified range.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

rangeStartHeader string <optional>

Return only the bytes of the blob in the specified range. If both Range and x-ms-range are specified, the service uses the value of x-ms-range.

rangeEndHeader string <optional>

Return only the bytes of the blob in the specified range. If both Range and x-ms-range are specified, the service uses the value of x-ms-range.

rangeGetContentMd5 string <optional>

When this header is set to true and specified together with the Range header, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size.

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blockBlob will contain the blob information. response will contain information related to this operation.

Source:
Example
var azure = require('azure');
var blobService = azure.createBlobService();
blobService.getBlobToStream('taskcontainer', 'task1', fs.createWriteStream('task1-download.txt'), function(error, serverBlob) {
  if(!error) {
    // Blob available in serverBlob.blob variable
  }
}); 

getBlobToText(container, blob, options, callback)

Downloads a blob into a text string.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The snapshot identifier.

leaseId string <optional>

The lease identifier.

blobType string <optional>

The type of blob to create: block blob or page blob.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

rangeStart string <optional>

Return only the bytes of the blob in the specified range.

rangeEnd string <optional>

Return only the bytes of the blob in the specified range.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

rangeStartHeader string <optional>

Return only the bytes of the blob in the specified range. If both Range and x-ms-range are specified, the service uses the value of x-ms-range.

rangeEndHeader string <optional>

Return only the bytes of the blob in the specified range. If both Range and x-ms-range are specified, the service uses the value of x-ms-range.

rangeGetContentMd5 string <optional>

When this header is set to true and specified together with the Range header, the service returns the MD5 hash for the range, as long as the range is less than or equal to 4 MB in size.

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise text will contain the blob contents, and blockBlob will contain the blob information. response will contain information related to this operation.

Source:

getBlobUrl(container, blob, sharedAccessPolicy) → {object}

Retrieves a blob URL.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string <optional>

The blob name.

sharedAccessPolicy object <optional>

The shared access policy.

Properties
Name Type Argument Description
Id string <optional>

The signed identifier.

AccessPolicy.Permissions object <optional>

The permission type.

AccessPolicy.Start date | string <optional>

The time at which the Shared Access Signature becomes valid (The UTC value will be used).

AccessPolicy.Expiry date | string

The time at which the Shared Access Signature becomes expired (The UTC value will be used).

Source:
Returns:

An object with the blob URL.

Type
object
Example
var azure = require('azure');
var blobService = azure.createBlobService();
//create a SAS that expires in an hour
var sharedAccessPolicy = { AccessPolicy: { Expiry: azure.date.minutesFromNow(60); } };
var sasUrl = blobService.getBlobUrl(containerName, blobName, sharedAccessPolicy);

getBlockId()

Get an block id according to prefix and block number

Source:

getContainerAcl(container, options, callback)

Gets the container's ACL.

This:
Parameters:
Name Type Argument Description
container string

The container name.

options object <optional>

The container and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise container will contain the BlobService~containerResult information for the container. response will contain information related to this operation.

Source:

getContainerMetadata(container, options, callback)

Returns all user-defined metadata for the container.

This:
Parameters:
Name Type Argument Description
container string

The container name.

options object <optional>

The request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise container will contain the BlobService~containerResult information for the container. response will contain information related to this operation.

Source:

getContainerProperties(container, options, callback)

Retrieves a container and its properties from a specified account.

This:
Parameters:
Name Type Argument Description
container string

The container name.

options object <optional>

The request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise container will contain the BlobService~containerResult information for the container. response will contain information related to this operation.

Source:

getServiceProperties(options, callback)

Gets the properties of a storage account’s Blob service, including Windows Azure Storage Analytics.

This:
Parameters:
Name Type Argument Description
options object <optional>

The request options.

Properties
Name Type Argument Description
timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise, serviceProperties will contain the properties and response will contain information related to this operation.

Source:

listBlobBlocks(container, blob, blocklisttype, options, callback)

Retrieves the list of blocks that have been uploaded as part of a block blob.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

blocklisttype BlockListFilter

The type of block list to retrieve.

options object <optional>

The blocklist and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The source blob snapshot identifier.

leaseId string <optional>

The target blob lease identifier.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blocklist will contain the blocklist information. response will contain information related to this operation.

Source:

listBlobRegions(container, blob, rangeStart, rangeEnd, options, callback)

Lists page blob regions.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

rangeStart int

The range start.

rangeEnd int

The range end.

options object <optional>

The page blob and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The snapshot identifier.

leaseId string <optional>

The target blob lease identifier.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise pageRegions will contain the page region information. response will contain information related to this operation.

Source:

listBlobs(container, options, callback)

Lists all of the blobs in the given container.

This:
Parameters:
Name Type Argument Description
container string

The container name.

options object <optional>

The listing and request options.

Properties
Name Type Argument Description
prefix string <optional>

The blob name prefix.

delimiter string <optional>

Delimiter, i.e. '/', for specifying folder hierarchy.

maxresults int <optional>

Specifies the maximum number of blobs to return per call to Azure ServiceClient. This does NOT affect list size returned by this function. (maximum: 5000)

marker string <optional>

String value that identifies the portion of the list to be returned with the next list operation.

include string <optional>

Specifies that the response should include one or more of the following subsets: '', 'metadata', 'snapshots', 'uncommittedblobs'). Multiple values can be added separated with a comma (,)

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blobs will contain the blobs within the container. response will contain information related to this operation.

Source:

listContainers(options, callback)

Returns a list of the containers under the specified account.

This:
Parameters:
Name Type Argument Description
options object <optional>

The list container options.

Properties
Name Type Argument Description
prefix string <optional>

Filters the results to return only containers whose name begins with the specified prefix.

maxresults int <optional>

Specifies the maximum number of containers to return per call to Azure storage.

marker string <optional>

String value that identifies the portion of the list to be returned with the next list operation.

include string <optional>

Include this parameter to specify that the container's metadata be returned as part of the response body. (allowed values: '', 'metadata')

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise containers will contain a list of BlobService~containerResult objects, and response will contain information related to this operation. If not all container information could be retrieved, nextMarker will contain a value that can be used to retrieve the next section of the containers list.

Source:

putBlockBlobFromFile(container, blob, localFilename, options, callback) → {undefined}

Creates a new block blob or page blob, or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List operation. Calling Put Blob to create a page blob only initializes the blob. To add content to a page blob, call the Put Page operation.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

localFilename string

The local path to the file to be uploaded.

options object <optional>

The creating and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The lease identifier.

metadata object <optional>

The metadata key/value pairs.

setBlobContentMD5 bool <optional>

Specifies whether the blob's ContentMD5 header should be set on uploads. This field is not supported for page blobs. The default value is false.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blockBlob will contain information about the blob. response will contain information related to this operation.

Source:
Returns:
Type
undefined

putBlockBlobFromStream(container, blob, (Stream), streamLength, options, callback) → {undefined}

Uploads a block blob from a stream.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

(Stream)

stream Stream to the data to store.

streamLength int

The length of the stream to upload.

options object <optional>

The creating and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The lease identifier.

metadata object <optional>

The metadata key/value pairs.

setBlobContentMD5 bool <optional>

Specifies whether the blob's ContentMD5 header should be set on uploads. This field is not supported for page blobs. The default value is false.

contentType string <optional>

The MIME content type of the blob. The default type is application/octet-stream.

contentEncoding string <optional>

The content encodings that have been applied to the blob.

contentLanguage string <optional>

The natural languages used by this resource.

contentMD5 string <optional>

The MD5 hash of the blob content.

cacheControl string <optional>

The Blob service stores this value but does not use or modify it.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blockBlob will contain information about the blob. response will contain information related to this operation.

Source:
Returns:
Type
undefined
Example
var azure = require('azure');
var blobService = azure.createBlobService();
blobService.putBlockBlobFromStream('taskcontainer', 'task1', fs.createReadStream('task1-upload.txt'), 11, function(error) {
  if(!error) {
    // Blob uploaded
  }
});

releaseLease(container, blob, leaseId, options, callback)

Releases the lease on the blob.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

leaseId string

The lease identifier.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise lease will contain the lease information. response will contain information related to this operation.

Source:

renewLease(container, blob, leaseId, options, callback)

Renews an existing lease.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

leaseId string

The lease identifier.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise lease will contain the lease information. response will contain information related to this operation.

Source:

setBlobMetadata(container, blob, metadata, options, callback)

Sets user-defined metadata for the specified blob as one or more name-value pairs.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

metadata object

The metadata key/value pairs.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
snapshotId string <optional>

The snapshot identifier.

leaseId string <optional>

The lease identifier.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise blob will contain information on the blob. response will contain information related to this operation.

Source:

setBlobProperties(container, blob, options, callback)

Returns all user-defined metadata, standard HTTP properties, and system properties for the blob. It does not return the content of the blob.

This:
Parameters:
Name Type Argument Description
container string

The container name.

blob string

The blob name.

options object <optional>

The blob and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The lease identifier.

contentTypeHeader string <optional>

The blob’s content type. (x-ms-blob-content-type)

contentEncodingHeader string <optional>

The blob’s content encoding. (x-ms-blob-content-encoding)

contentLanguageHeader string <optional>

The blob's content language. (x-ms-blob-content-language)

contentMD5Header string <optional>

The blob’s MD5 hash. (x-ms-blob-content-md5)

cacheControlHeader string <optional>

The blob's cache control. (x-ms-blob-cache-control)

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

accessConditions object <optional>

The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

callback function

error will contain information if an error occurs; otherwise blob will contain information about the blob. response will contain information related to this operation.

Source:

setContainerAcl(container, publicAccessLevel, options, callback)

Updates the container's ACL.

This:
Parameters:
Name Type Argument Description
container string

The container name.

publicAccessLevel string

Specifies whether data in the container may be accessed publicly and the level of access.

options object <optional>

The container and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

signedIdentifiers object <optional>

The signed identifiers.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise container will contain the BlobService~containerResult information for the container. response will contain information related to this operation.

Source:

setContainerMetadata(container, metadata, options, callback)

Sets the container's metadata.

Calling the Set Container Metadata operation overwrites all existing metadata that is associated with the container. It's not possible to modify an individual name/value pair.

This:
Parameters:
Name Type Argument Description
container string

The container name.

metadata object

The metadata key/value pairs.

options object <optional>

The container and request options.

Properties
Name Type Argument Description
leaseId string <optional>

The target blob lease identifier.

accessConditions object <optional>

See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.

timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise response will contain information related to this operation.

Source:

setServiceProperties(serviceProperties, options, callback)

Sets the properties of a storage account’s Blob service, including Windows Azure Storage Analytics. You can also use this operation to set the default request version for all incoming requests that do not have a version specified.

This:
Parameters:
Name Type Argument Description
serviceProperties object

The service properties.

options object <optional>

The request options.

Properties
Name Type Argument Description
timeoutIntervalInMs int <optional>

The timeout interval, in milliseconds, to use for the request.

callback function

error will contain information if an error occurs; otherwise, response will contain information related to this operation.

Source: