new BlobService( [storageAccountOrConnectionString] [, storageAccessKey] [, host] [, sas] [, endpointSuffix] [, token])
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. |
sas |
string |
<optional> |
The Shared Access Signature string. |
endpointSuffix |
string |
<optional> |
The endpoint suffix. |
token |
TokenCredential |
<optional> |
The TokenCredential object. |
Extends
Members
-
logger :Logger
-
The logger of the service. To change the log level of the services, set the
logger.level.Type:
- Inherited From:
- Source:
Methods
-
_getUrl()
-
Get the url of a given path
- Inherited From:
- Source:
-
_initializeLocation()
-
Initializes the location to which the operation is being sent to.
- Inherited From:
- Source:
-
_invalidLocationMode()
-
Checks whether we have the relevant host information based on the locationMode.
- Inherited From:
- Source:
-
_maximumExecutionTimeExceeded()
-
Checks to see if the maximum execution timeout provided has been exceeded.
- Inherited From:
- Source:
-
_setDefaultProxy()
-
Sets the service host default proxy from the environment.
Can be overridden by calling _setProxyUrl or _setProxy- Inherited From:
- Source:
-
_setOperationExpiryTime()
-
Sets the operation expiry time.
- Inherited From:
- Source:
-
_validateLocation()
-
Validates the location to which the operation is being sent to.
- Inherited From:
- Source:
-
abortCopyBlob(container, blob, copyId [, options], callback)
-
Abort a blob copy operation.
This:
Parameters:
Name Type Argument Description containerstring The destination container name.
blobstring The destination blob name.
copyIdstring The copy operation identifier.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The target blob lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information if an error occurs;
responsewill contain information related to this operation. -
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 containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseDurationstring <optional>
The lease duration in seconds. A non-infinite lease can be between 15 and 60 seconds. Default is never to expire.
proposedLeaseIdstring <optional>
The proposed lease identifier. Must be a GUID.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the lease information.
responsewill contain information related to this operation. -
appendBlockFromStream(container, blob, readStream, streamLength [, options], callback)
-
Creates a new block from a read stream to be appended to an append blob.
If the sequence of data to be appended is important, please use this API strictly in a single writer.
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 the sequence of data to be appended is not important, this API can be used in parallel,
in this case, options.appendPosition can be left without settings.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
readStreamReadable The Node.js Readable stream.
streamLengthint The stream length.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
maxBlobSizeint <optional>
The max length in bytes allowed for the append blob to grow to.
appendPositionint <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.
leaseIdstring <optional>
The target blob lease identifier.
transactionalContentMD5string <optional>
An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation. -
appendBlockFromText(container, blob, content [, options], callback)
-
Creates a new block from a text to be appended to an append blob.
If the sequence of data to be appended is important, please use this API strictly in a single writer.
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 the sequence of data to be appended is not important, this API can be used in parallel,
in this case, options.appendPosition can be left without settings.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
contentstring | object The block text, as a string or in a Buffer.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
maxBlobSizeint <optional>
The max length in bytes allowed for the append blob to grow to.
appendPositionint <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.
leaseIdstring <optional>
The target blob lease identifier.
transactionalContentMD5string <optional>
An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise
responsewill contain information related to this operation. -
appendFromBrowserFile(container, blob, browserFile [, options], callback)
-
Appends to an append blob from an HTML File object. 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.
(Only available in the JavaScript Client Library for Browsers)This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
browserFileFile The File object to be uploaded created by HTML File API.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
leaseIdstring <optional>
The lease identifier.
metadataobject <optional>
The metadata key/value pairs.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
appendFromLocalFile(container, blob, localFileName [, options], callback)
-
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.
(Not available in the JavaScript Client Library for Browsers)This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
localFileNamestring The local path to the file to be uploaded.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
leaseIdstring <optional>
The lease identifier.
metadataobject <optional>
The metadata key/value pairs.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
appendFromStream(container, blob, (Stream), streamLength [, options], callback)
-
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 containerstring The container name.
blobstring The blob name.
(Stream)stream Stream to the data to store.
streamLengthint The length of the stream to upload.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
speedSummarySpeedSummary <optional>
The download tracker objects.
leaseIdstring <optional>
The lease identifier.
metadataobject <optional>
The metadata key/value pairs.
useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
appendFromText(container, blob, text [, options], callback)
-
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 containerstring The container name.
blobstring The blob name.
textstring | object The blob text, as a string or in a Buffer.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
leaseIdstring <optional>
The lease identifier.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation. -
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 containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseBreakPeriodint <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.accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the lease information.
responsewill contain information related to this operation. -
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 containerstring The container name.
blobstring The blob name.
leaseIdstring The current lease identifier.
proposedLeaseIdstring The proposed lease identifier. Must be a GUID.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information if an error occurs;
otherwiseresultwill contain the lease information.
responsewill contain information related to this operation. -
clearPageRange(container, blob, rangeStart, rangeEnd [, options], callback)
-
Clears a range of pages.
This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
rangeStartint The range start.
rangeEndint The range end.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The target blob lease identifier.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise
responsewill contain information related to this operation. -
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.
Note: If no valid list is specified in the blockList parameter, blob would be updated with empty content,
i.e. existing blocks in the blob will be removed, this behavior is kept for backward compatibility consideration.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
blockListobject The wrapper for block ID list contains block IDs that make up the blob.
Three kinds of list are provided, please choose one to use according to requirement.
For more background knowledge, please refer to https://docs.microsoft.com/en-us/rest/api/storageservices/put-block-listProperties
Name Type Argument Description LatestBlocksArray.<string> <optional>
The list contains block IDs that make up the blob sequentially.
All the block IDs in this list will be specified within Latest element.
Choose this list to contain block IDs indicates that the Blob service should first search
the uncommitted block list, and then the committed block list for the named block.CommittedBlocksArray.<string> <optional>
The list contains block IDs that make up the blob sequentially.
All the block IDs in this list will be specified within Committed element.
Choose this list to contain block IDs indicates that the Blob service should only search
the committed block list for the named block.UncommittedBlocksArray.<string> <optional>
The list contains block IDs that make up the blob sequentially.
All the block IDs in this list will be specified within Uncommitted element.
Choose this list to contain block IDs indicates that the Blob service should only search
the uncommitted block list for the named block.optionsobject <optional>
The request options.
Properties
Name Type Argument Description metadataobject <optional>
The metadata key/value pairs.
leaseIdstring <optional>
The target blob lease identifier.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Example
var azure = require('azure-storage'); var blobService = azure.createBlobService(); blobService.createBlockFromText("sampleBlockName", containerName, blobName, "sampleBlockContent", function(error) { assert.equal(error, null); // In this example, LatestBlocks is used, we hope the Blob service first search // the uncommitted block list, and then the committed block list for the named block "sampleBlockName", // and thus make sure the block is with latest content. blobService.commitBlocks(containerName, blobName, { LatestBlocks: ["sampleBlockName"] }, function(error) { assert.equal(error, null); }); }); -
createAppendBlobFromBrowserFile(container, blob, browserFile [, options], callback)
-
Creates a new append blob from an HTML File object. 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 appendFromBrowserFile.
(Only available in the JavaScript Client Library for Browsers)This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
browserFileFile The File object to be uploaded created by HTML File API.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
leaseIdstring <optional>
The lease identifier.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 ahash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
createAppendBlobFromLocalFile(container, blob, localFileName [, options], callback)
-
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.
(Not available in the JavaScript Client Library for Browsers)This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
localFileNamestring The local path to the file to be uploaded.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
leaseIdstring <optional>
The lease identifier.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 ahash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
createAppendBlobFromStream(container, blob, (Stream), streamLength [, options], callback)
-
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 containerstring The container name.
blobstring The blob name.
(Stream)stream Stream to the data to store.
streamLengthint The length of the stream to upload.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
speedSummarySpeedSummary <optional>
The download tracker objects.
leaseIdstring <optional>
The lease identifier.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
createAppendBlobFromText(container, blob, text [, options], callback)
-
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 containerstring The container name.
blobstring The blob name.
textstring | object The blob text, as a string or in a Buffer.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
leaseIdstring <optional>
The lease identifier.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation. -
createBlobSnapshot(container, blob [, options], callback)
-
Creates a read-only snapshot of a blob.
This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description snapshotIdstring <optional>
The snapshot identifier.
metadataobject <optional>
The metadata key/value pairs.
leaseIdstring <optional>
The lease identifier.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the ID of the snapshot.
responsewill contain information related to this operation. -
createBlockBlobFromBrowserFile(container, blob, browserFile [, options], callback)
-
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.
(Only available in the JavaScript Client Library for Browsers)This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
browserFileFile The File object to be uploaded created by HTML File API.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description blockSizeint <optional>
The size of each block. Maximum is 100MB.
blockIdPrefixstring <optional>
The prefix to be used to generate the block id.
leaseIdstring <optional>
The lease identifier.
transactionalContentMD5string <optional>
The MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport.
metadataobject <optional>
The metadata key/value pairs.
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
createBlockBlobFromLocalFile(container, blob, localFileName [, options], callback)
-
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.
(Not available in the JavaScript Client Library for Browsers)This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
localFileNamestring The local path to the file to be uploaded.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description blockSizeint <optional>
The size of each block. Maximum is 100MB.
blockIdPrefixstring <optional>
The prefix to be used to generate the block id.
leaseIdstring <optional>
The lease identifier.
transactionalContentMD5string <optional>
The MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport.
metadataobject <optional>
The metadata key/value pairs.
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
createBlockBlobFromStream(container, blob, (Stream), streamLength [, options], callback)
-
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 containerstring The container name.
blobstring The blob name.
(Stream)stream Stream to the data to store.
streamLengthint The length of the stream to upload.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description speedSummarySpeedSummary <optional>
The download tracker objects.
blockSizeint <optional>
The size of each block. Maximum is 100MB.
blockIdPrefixstring <optional>
The prefix to be used to generate the block id.
leaseIdstring <optional>
The lease identifier.
transactionalContentMD5string <optional>
The MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport.
metadataobject <optional>
The metadata key/value pairs.
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
createBlockBlobFromText(container, blob, text [, options], callback)
-
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 containerstring The container name.
blobstring The blob name.
textstring | object The blob text, as a string or in a Buffer.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The lease identifier.
transactionalContentMD5string <optional>
The MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads. The default value is true for block blobs.
useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation. -
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 blockIdstring The block identifier.
containerstring The container name.
blobstring The blob name.
readStreamReadable The Node.js Readable stream.
streamLengthint The stream length.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
leaseIdstring <optional>
The target blob lease identifier.
transactionalContentMD5string <optional>
An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise
responsewill contain information related to this operation. -
createBlockFromText(blockId, container, blob, content [, options], callback)
-
Creates a new block to be committed as part of a blob.
This:
Parameters:
Name Type Argument Description blockIdstring The block identifier.
containerstring The container name.
blobstring The blob name.
contentstring | buffer The block content.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
leaseIdstring <optional>
The target blob lease identifier.
transactionalContentMD5string <optional>
An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise
responsewill contain information related to this operation. -
createBlockFromURL(blockId, container, blob, sourceURL, sourceRangeStart, sourceRangeEnd [, options], callback)
-
Creates a new block to be committed as part of a blob from an URL of an Azure blob or file.
This:
Parameters:
Name Type Argument Description blockIdstring The block identifier.
containerstring The container name.
blobstring The blob name.
sourceURLstring The URL of the source data.
It can point to any Azure Blob or File, that is either public or has a shared access signature attached.sourceRangeStartint The start of the range of bytes(inclusive) that has to be taken from the copy source.
sourceRangeEndint The end of the range of bytes(inclusive) that has to be taken from the copy source.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The target blob lease identifier.
transactionalContentMD5string <optional>
An MD5 hash of the block content. This hash is used to verify the integrity of the block during transport.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise
responsewill contain information related to this operation. -
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 containerstring The container name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.metadataobject <optional>
The metadata key/value pairs.
publicAccessLevelstring <optional>
Specifies whether data in the container may be accessed publicly and the level of access.
timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the container information.
responsewill contain information related to this operation. -
createContainerIfNotExists(container [, options], callback)
-
Creates a new container under the specified account if the container does not exists.
This:
Parameters:
Name Type Argument Description containerstring The container name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.metadataobject <optional>
The metadata key/value pairs.
publicAccessLevelstring <optional>
Specifies whether data in the container may be accessed publicly and the level of access.
timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the container information includingcreatedboolean member.
responsewill contain information related to this operation.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 containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description metadataobject <optional>
The metadata key/value pairs.
leaseIdstring <optional>
The target blob lease identifier.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise
responsewill contain information related to this operation. -
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 containerstring The container name.
blobstring The blob name.
lengthint The length of the page blob in bytes.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description metadataobject <optional>
The metadata key/value pairs.
leaseIdstring <optional>
The target blob lease identifier.
blobTierstring <optional>
For page blobs on premium accounts only. Set the tier of the target blob. Refer to BlobUtilities.BlobTier.PremiumPageBlobTier.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The MD5 hash of the blob content.
sequenceNumberstring <optional>
The blob's sequence number.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise
responsewill contain information related to this operation. -
createPageBlobFromBrowserFile(container, blob, browserFile [, options], callback)
-
Uploads a page blob from an HTML 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.
(Only available in the JavaScript Client Library for Browsers)This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
browserFileFile The File object to be uploaded created by HTML File API.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description speedSummarySpeedSummary <optional>
The upload tracker objects.
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
leaseIdstring <optional>
The lease identifier.
transactionalContentMD5string <optional>
An MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads.
The default value is false for page blobs.useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
createPageBlobFromLocalFile(container, blob, localFileName [, options], callback)
-
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.
(Not available in the JavaScript Client Library for Browsers)This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
localFileNamestring The local path to the file to be uploaded.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description speedSummarySpeedSummary <optional>
The upload tracker objects.
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
leaseIdstring <optional>
The lease identifier.
transactionalContentMD5string <optional>
An MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads.
The default value is false for page blobs.useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
blobTierstring <optional>
For page blobs on premium accounts only. Set the tier of the target blob. Refer to BlobUtilities.BlobTier.PremiumPageBlobTier.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
createPageBlobFromStream(container, blob, (Stream), streamLength [, options], callback)
-
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 containerstring The container name.
blobstring The blob name.
(Stream)stream Stream to the data to store.
streamLengthint The length of the stream to upload.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description speedSummarySpeedSummary <optional>
The download tracker objects;
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
leaseIdstring <optional>
The lease identifier.
transactionalContentMD5string <optional>
An MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <optional>
Specifies whether the blob's ContentMD5 header should be set on uploads.
The default value is false for page blobs.useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
blobTierstring <optional>
For page blobs on premium accounts only. Set the tier of the target blob. Refer to BlobUtilities.BlobTier.PremiumPageBlobTier.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
- Type
- SpeedSummary
-
createPagesFromStream(container, blob, readStream, rangeStart, rangeEnd [, options], callback)
-
Updates a page blob from a stream.
This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
readStreamReadable The Node.js Readable stream.
rangeStartint The range start.
rangeEndint The range end.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The target blob lease identifier.
useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
transactionalContentMD5string <optional>
An optional hash value used to ensure transactional integrity for the page.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the page information.
responsewill contain information related to this operation. -
createReadStream(container, blob [, options], callback)
-
Provides a stream to read from a blob.
This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The lease identifier.
rangeStartstring <optional>
Return only the bytes of the blob in the specified range.
rangeEndstring <optional>
Return only the bytes of the blob in the specified range.
accessConditionsAccessConditions <optional>
The access conditions.
useTransactionalMD5boolean <optional>
When set to true, Calculate and send/validate content MD5 for transactions.
disableContentMD5Validationboolean <optional>
When set to true, MD5 validation will be disabled when downloading blobs.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information if an error occurs;
otherwiseresultwill contain the blob information.
responsewill contain information related to this operation.Returns:
A Node.js Readable stream.
- Type
- Readable
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)
-
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.
Please note theStreamreturned by this API should be used with piping.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description blockSizeint <optional>
The size of each block. Maximum is 100MB.
blockIdPrefixstring <optional>
The prefix to be used to generate the block id.
leaseIdstring <optional>
The lease identifier.
transactionalContentMD5string <optional>
The MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport.
metadataobject <optional>
The metadata key/value pairs.
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
storeBlobContentMD5bool <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.useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
A Node.js Writable stream.
- Type
- Writable
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)
-
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.
Please note theStreamreturned by this API should be used with piping.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
leaseIdstring <optional>
The lease identifier.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <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.useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse The callback function.
Returns:
A Node.js Writable stream.
- Type
- Writable
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)
-
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.
Please note theStreamreturned by this API should be used with piping.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The lease identifier.
transactionalContentMD5string <optional>
The MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport.
metadataobject <optional>
The metadata key/value pairs.
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
storeBlobContentMD5bool <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.useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
A Node.js Writable stream.
- Type
- Writable
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)
-
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.
Please note theStreamreturned by this API should be used with piping.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description absorbConditionalErrorsOnRetrybool <optional>
Specifies whether to absorb the conditional error on retry.
leaseIdstring <optional>
The lease identifier.
metadataobject <optional>
The metadata key/value pairs.
storeBlobContentMD5bool <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.useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse The callback function.
Returns:
A Node.js Writable stream.
- Type
- Writable
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)
-
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.
Please note theStreamreturned by this API should be used with piping.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
lengthstring The blob length.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The lease identifier.
transactionalContentMD5string <optional>
The MD5 hash of the blob content. This hash is used to verify the integrity of the blob during transport.
metadataobject <optional>
The metadata key/value pairs.
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
storeBlobContentMD5bool <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.useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
blobTierstring <optional>
For page blobs on premium accounts only. Set the tier of the target blob. Refer to BlobUtilities.BlobTier.PremiumPageBlobTier.
contentSettingsobject <optional>
The content settings of the blob.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The Blob service stores this value but does not use or modify it.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation.Returns:
A Node.js Writable stream.
- Type
- Writable
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 containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description deleteSnapshotsstring <optional>
The snapshot delete option. See azure.BlobUtilities.SnapshotDeleteOptions.*.
snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The lease identifier.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs;responsewill contain information related to this operation. -
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 containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description deleteSnapshotsstring <optional>
The snapshot delete option. See azure.BlobUtilities.SnapshotDeleteOptions.*.
snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The lease identifier.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill
be true if the blob was deleted, or false if the blob
does not exist.
responsewill contain information related to this operation. -
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 containerstring The container name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description accessConditionsAccessConditions <optional>
The access conditions.
leaseIdstring <optional>
The container lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise
responsewill contain information related to this operation. -
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 containerstring The container name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description accessConditionsAccessConditions <optional>
The access conditions.
leaseIdstring <optional>
The container lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill
be true if the container exists and was deleted, or false if the container
did not exist.
responsewill contain information related to this operation. -
doesBlobExist(container, blob [, options], callback)
-
Checks whether or not a blob exists on the service.
This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackfunction errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information including theexistsboolean member.
responsewill contain information related to this operation. -
doesContainerExist(container [, options], callback)
-
Checks whether or not a container exists on the service.
This:
Parameters:
Name Type Argument Description containerstring The container name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the container information includingexistsboolean member.
responsewill contain information related to this operation. -
generateBlockIdPrefix()
-
Generate a random block id prefix
-
generateSharedAccessSignature(container [, blob], sharedAccessPolicy [, headers])
-
Retrieves a shared access signature token.
This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring <optional>
The blob name.
sharedAccessPolicyobject The shared access policy.
Properties
Name Type Argument Description Idstring <optional>
The signed identifier.
AccessPolicy.Permissionsobject <optional>
The permission type.
AccessPolicy.Startdate | string <optional>
The time at which the Shared Access Signature becomes valid (The UTC value will be used).
AccessPolicy.Expirydate | string <optional>
The time at which the Shared Access Signature becomes expired (The UTC value will be used).
AccessPolicy.IPAddressOrRangestring <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.Protocolsstring <optional>
The protocols 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.headersobject <optional>
The optional header values to set for a blob returned wth this SAS.
Properties
Name Type Argument Description cacheControlstring <optional>
The optional value of the Cache-Control response header to be returned when this SAS is used.
contentTypestring <optional>
The optional value of the Content-Type response header to be returned when this SAS is used.
contentEncodingstring <optional>
The optional value of the Content-Encoding response header to be returned when this SAS is used.
contentLanguagestring <optional>
The optional value of the Content-Language response header to be returned when this SAS is used.
contentDispositionstring <optional>
The optional value of the Content-Disposition response header to be returned when this SAS is used.
Returns:
The shared access signature query string. Note this string does not contain the leading "?".
- Type
- string
-
getAccountProperties( [container] [, blob] [, options], callback)
-
Gets the properties of a storage account.
This:
Parameters:
Name Type Argument Description containerstring <optional>
Optional. Name of an existing container. Required when using a SAS token to a specific container or blob.
blobstring <optional>
Optional. Name of an existing blob. Required when using a SAS token to a specific blob.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information if an error occurs; otherwise,resultwill contain the properties
andresponsewill contain information related to this operation. -
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.
Note that all metadata names returned from the server will be converted to lower case by NodeJS itself as metadata is set via HTTP headers and HTTP header names are case insensitive.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The lease identifier.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
information about the blob.
responsewill contain information related to this operation. -
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.
Note that all metadata names returned from the server will be converted to lower case by NodeJS itself as metadata is set via HTTP headers and HTTP header names are case insensitive.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The lease identifier.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
information about the blob.
responsewill contain information related to this operation. -
getBlobToLocalFile(container, blob, localFileName [, options], callback)
-
Downloads a blob into a file.
(Not available in the JavaScript Client Library for Browsers)This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
localFileNamestring The local path to the file to be downloaded.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description skipSizeCheckboolean <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.speedSummarySpeedSummary <optional>
The download tracker objects.
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The lease identifier.
rangeStartstring <optional>
Return only the bytes of the blob in the specified range.
rangeEndstring <optional>
Return only the bytes of the blob in the specified range.
accessConditionsAccessConditions <optional>
The access conditions.
useTransactionalMD5boolean <optional>
When set to true, Calculate and send/validate content MD5 for transactions.
disableContentMD5Validationboolean <optional>
When set to true, MD5 validation will be disabled when downloading blobs.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information if an error occurs;
otherwiseresultwill contain the blob information.
responsewill 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)
-
Downloads a blob into a stream.
This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
writeStreamWritable The Node.js Writable stream.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description skipSizeCheckboolean <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.speedSummarySpeedSummary <optional>
The download tracker objects.
parallelOperationThreadCountint <optional>
The number of parallel operations that may be performed when uploading.
snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The lease identifier.
rangeStartstring <optional>
Return only the bytes of the blob in the specified range.
rangeEndstring <optional>
Return only the bytes of the blob in the specified range.
useTransactionalMD5boolean <optional>
When set to true, Calculate and send/validate content MD5 for transactions.
disableContentMD5Validationboolean <optional>
When set to true, MD5 validation will be disabled when downloading blobs.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information if an error occurs;
otherwiseresultwill contain the blob information.
responsewill contain information related to this operation.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 containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The lease identifier.
rangeStartstring <optional>
Return only the bytes of the blob in the specified range.
rangeEndstring <optional>
Return only the bytes of the blob in the specified range.
useTransactionalMD5bool <optional>
Calculate and send/validate content MD5 for transactions.
disableContentMD5Validationboolean <optional>
When set to true, MD5 validation will be disabled when downloading blobs.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackBlobService~blobToText errorwill contain information
if an error occurs; otherwisetextwill contain the blob contents,
andblockBlobwill contain
the blob information.
responsewill contain information related to this operation. -
getBlockId()
-
Get a block id according to prefix and block number
-
getContainerAcl(container [, options], callback)
-
Gets the container's ACL.
This:
Parameters:
Name Type Argument Description containerstring The container name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The container lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
information for the container.
responsewill contain information related to this operation. -
getContainerMetadata(container [, options], callback)
-
Returns all user-defined metadata for the container.
Note that all metadata names returned from the server will be converted to lower case by NodeJS itself as metadata is set via HTTP headers and HTTP header names are case insensitive.This:
Parameters:
Name Type Argument Description containerstring The container name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The container lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
information for the container.
responsewill contain information related to this operation. -
getContainerProperties(container [, options], callback)
-
Retrieves a container and its properties from a specified account.
Note that all metadata names returned from the server will be converted to lower case by NodeJS itself as metadata is set via HTTP headers and HTTP header names are case insensitive.This:
Parameters:
Name Type Argument Description containerstring The container name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.leaseIdstring <optional>
The container lease identifier.
timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
information for the container.
responsewill contain information related to this operation. -
getPageRangesDiff(container, blob, previousSnapshotTime [, options], callback)
-
Gets page ranges that have been updated or cleared since the snapshot specified by
previousSnapshotTimewas taken. Gets 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 containerstring The container name.
blobstring The blob name.
previousSnapshotTimestring The previous snapshot time for comparison. Must be prior to
options.snapshotIdif it's provided.optionsobject <optional>
The request options.
Properties
Name Type Argument Description accessConditionsAccessConditions <optional>
The access conditions.
rangeStartint <optional>
The range start.
rangeEndint <optional>
The range end.
snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The target blob lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the page ranges diff information, seeRangeDifffor detailed information.
responsewill contain information related to this operation. -
getServiceProperties( [options], callback)
-
Gets the properties of a storage account’s Blob service, including Azure Storage Analytics.
This:
Parameters:
Name Type Argument Description optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information if an error occurs; otherwise,resultwill contain the properties
andresponsewill contain information related to this operation. -
getServiceStats( [options], callback)
-
Gets the service stats for a storage account’s Blob service.
This:
Parameters:
Name Type Argument Description optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information if an error occurs; otherwise,resultwill contain the stats and
responsewill contain information related to this operation. -
getUrl(container [, blob] [, sasToken] [, primary] [, snapshotId])
-
Retrieves a blob or container URL.
Parameters:
Name Type Argument Description containerstring The container name.
blobstring <optional>
The blob name.
sasTokenstring <optional>
The Shared Access Signature token.
primaryboolean <optional>
A boolean representing whether to use the primary or the secondary endpoint.
snapshotIdstring <optional>
The snapshot identifier.
Returns:
The formatted URL string.
- Type
- string
Example
var azure = require('azure-storage'); var blobService = azure.createBlobService(); var sharedAccessPolicy = { AccessPolicy: { Permissions: azure.BlobUtilities.SharedAccessPermissions.READ, Start: startDate, Expiry: expiryDate }, }; var sasToken = blobService.generateSharedAccessSignature(containerName, blobName, sharedAccessPolicy); var sasUrl = blobService.getUrl(containerName, blobName, sasToken); -
listBlobDirectoriesSegmented(container, currentToken [, options], callback)
-
Lists a segment containing a collection of blob directory items in the container.
This:
Parameters:
Name Type Argument Description containerstring The container name.
currentTokenobject A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description maxResultsint <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)
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill containentriesandcontinuationToken.
entriesgives a list ofdirectoriesand thecontinuationTokenis used for the next listing operation.
responsewill contain information related to this operation. -
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 containerstring The container name.
prefixstring The prefix of the blob directory.
currentTokenobject A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description maxResultsint <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)
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill containentriesandcontinuationToken.
entriesgives a list ofdirectoriesand thecontinuationTokenis used for the next listing operation.
responsewill contain information related to this operation. -
listBlobsSegmented(container, currentToken [, options], callback)
-
Lists a segment containing a collection of blob items in the container.
This:
Parameters:
Name Type Argument Description containerstring The container name.
currentTokenobject A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description delimiterstring <optional>
Delimiter, i.e. '/', for specifying folder hierarchy.
maxResultsint <optional>
Specifies the maximum number of blobs to return per call to Azure ServiceClient. (maximum: 5000)
includestring <optional>
Specifies that the response should include one or more of the following subsets: '', 'metadata', 'snapshots', 'uncommittedblobs', 'copy', 'deleted').
Please find these values in BlobUtilities.BlobListingDetails. Multiple values can be added separated with a comma (,).
Note that all metadata names returned from the server will be converted to lower case by NodeJS itself as metadata is set via HTTP headers and HTTP header names are case insensitive.locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill containentriesandcontinuationToken.
entriesgives a list ofblobsand thecontinuationTokenis used for the next listing operation.
responsewill contain information related to this operation. -
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 containerstring The container name.
prefixstring The prefix of the blob name.
currentTokenobject A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description delimiterstring <optional>
Delimiter, i.e. '/', for specifying folder hierarchy.
maxResultsint <optional>
Specifies the maximum number of blobs to return per call to Azure ServiceClient. (maximum: 5000)
includestring <optional>
Specifies that the response should include one or more of the following subsets: '', 'metadata', 'snapshots', 'uncommittedblobs', 'copy', 'deleted').
Please find these values in BlobUtilities.BlobListingDetails. Multiple values can be added separated with a comma (,).
Note that all metadata names returned from the server will be converted to lower case by NodeJS itself as metadata is set via HTTP headers and HTTP header names are case insensitive.locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the entries ofblobsand the continuation token for the next listing operation.
responsewill contain information related to this operation. -
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 containerstring The container name.
blobstring The blob name.
blocklisttypeBlockListFilter The type of block list to retrieve.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description snapshotIdstring <optional>
The source blob snapshot identifier.
leaseIdstring <optional>
The target blob lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blocklist information.
responsewill contain information related to this operation. -
listContainersSegmented(currentToken [, options], callback)
-
Lists a segment containing a collection of container items under the specified account.
This:
Parameters:
Name Type Argument Description currentTokenobject A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.maxResultsint <optional>
Specifies the maximum number of containers to return per call to Azure storage.
includestring <optional>
Include this parameter to specify that the container's metadata be returned as part of the response body. (allowed values: '', 'metadata')
Note that all metadata names returned from the server will be converted to lower case by NodeJS itself as metadata is set via HTTP headers and HTTP header names are case insensitive.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill containentriesandcontinuationToken.
entriesgives a list ofcontainersand thecontinuationTokenis used for the next listing operation.
responsewill contain information related to this operation. -
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 prefixstring The prefix of the container name.
currentTokenobject A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.maxResultsint <optional>
Specifies the maximum number of containers to return per call to Azure storage.
includestring <optional>
Include this parameter to specify that the container's metadata be returned as part of the response body. (allowed values: '', 'metadata')
Note that all metadata names returned from the server will be converted to lower case by NodeJS itself as metadata is set via HTTP headers and HTTP header names are case insensitive.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill containentriesandcontinuationToken.
entriesgives a list ofcontainersand thecontinuationTokenis used for the next listing operation.
responsewill contain information related to this operation. -
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 containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description accessConditionsAccessConditions <optional>
The access conditions.
rangeStartint <optional>
The range start.
rangeEndint <optional>
The range end.
snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The target blob lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the page ranges information, seeRangefor detailed information.
responsewill contain information related to this operation. -
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 containerstring The container name.
blobstring The blob name.
leaseIdstring The lease identifier.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the lease information.
responsewill contain information related to this operation. -
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 containerstring The container name.
blobstring The blob name.
leaseIdstring The lease identifier. Must be a GUID.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the lease information.
responsewill contain information related to this operation. -
resizePageBlob(container, blob, size [, options], callback)
-
Resizes a page blob.
This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
sizeString The size of the page blob, in bytes.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The blob lease identifier.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the page information.
responsewill contain information related to this operation. -
setAccountServiceProperties(serviceProperties [, options], callback)
-
Sets the properties of a storage account’s 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 servicePropertiesobject The service properties.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise,response
will contain information related to this operation.- Inherited From:
- 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 containerstring The container name.
blobstring The blob name.
metadataobject The metadata key/value pairs.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description snapshotIdstring <optional>
The snapshot identifier.
leaseIdstring <optional>
The lease identifier.
accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
information on the blob.
responsewill contain information related to this operation. -
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 containerstring The container name.
blobstring The blob name.
propertiesobject <optional>
The blob properties to set.
Properties
Name Type Argument Description contentTypestring <optional>
The MIME content type of the blob. The default type is application/octet-stream.
contentEncodingstring <optional>
The content encodings that have been applied to the blob.
contentLanguagestring <optional>
The natural languages used by this resource.
cacheControlstring <optional>
The blob's cache control.
contentDispositionstring <optional>
The blob's content disposition.
contentMD5string <optional>
The blob's MD5 hash.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.accessConditionsAccessConditions <optional>
The access conditions.
timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
information about the blob.
responsewill contain information related to this operation. -
setBlobTier(container, blob, blobTier, callback)
-
Sets the tier of a blockblob under a blob storage account, or the tier of a pageblob under a premium storage account.
This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
blobTierstring Please see BlobUtilities.BlobTier.StandardBlobTier or BlobUtilities.BlobTier.PremiumPageBlobTier for possible values.
options.locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.options.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
options.clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
options.maximumExecutionTimeInMsint <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.options.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
options.useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise,response
will contain information related to this operation. -
setContainerAcl(container, signedIdentifiers [, options], callback)
-
Updates the container's ACL.
This:
Parameters:
Name Type Argument Description containerstring The container name.
signedIdentifiersObject.<string, AccessPolicy> The container ACL settings. See
AccessPolicyfor detailed information.optionsobject <optional>
The request options.
Properties
Name Type Argument Description accessConditionsAccessConditions <optional>
The access conditions.
publicAccessLevelstring <optional>
Specifies whether data in the container may be accessed publicly and the level of access.
leaseIdstring <optional>
The container lease identifier.
timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
information for the container.
responsewill contain information related to this operation. -
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 containerstring The container name.
metadataobject The metadata key/value pairs.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description leaseIdstring <optional>
The container lease identifier.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.accessConditionsAccessConditions <optional>
The access conditions.
timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise
responsewill contain information related to this operation. -
setPageBlobSequenceNumber(container, blob, sequenceNumberAction, sequenceNumber [, options], callback)
-
Sets the page blob's sequence number.
This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
sequenceNumberActionSequenceNumberAction A value indicating the operation to perform on the sequence number.
The allowed values are defined in azure.BlobUtilities.SequenceNumberAction.sequenceNumberstring 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.optionsobject <optional>
The request options.
Properties
Name Type Argument Description accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the page information.
responsewill contain information related to this operation. -
setProxy(proxy)
-
Sets proxy object specified by caller.
Parameters:
Name Type Description proxyobject proxy to use for tunneling
{
host: hostname
port: port number
proxyAuth: 'user:password' for basic auth
headers: {...} headers for proxy server
key: key for proxy server
ca: ca for proxy server
cert: cert for proxy server
}
if null or undefined, clears proxy- Inherited From:
- 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.
When you set blob service properties (such as enabling soft delete), it may take up to 30 seconds to take effect.This:
Parameters:
Name Type Argument Description servicePropertiesobject A
BlobServicePropertiesobject.optionsobject <optional>
The request options.
Properties
Name Type Argument Description locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs; otherwise,response
will contain information related to this operation. -
startCopyBlob(sourceUri, targetContainer, targetBlob [, options], callback)
-
Starts to copy a blob or an Azure Storage file to a destination blob.
For an asynchronous copy(by default), this operation returns a object including a copy ID which
you can use to check or abort the copy operation. The Blob service copies blobs on a best-effort basis.
The source blob for an asynchronous copy operation may be a block blob, an append blob,
a page blob or an Azure Storage file.Refer to https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob for more details.
This:
Parameters:
Name Type Argument Description sourceUristring The source blob URI.
targetContainerstring The target container name.
targetBlobstring The target blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description blobTierstring <optional>
For page blobs on premium accounts only. Set the tier of target blob. Refer to BlobUtilities.BlobTier.PremiumPageBlobTier.
isIncrementalCopyboolean <optional>
If it's incremental copy or not. Refer to https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/incremental-copy-blob
snapshotIdstring <optional>
The source blob snapshot identifier.
metadataobject <optional>
The target blob metadata key/value pairs.
leaseIdstring <optional>
The target blob lease identifier.
sourceLeaseIdstring <optional>
The source blob lease identifier.
accessConditionsAccessConditions <optional>
The access conditions.
sourceAccessConditionsAccessConditions <optional>
The source access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResult errorwill contain information
if an error occurs; otherwiseresultwill contain
the blob information.
responsewill contain information related to this operation. -
undeleteBlob(container, blob [, options], callback)
-
The undelete Blob operation restores the contents and metadata of soft deleted blob or snapshot.
Attempting to undelete a blob or snapshot that is not soft deleted will succeed without any changes.This:
Parameters:
Name Type Argument Description containerstring The container name.
blobstring The blob name.
optionsobject <optional>
The request options.
Properties
Name Type Argument Description accessConditionsAccessConditions <optional>
The access conditions.
locationModeLocationMode <optional>
Specifies the location mode used to decide which location the request should be sent to.
Please see StorageUtilities.LocationMode for the possible values.timeoutIntervalInMsint <optional>
The server timeout interval, in milliseconds, to use for the request.
clientRequestTimeoutInMsint <optional>
The timeout of client requests, in milliseconds, to use for the request.
maximumExecutionTimeInMsint <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.clientRequestIdstring <optional>
A string that represents the client request ID with a 1KB character limit.
useNagleAlgorithmbool <optional>
Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false.
The default value is false.callbackerrorOrResponse errorwill contain information
if an error occurs;responsewill contain information related to this operation. -
withFilter(filter)
-
Associate a filtering operation with this StorageServiceClient. Filtering operations
can include logging, automatically retrying, etc. Filter operations are objects
that implement a method with the signature:"function handle (requestOptions, next)".After doing its preprocessing on the request options, the method needs to call
"next" passing a callback with the following signature:
signature:"function (returnObject, finalCallback, next)"In this callback, and after processing the returnObject (the response from the
request to the server), the callback needs to either invoke next if it exists to
continue processing other filters or simply invoke finalCallback otherwise to end
up the service invocation.Parameters:
Name Type Description filterObject The new filter object.
- Inherited From:
- Source:
Returns:
A new service client with the filter applied.
- Type
- StorageServiceClient
Type Definitions
-
blobToText(error, text, blockBlob, response)
-
The callback for {BlobService~getBlobToText}.
Parameters:
Name Type Description errorobject If an error occurs, the error information.
textstring The text returned from the blob.
blockBlobobject Information about the blob.
responseobject Information related to this operation.