new BlobService(storageAccountOrConnectionString, storageAccessKey, host, sasToken)
Creates a new BlobService object. If no connection string or storageaccount and storageaccesskey are provided, the AZURE_STORAGE_CONNECTION_STRING or 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 | object |
<optional> |
The host address. To define primary only, pass a string. Otherwise 'host.primaryHost' defines the primary host and 'host.secondaryHost' defines the secondary host. |
sasToken |
string |
<optional> |
The Shared Access Signature token. |
- Source:
Extends
- StorageServiceClient
Methods
-
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 request options.
Properties
Name Type Argument Description leaseId
string <optional>
The target blob lease identifier.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the blob information.response
will contain information related to this operation.- Source:
-
acquireLease(container, blob, options, callback)
-
Acquires a new lease. If container and blob are specified, acquires a blob lease. Otherwise, if only container is specified and blob is null, acquires a container lease.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description leaseDuration
string <optional>
The lease duration in seconds. A non-infinite lease can be between 15 and 60 seconds. Default is never to expire.
proposedLeaseId
string <optional>
The proposed lease identifier. Must be a GUID.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the lease information.response
will contain information related to this operation.- Source:
-
appendBlockFromStream(container, blob, readStream, streamLength, options, callback)
-
Creates a new block from a read stream to be appended to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks. If you are guaranteed to have a single writer scenario, please look at options.absorbConditionalErrorsOnRetry and see if setting this flag to true is acceptable for you.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
readStream
Stream The read stream.
streamLength
int The stream length.
options
object <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetry
bool <optional>
Specifies whether to absorb the conditional error on retry.
maxBlobSize
int <optional>
The max length in bytes allowed for the append blob to grow to.
appendPosition
int <optional>
The number indicating the byte offset to check for. The append will succeed only if the end position of the blob is equal to this number.
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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs; otherwiseresponse
will contain information related to this operation.- Source:
-
appendBlockFromText(container, blob, content, options, callback)
-
Creates a new block from a text to be appended to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks. If you are guaranteed to have a single writer scenario, please look at options.absorbConditionalErrorsOnRetry and see if setting this flag to true is acceptable for you.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
content
string | object The block text, as a string or in a Buffer.
options
object <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetry
bool <optional>
Specifies whether to absorb the conditional error on retry.
maxBlobSize
int <optional>
The max length in bytes allowed for the append blob to grow to.
appendPosition
int <optional>
The number indicating the byte offset to check for. The append will succeed only if the end position of the blob is equal to this number.
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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs; otherwiseresponse
will contain information related to this operation.- Source:
-
appendFromLocalFile(container, blob, localFileName, options, callback) → {SpeedSummary}
-
Appends to an append blob from a local file. Assumes the blob already exists on the service. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks. If you are guaranteed to have a single writer scenario, please look at options.absorbConditionalErrorsOnRetry and see if setting this flag to true is acceptable for you.
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 request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetry
bool <optional>
Specifies whether to absorb the conditional error on retry.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult The callback function.
- Source:
Returns:
- Type
- SpeedSummary
-
appendFromStream(container, blob, (Stream), streamLength, options, callback) → {SpeedSummary}
-
Appends to an append blob from a stream. Assumes the blob already exists on the service. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks. If you are guaranteed to have a single writer scenario, please look at options.absorbConditionalErrorsOnRetry and see if setting this flag to true is acceptable for you.
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 request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetry
bool <optional>
Specifies whether to absorb the conditional error on retry.
speedSummary
SpeedSummary <optional>
The download tracker objects.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult The callback function.
- Source:
Returns:
- Type
- SpeedSummary
-
appendFromText(container, blob, text, options, callback) → {undefined}
-
Appends to an append blob from a text string. Assumes the blob already exists on the service. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks. If you are guaranteed to have a single writer scenario, please look at options.absorbConditionalErrorsOnRetry and see if setting this flag to true is acceptable for you.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
text
string | object The blob text, as a string or in a Buffer.
options
object <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetry
bool <optional>
Specifies whether to absorb the conditional error on retry.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain information about the blob.response
will contain information related to this operation.- Source:
Returns:
- Type
- undefined
-
breakLease(container, blob, options, callback)
-
Breaks the lease but ensures that another client cannot acquire a new lease until the current lease period has expired. If container and blob are specified, breaks the blob lease. Otherwise, if only container is specified and blob is null, breaks the container lease.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description leaseBreakPeriod
int <optional>
The lease break period, between 0 and 60 seconds. If unspecified, a fixed-duration lease breaks after the remaining lease period elapses, and an infinite lease breaks immediately.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the lease information.response
will contain information related to this operation.- Source:
-
changeLease(container, blob, leaseId, proposedLeaseId, options, callback)
-
Changes the lease ID of an active lease. If container and blob are specified, changes the blob lease. Otherwise, if only container is specified and blob is null, changes the container lease.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
leaseId
string The current lease identifier.
proposedLeaseId
string The proposed lease identifier. Must be a GUID.
options
object <optional>
The 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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the lease information.response
will contain information related to this operation.- Source:
-
clearPageRange(container, blob, rangeStart, rangeEnd, options, callback)
-
Clears a range of pages.
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 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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs; otherwiseresponse
will contain information related to this operation.- Source:
-
commitBlocks(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 createBlock 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 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.
contentDisposition
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the blob result with the blocklist information.response
will contain information related to this operation.- Source:
-
createAppendBlobFromLocalFile(container, blob, localFileName, options, callback) → {SpeedSummary}
-
Creates a new append blob from a local file. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks. If you are guaranteed to have a single writer scenario, please look at options.absorbConditionalErrorsOnRetry and see if setting this flag to true is acceptable for you. If you want to append data to an already existing blob, please look at appendFromLocalFile.
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 request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetry
bool <optional>
Specifies whether to absorb the conditional error on retry.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult The callback function.
- Source:
Returns:
- Type
- SpeedSummary
-
createAppendBlobFromStream(container, blob, (Stream), streamLength, options, callback) → {SpeedSummary}
-
Uploads an append blob from a stream. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks. If you are guaranteed to have a single writer scenario, please look at options.absorbConditionalErrorsOnRetry and see if setting this flag to true is acceptable for you. If you want to append data to an already existing blob, please look at appendFromStream.
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 request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetry
bool <optional>
Specifies whether to absorb the conditional error on retry.
speedSummary
SpeedSummary <optional>
The download tracker objects.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult The callback function.
- Source:
Returns:
- Type
- SpeedSummary
-
createAppendBlobFromText(container, blob, text, options, callback) → {undefined}
-
Uploads an append blob from a text string. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks. If you are guaranteed to have a single writer scenario, please look at options.absorbConditionalErrorsOnRetry and see if setting this flag to true is acceptable for you. If you want to append data to an already existing blob, please look at appendFromText.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
text
string | object The blob text, as a string or in a Buffer.
options
object <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetry
bool <optional>
Specifies whether to absorb the conditional error on retry.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain information about the blob.response
will contain information related to this operation.- Source:
Returns:
- Type
- undefined
-
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 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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the ID of the snapshot.response
will contain information related to this operation.- Source:
-
createBlockBlobFromLocalFile(container, blob, localFileName, options, callback) → {SpeedSummary}
-
Creates a new block blob. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object.
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 request options.
Properties
Name Type Argument Description blockIdPrefix
string <optional>
The prefix to be used to generate the block id.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
parallelOperationThreadCount
int <optional>
Parallel operation thread count
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult The callback function.
- Source:
Returns:
- Type
- SpeedSummary
-
createBlockBlobFromStream(container, blob, (Stream), streamLength, options, callback) → {SpeedSummary}
-
Uploads a block blob from a stream. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object.
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 request options.
Properties
Name Type Argument Description speedSummary
SpeedSummary <optional>
The download tracker objects.
blockIdPrefix
string <optional>
The prefix to be used to generate the block id.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
parallelOperationThreadCount
int <optional>
Parallel operation thread count
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult The callback function.
- Source:
Returns:
- Type
- SpeedSummary
-
createBlockBlobFromText(container, blob, text, options, callback) → {undefined}
-
Uploads a block blob from a text string. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
text
string | object The blob text, as a string or in a Buffer.
options
object <optional>
The request options.
Properties
Name Type Argument Description leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain information about the blob.response
will contain information related to this operation.- Source:
Returns:
- Type
- undefined
-
createBlockFromStream(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 request options.
Properties
Name Type Argument Description useTransactionalMD5
bool <optional>
Calculate and send/validate content MD5 for transactions.
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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs; otherwiseresponse
will contain information related to this operation.- Source:
-
createBlockFromText(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 request options.
Properties
Name Type Argument Description useTransactionalMD5
bool <optional>
Calculate and send/validate content MD5 for transactions.
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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs; otherwiseresponse
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 request options.
Properties
Name Type Argument Description locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
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 server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the container information.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 request options.
Properties
Name Type Argument Description locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
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 server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will 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-storage'); var blobService = azure.createBlobService(); blobService.createContainerIfNotExists('taskcontainer', {publicAccessLevel : 'blob'}, function(error) { if(!error) { // Container created or exists, and is public } });
-
createOrReplaceAppendBlob(container, blob, options, callback)
-
Creates an empty append blob. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The 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.
contentDisposition
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs; otherwiseresponse
will contain information related to this operation.- Source:
-
createPageBlob(container, blob, length, options, callback)
-
Creates a page blob of the specified length. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object.
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 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.
contentDisposition
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
sequenceNumber
string <optional>
The blob's sequence number. (x-ms-blob-sequence-number)
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs; otherwiseresponse
will contain information related to this operation.- Source:
-
createPageBlobFromLocalFile(container, blob, (string), options, callback) → {SpeedSummary}
-
Uploads a page blob from file. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object.
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.
options
object <optional>
The request options.
Properties
Name Type Argument Description speedSummary
SpeedSummary <optional>
The upload tracker objects.
parallelOperationThreadCount
int <optional>
Parallel operation thread count
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is false for page blobs.
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.
contentDisposition
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult The callback function.
- Source:
Returns:
- Type
- SpeedSummary
-
createPageBlobFromStream(container, blob, (Stream), streamLength, options, callback) → {SpeedSummary}
-
Uploads a page blob from a stream. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object.
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 request options.
Properties
Name Type Argument Description speedSummary
SpeedSummary <optional>
The download tracker objects;
parallelOperationThreadCount
int <optional>
Parallel operation thread count
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is false for page blobs.
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.
contentDisposition
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult The callback function.
- Source:
Returns:
- Type
- SpeedSummary
-
createPagesFromStream(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 request options.
Properties
Name Type Argument Description leaseId
string <optional>
The target blob lease identifier.
useTransactionalMD5
bool <optional>
Calculate and send/validate content MD5 for transactions.
contentMD5
string <optional>
An optional hash value used to ensure transactional integrity for the page.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the blob information.response
will contain information related to this operation.- Source:
-
createReadStream(container, blob, options, callback) → {Stream}
-
Provides a stream to read from a blob.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description snapshotId
string <optional>
The snapshot identifier.
leaseId
string <optional>
The lease identifier.
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.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
useTransactionalMD5
boolean <optional>
When set to true, Calculate and send/validate content MD5 for transactions.
disableContentMD5Validation
boolean <optional>
When set to true, MD5 validation will be disabled when downloading blobs.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the blob information.response
will contain information related to this operation.- Source:
Returns:
- Type
- Stream
Example
var azure = require('azure-storage'); var blobService = azure.createBlobService(); var writable = fs.createWriteStream(destinationFileNameTarget); blobService.createReadStream(containerName, blobName).pipe(writable);
-
createWriteStreamToBlockBlob(container, blob, options, callback) → {Stream}
-
Provides a stream to write to a block blob. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description blockIdPrefix
string <optional>
The prefix to be used to generate the block id.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
parallelOperationThreadCount
int <optional>
Parallel operation thread count
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is false for page blobs and true for block blobs.
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.
position
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse The callback function.
- Source:
Returns:
- Type
- Stream
Example
var azure = require('azure-storage'); var blobService = azure.createBlobService(); var stream = fs.createReadStream(fileNameTarget).pipe(blobService.createWriteStreamToBlockBlob(containerName, blobName, { blockIdPrefix: 'block' }));
-
createWriteStreamToExistingAppendBlob(container, blob, options, callback) → {Stream}
-
Provides a stream to write to an existing append blob. Assumes that the blob exists. If it does not, please create the blob using createAppendBlob before calling this method or use createWriteStreamToNewAppendBlob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks. If you are guaranteed to have a single writer scenario, please look at options.absorbConditionalErrorsOnRetry and see if setting this flag to true is acceptable for you.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetry
bool <optional>
Specifies whether to absorb the conditional error on retry.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is false for page blobs and true for block blobs.
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.
position
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse The callback function.
- Source:
Returns:
- Type
- Stream
Example
var azure = require('azure-storage'); var blobService = azure.createBlobService(); var stream = fs.createReadStream(fileNameTarget).pipe(blobService.createWriteStreamToAppendBlob(containerName, blobName));
-
createWriteStreamToExistingPageBlob(container, blob, options, callback) → {Stream}
-
Provides a stream to write to a page blob. Assumes that the blob exists. If it does not, please create the blob using createPageBlob before calling this method or use createWriteStreamNewPageBlob.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
parallelOperationThreadCount
int <optional>
Parallel operation thread count
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is false for page blobs and true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse The callback function.
- Source:
Returns:
- Type
- Stream
Example
var azure = require('azure-storage'); var blobService = azure.createBlobService(); blobService.createPageBlob(containerName, blobName, 1024, function (err) { // Pipe file to a blob var stream = fs.createReadStream(fileNameTarget).pipe(blobService.createWriteStreamToExistingPageBlob(containerName, blobName)); });
-
createWriteStreamToNewAppendBlob(container, blob, options, callback) → {Stream}
-
Provides a stream to write to a new append blob. If the blob already exists on the service, it will be overwritten. To avoid overwriting and instead throw an error if the blob exists, please pass in an accessConditions parameter in the options object. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks. If you are guaranteed to have a single writer scenario, please look at options.absorbConditionalErrorsOnRetry and see if setting this flag to true is acceptable for you.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetry
bool <optional>
Specifies whether to absorb the conditional error on retry.
leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is false for page blobs and true for block blobs.
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.
position
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information. Use options.accessConditions = require('azure-storage').AccessCondition.generateIfNotExistsCondition() to avoid overwriting and instead throw an error if the blob exists.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse The callback function.
- Source:
Returns:
- Type
- Stream
Example
var azure = require('azure-storage'); var blobService = azure.createBlobService(); var stream = fs.createReadStream(fileNameTarget).pipe(blobService.createWriteStreamToAppendBlob(containerName, blobName));
-
createWriteStreamToNewPageBlob(container, blob, length, options, callback) → {Stream}
-
Provides a stream to write to a page blob. Creates the blob before writing data. If the blob already exists on the service, it will be overwritten.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
length
string The blob length.
options
object <optional>
The request options.
Properties
Name Type Argument Description leaseId
string <optional>
The lease identifier.
metadata
object <optional>
The metadata key/value pairs.
parallelOperationThreadCount
int <optional>
Parallel operation thread count
storeBlobContentMD5
bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is false for page blobs and true for block blobs.
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.
contentDisposition
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse The callback function.
- Source:
Returns:
- Type
- Stream
Example
var azure = require('azure-storage'); var blobService = azure.createBlobService(); blobService.createPageBlob(containerName, blobName, 1024, function (err) { // Pipe file to a blob var stream = fs.createReadStream(fileNameTarget).pipe(blobService.createWriteStreamToNewPageBlob(containerName, blobName)); });
-
deleteBlob(container, blob, options, callback)
-
Marks the specified blob or snapshot for deletion. The blob is later deleted during garbage collection. If a blob has snapshots, you must delete them when deleting the blob. Using the deleteSnapshots option, you can choose either to delete both the blob and its snapshots, or to delete only the snapshots but not the blob itself. If the blob has snapshots, you must include the deleteSnapshots option or the blob service will return an error and nothing will be deleted. If you are deleting a specific snapshot using the snapshotId option, the deleteSnapshots option must NOT be included.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description deleteSnapshots
string <optional>
The snapshot delete option. See azure.BlobUtilities.SnapshotDeleteOptions.*.
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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs;response
will contain information related to this operation.- Source:
-
deleteBlobIfExists(container, blob, options, callback)
-
Marks the specified blob or snapshot for deletion if it exists. The blob is later deleted during garbage collection. If a blob has snapshots, you must delete them when deleting the blob. Using the deleteSnapshots option, you can choose either to delete both the blob and its snapshots, or to delete only the snapshots but not the blob itself. If the blob has snapshots, you must include the deleteSnapshots option or the blob service will return an error and nothing will be deleted. If you are deleting a specific snapshot using the snapshotId option, the deleteSnapshots option must NOT be included.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description deleteSnapshots
string <optional>
The snapshot delete option. See azure.BlobUtilities.SnapshotDeleteOptions.*.
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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will be true if the blob was deleted, or false if the blob does not exist.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 request options.
Properties
Name Type Argument Description leaseId
string <optional>
The container lease identifier.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs; otherwiseresponse
will contain information related to this operation.- Source:
-
deleteContainerIfExists(container, options, callback)
-
Marks the specified container for deletion if it exists. 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 request options.
Properties
Name Type Argument Description leaseId
string <optional>
The container lease identifier.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will be true if the container exists and was deleted, or false if the container did not exist.response
will contain information related to this operation.- Source:
-
doesBlobExist(container, blob, options, callback)
-
Checks whether or not a blob exists on the service.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseerrorOrResult
will be true if the blob exists, or false if the blob does not exist.response
will contain information related to this operation.- Source:
-
doesContainerExist(container, options, callback)
-
Checks whether or not a container exists on the service.
This:
Parameters:
Name Type Argument Description container
string The container name.
options
object <optional>
The request options.
Properties
Name Type Argument Description locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will be true if the container exists, or false if the container does not exist.response
will contain information related to this operation.- Source:
-
generateBlockIdPrefix()
-
Generate a random block id prefix
- Source:
-
generateSharedAccessSignature(container, blob, sharedAccessPolicy, headers) → {string}
-
Retrieves a shared access signature token.
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 <optional>
The time at which the Shared Access Signature becomes expired (The UTC value will be used).
AccessPolicy.IPAddressOrRange
string <optional>
An IP address or a range of IP addresses from which to accept requests. When specifying a range, note that the range is inclusive.
AccessPolicy.Protocol
string <optional>
The protocol permitted for a request made with the account SAS. Possible values are both HTTPS and HTTP (https,http) or HTTPS only (https). The default value is https,http.
headers
object <optional>
The optional header values to set for a blob returned wth this SAS.
Properties
Name Type Argument Description cacheControl
string <optional>
The optional value of the Cache-Control response header to be returned when this SAS is used.
contentType
string <optional>
The optional value of the Content-Type response header to be returned when this SAS is used.
contentEncoding
string <optional>
The optional value of the Content-Encoding response header to be returned when this SAS is used.
contentLanguage
string <optional>
The optional value of the Content-Language response header to be returned when this SAS is used.
contentDisposition
string <optional>
The optional value of the Content-Disposition response header to be returned when this SAS is used.
- Source:
Returns:
The shared access signature query string. Note this string does not contain the leading "?".
- Type
- string
-
getBlobMetadata(container, blob, options, callback)
-
Returns all user-defined metadata for the specified blob or snapshot. It does not modify or 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 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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
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 or modify 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 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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain information about the blob.response
will contain information related to this operation.- Source:
-
getBlobToLocalFile(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 request options.
Properties
Name Type Argument Description skipSizeCheck
boolean <optional>
Skip the size check to perform direct download. Set the option to true for small blobs. Parallel download and speed summary won't work with this option on.
speedSummary
SpeedSummary <optional>
The download tracker objects.
parallelOperationThreadCount
int <optional>
Parallel operation thread count
snapshotId
string <optional>
The snapshot identifier.
leaseId
string <optional>
The lease identifier.
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.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
useTransactionalMD5
boolean <optional>
When set to true, Calculate and send/validate content MD5 for transactions.
disableContentMD5Validation
boolean <optional>
When set to true, MD5 validation will be disabled when downloading blobs.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the blob information.response
will contain information related to this operation.- Source:
Returns:
- Type
- SpeedSummary
Example
var azure = require('azure-storage'); var blobService = azure.createBlobService(); blobService.getBlobToLocalFile('taskcontainer', 'task1', 'task1-download.txt', function(error, serverBlob) { if(!error) { // Blob available in serverBlob.blob variable }
-
getBlobToStream(container, blob, writeStream, options, callback) → {SpeedSummary}
-
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 request options.
Properties
Name Type Argument Description skipSizeCheck
boolean <optional>
Skip the size check to perform direct download. Set the option to true for small blobs. Parallel download and speed summary won't work with this option on.
speedSummary
SpeedSummary <optional>
The download tracker objects.
snapshotId
string <optional>
The snapshot identifier.
leaseId
string <optional>
The lease identifier.
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.
useTransactionalMD5
boolean <optional>
When set to true, Calculate and send/validate content MD5 for transactions.
disableContentMD5Validation
boolean <optional>
When set to true, MD5 validation will be disabled when downloading blobs.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the blob information.response
will contain information related to this operation.- Source:
Returns:
- Type
- SpeedSummary
Example
var azure = require('azure-storage'); 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 request options.
Properties
Name Type Argument Description snapshotId
string <optional>
The snapshot identifier.
leaseId
string <optional>
The lease identifier.
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.
disableContentMD5Validation
boolean <optional>
When set to true, MD5 validation will be disabled when downloading blobs.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
BlobService~blobToText error
will contain information if an error occurs; otherwisetext
will contain the blob contents, andblockBlob
will contain the blob information.response
will contain information related to this operation.- Source:
-
getBlockId()
-
Get a 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 request options.
Properties
Name Type Argument Description leaseId
string <optional>
The container lease identifier.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain 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 container lease identifier.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain 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 locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
leaseId
string <optional>
The container lease identifier.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain 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 Azure Storage Analytics.
This:
Parameters:
Name Type Argument Description options
object <optional>
The request options.
Properties
Name Type Argument Description locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwise,result
will contain the properties andresponse
will contain information related to this operation.- Source:
-
getServiceStats(options, callback)
-
Gets the service stats for a storage account’s Blob service.
This:
Parameters:
Name Type Argument Description options
object <optional>
The request options.
Properties
Name Type Argument Description locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwise,result
will contain the stats andresponse
will contain information related to this operation.- Source:
-
getUrl(container, blob, sasToken, primary) → {string}
-
Retrieves a blob or container URL.
Parameters:
Name Type Argument Description container
string The container name.
blob
string <optional>
The blob name.
sasToken
string <optional>
The Shared Access Signature token.
primary
boolean <optional>
A boolean representing whether to use the primary or the secondary endpoint.
- Source:
Returns:
The formatted URL string.
- Type
- string
Example
var azure = require('azure-storage'); var blobService = azure.createBlobService(); //create a SAS that expires in an hour var sasToken = blobService.generateSharedAccessSignature(containerName, blobName, { AccessPolicy: { Expiry: azure.date.minutesFromNow(60); } }); var sasUrl = blobService.getUrl(containerName, blobName, sasToken, true);
-
listBlobDirectoriesSegmented(container, currentToken, options, callback)
-
Lists a segment containing a collection of blob directory items in the container.
This:
Parameters:
Name Type Argument Description container
string The container name.
currentToken
object A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
options
object <optional>
The request options.
Properties
Name Type Argument Description maxResults
int <optional>
Specifies the maximum number of directories to return per call to Azure ServiceClient. This does NOT affect list size returned by this function. (maximum: 5000)
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will containentries
andcontinuationToken
.entries
gives a list of directories and thecontinuationToken
is used for the next listing operation.response
will contain information related to this operation.- Source:
-
listBlobDirectoriesSegmentedWithPrefix(container, prefix, currentToken, options, callback)
-
Lists a segment containing a collection of blob directory items in the container.
This:
Parameters:
Name Type Argument Description container
string The container name.
prefix
string The prefix of the blob directory.
currentToken
object A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
options
object <optional>
The request options.
Properties
Name Type Argument Description maxResults
int <optional>
Specifies the maximum number of directories to return per call to Azure ServiceClient. This does NOT affect list size returned by this function. (maximum: 5000)
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will containentries
andcontinuationToken
.entries
gives a list of directories and thecontinuationToken
is used for the next listing operation.response
will contain information related to this operation.- Source:
-
listBlobsSegmented(container, currentToken, options, callback)
-
Lists a segment containing a collection of blob items in the container.
This:
Parameters:
Name Type Argument Description container
string The container name.
currentToken
object A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
options
object <optional>
The request options.
Properties
Name Type Argument Description 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)
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 (,)
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will containentries
andcontinuationToken
.entries
gives a list of blobs and thecontinuationToken
is used for the next listing operation.response
will contain information related to this operation.- Source:
-
listBlobsSegmentedWithPrefix(container, prefix, currentToken, options, callback)
-
Lists a segment containing a collection of blob items whose names begin with the specified prefix in the container.
This:
Parameters:
Name Type Argument Description container
string The container name.
prefix
string The prefix of the blob name.
currentToken
object A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
options
object <optional>
The request options.
Properties
Name Type Argument Description 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)
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 (,)
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
[options.maximumExecutionTimeInMs]The
int maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
options.clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
options.useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the entries of blobs and the continuation token for the next listing operation.response
will contain information related to this operation.- Source:
-
listBlocks(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 request options.
Properties
Name Type Argument Description snapshotId
string <optional>
The source blob snapshot identifier.
leaseId
string <optional>
The target blob lease identifier.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the blocklist information.response
will contain information related to this operation.- Source:
-
listContainersSegmented(currentToken, options, callback)
-
Lists a segment containing a collection of container items under the specified account.
This:
Parameters:
Name Type Argument Description currentToken
object A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
options
object <optional>
The request options.
Properties
Name Type Argument Description locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
maxResults
int <optional>
Specifies the maximum number of containers to return per call to Azure storage.
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 server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will containentries
andcontinuationToken
.entries
gives a list of containers and thecontinuationToken
is used for the next listing operation.response
will contain information related to this operation.- Source:
-
listContainersSegmentedWithPrefix(prefix, currentToken, options, callback)
-
Lists a segment containing a collection of container items whose names begin with the specified prefix under the specified account.
This:
Parameters:
Name Type Argument Description prefix
string The prefix of the container name.
currentToken
object A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
options
object <optional>
The request options.
Properties
Name Type Argument Description locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
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.
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 server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will containentries
andcontinuationToken
.entries
gives a list of containers and thecontinuationToken
is used for the next listing operation.response
will contain information related to this operation.- Source:
-
listPageRanges(container, blob, options, callback)
-
Lists page ranges. Lists all of the page ranges by default, or only the page ranges over a specific range of bytes if rangeStart and rangeEnd are specified.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
options
object <optional>
The request options.
Properties
Name Type Argument Description rangeStart
int <optional>
The range start.
rangeEnd
int <optional>
The range end.
snapshotId
string <optional>
The snapshot identifier.
leaseId
string <optional>
The target blob lease identifier.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the page range information.response
will contain information related to this operation.- Source:
-
releaseLease(container, blob, leaseId, options, callback)
-
Releases the lease. If container and blob are specified, releases the blob lease. Otherwise, if only container is specified and blob is null, releases the container 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 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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the lease information.response
will contain information related to this operation.- Source:
-
renewLease(container, blob, leaseId, options, callback)
-
Renews an existing lease. If container and blob are specified, renews the blob lease. Otherwise, if only container is specified and blob is null, renews the container lease.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
leaseId
string The lease identifier. Must be a GUID.
options
object <optional>
The 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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the lease information.response
will contain information related to this operation.- Source:
-
resizePageBlob(container, blob, size, options, callback)
-
Resizes a page blob.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
size
String The size of the page blob, in bytes.
options
object <optional>
The request options.
Properties
Name Type Argument Description leaseId
string <optional>
The blob lease identifier.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain information about the blob.response
will contain information related to this operation.- Source:
-
setBlobMetadata(container, blob, metadata, options, callback)
-
Sets user-defined metadata for the specified blob or snapshot as one or more name-value pairs It does not modify or return the content of the blob.
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 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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain information on the blob.response
will contain information related to this operation.- Source:
-
setBlobProperties(container, blob, properties, options, callback)
-
Sets user-defined properties for the specified blob or snapshot. It does not modify or return the content of the blob.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
properties
object <optional>
The blob properties to set.
Properties
Name Type Argument Description 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's cache control.
contentDisposition
string <optional>
The blob's content disposition. (x-ms-blob-content-disposition)
options
object <optional>
The request options.
Properties
Name Type Argument Description leaseId
string <optional>
The lease identifier.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
accessConditions
object <optional>
The access conditions. See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain information about the blob.response
will contain information related to this operation.- Source:
-
setContainerAcl(container, signedIdentifiers, options, callback)
-
Updates the container's ACL.
This:
Parameters:
Name Type Argument Description container
string The container name.
signedIdentifiers
object The signed identifiers. Signed identifiers must be in an array.
options
object <optional>
The request options.
Properties
Name Type Argument Description publicAccessLevel
string <optional>
Specifies whether data in the container may be accessed publicly and the level of access.
leaseId
string <optional>
The container lease identifier.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain 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 request options.
Properties
Name Type Argument Description leaseId
string <optional>
The container lease identifier.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
accessConditions
object <optional>
See http://msdn.microsoft.com/en-us/library/dd179371.aspx for more information.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs; otherwiseresponse
will contain information related to this operation.- Source:
-
setPageBlobSequenceNumber(container, blob, sequenceNumberAction, sequenceNumber, options, callback)
-
Sets the page blob's sequence number.
This:
Parameters:
Name Type Argument Description container
string The container name.
blob
string The blob name.
sequenceNumberAction
SequenceNumberAction A value indicating the operation to perform on the sequence number. The allowed values are defined in azure.BlobUtilities.SequenceNumberAction.
sequenceNumber
string The sequence number. The value of the sequence number must be between 0 and 2^63 - 1. Set this parameter to null if this operation is an increment action.
options
object <optional>
The 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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain information about the blob.response
will contain information related to this operation.- Source:
-
setServiceProperties(serviceProperties, options, callback)
-
Sets the properties of a storage account’s Blob service, including 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 locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResponse error
will contain information if an error occurs; otherwise,response
will contain information related to this operation.- Source:
-
startCopyBlob(sourceUri, targetContainer, targetBlob, options, callback)
-
Starts to copy 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 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.
locationMode
LocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.
timeoutIntervalInMs
int <optional>
The server timeout interval, in milliseconds, to use for the request.
maximumExecutionTimeInMs
int <optional>
The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.
clientRequestId
string <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithm
bool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.
callback
errorOrResult error
will contain information if an error occurs; otherwiseresult
will contain the blob information.response
will contain information related to this operation.- Source:
Type Definitions
-
blobToText(error, text, blockBlob, response)
-
The callback for {BlobService~getBlobToText}.
Parameters:
Name Type Description error
object If an error occurs, the error information.
text
string The text returned from the blob.
blockBlob
object Information about the blob.
response
object Information related to this operation.
- Source: