BlockBlob class
Class representing a BlockBlob.
Constructors
| Block |
Create a BlockBlob. |
Methods
| commit |
|
| commit |
The Commit Block List operation 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 Put Block operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then committing the new and existing blocks together. You can do this by specifying whether to commit a block from the committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the block, whichever list it may belong to. |
| commit |
|
| get |
|
| get |
The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob |
| get |
|
| stage |
|
| stage |
The Stage Block operation creates a new block to be committed as part of a blob |
| stage |
|
| stage |
|
| stage |
The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from a URL. |
| stage |
|
| upload(ms |
|
| upload(ms |
The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List operation. |
| upload(ms |
Constructor Details
BlockBlob(StorageClientContext)
Create a BlockBlob.
new BlockBlob(client: StorageClientContext)
Parameters
- client
- StorageClientContext
Reference to the service client.
Method Details
commitBlockList(BlockLookupList, BlockBlobCommitBlockListOptionalParams, ServiceCallback<void>)
function commitBlockList(blocks: BlockLookupList, options: BlockBlobCommitBlockListOptionalParams, callback: ServiceCallback<void>)
Parameters
- blocks
- BlockLookupList
The optional parameters
- callback
-
ServiceCallback<void>
The callback
commitBlockList(BlockLookupList, Models.BlockBlobCommitBlockListOptionalParams)
The Commit Block List operation 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 Put Block operation. You can call Put Block List to update a blob by uploading only those blocks that have changed, then committing the new and existing blocks together. You can do this by specifying whether to commit a block from the committed block list or from the uncommitted block list, or to commit the most recently uploaded version of the block, whichever list it may belong to.
function commitBlockList(blocks: BlockLookupList, options?: Models.BlockBlobCommitBlockListOptionalParams)
Parameters
- blocks
- BlockLookupList
- options
- Models.BlockBlobCommitBlockListOptionalParams
Returns
Promise<Models.BlockBlobCommitBlockListResponse>
Promise<Models.BlockBlobCommitBlockListResponse>
commitBlockList(BlockLookupList, ServiceCallback<void>)
function commitBlockList(blocks: BlockLookupList, callback: ServiceCallback<void>)
Parameters
- blocks
- BlockLookupList
- callback
-
ServiceCallback<void>
The callback
getBlockList(Models.BlockListType, BlockBlobGetBlockListOptionalParams, ServiceCallback<BlockList>)
function getBlockList(listType: Models.BlockListType, options: BlockBlobGetBlockListOptionalParams, callback: ServiceCallback<BlockList>)
Parameters
- listType
- Models.BlockListType
Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted', 'all'
The optional parameters
- callback
-
ServiceCallback<BlockList>
The callback
getBlockList(Models.BlockListType, Models.BlockBlobGetBlockListOptionalParams)
The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob
function getBlockList(listType: Models.BlockListType, options?: Models.BlockBlobGetBlockListOptionalParams)
Parameters
- listType
- Models.BlockListType
Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted', 'all'
- options
- Models.BlockBlobGetBlockListOptionalParams
Returns
Promise<Models.BlockBlobGetBlockListResponse>
Promise<Models.BlockBlobGetBlockListResponse>
getBlockList(Models.BlockListType, ServiceCallback<BlockList>)
function getBlockList(listType: Models.BlockListType, callback: ServiceCallback<BlockList>)
Parameters
- listType
- Models.BlockListType
Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted', 'all'
- callback
-
ServiceCallback<BlockList>
The callback
stageBlock(string, number, msRest.HttpRequestBody, BlockBlobStageBlockOptionalParams, ServiceCallback<void>)
function stageBlock(blockId: string, contentLength: number, body: msRest.HttpRequestBody, options: BlockBlobStageBlockOptionalParams, callback: ServiceCallback<void>)
Parameters
- blockId
-
string
A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter must be the same size for each block.
- contentLength
-
number
The length of the request.
- body
- msRest.HttpRequestBody
Initial data
The optional parameters
- callback
-
ServiceCallback<void>
The callback
stageBlock(string, number, msRest.HttpRequestBody, Models.BlockBlobStageBlockOptionalParams)
The Stage Block operation creates a new block to be committed as part of a blob
function stageBlock(blockId: string, contentLength: number, body: msRest.HttpRequestBody, options?: Models.BlockBlobStageBlockOptionalParams)
Parameters
- blockId
-
string
A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter must be the same size for each block.
- contentLength
-
number
The length of the request.
- body
- msRest.HttpRequestBody
Initial data
- options
- Models.BlockBlobStageBlockOptionalParams
Returns
Promise<Models.BlockBlobStageBlockResponse>
Promise<Models.BlockBlobStageBlockResponse>
stageBlock(string, number, msRest.HttpRequestBody, ServiceCallback<void>)
function stageBlock(blockId: string, contentLength: number, body: msRest.HttpRequestBody, callback: ServiceCallback<void>)
Parameters
- blockId
-
string
A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter must be the same size for each block.
- contentLength
-
number
The length of the request.
- body
- msRest.HttpRequestBody
Initial data
- callback
-
ServiceCallback<void>
The callback
stageBlockFromURL(string, number, string, BlockBlobStageBlockFromURLOptionalParams, ServiceCallback<void>)
function stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options: BlockBlobStageBlockFromURLOptionalParams, callback: ServiceCallback<void>)
Parameters
- blockId
-
string
A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter must be the same size for each block.
- contentLength
-
number
The length of the request.
- sourceUrl
-
string
Specify a URL to the copy source.
The optional parameters
- callback
-
ServiceCallback<void>
The callback
stageBlockFromURL(string, number, string, Models.BlockBlobStageBlockFromURLOptionalParams)
The Stage Block operation creates a new block to be committed as part of a blob where the contents are read from a URL.
function stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, options?: Models.BlockBlobStageBlockFromURLOptionalParams)
Parameters
- blockId
-
string
A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter must be the same size for each block.
- contentLength
-
number
The length of the request.
- sourceUrl
-
string
Specify a URL to the copy source.
- options
- Models.BlockBlobStageBlockFromURLOptionalParams
Returns
Promise<Models.BlockBlobStageBlockFromURLResponse>
Promise<Models.BlockBlobStageBlockFromURLResponse>
stageBlockFromURL(string, number, string, ServiceCallback<void>)
function stageBlockFromURL(blockId: string, contentLength: number, sourceUrl: string, callback: ServiceCallback<void>)
Parameters
- blockId
-
string
A valid Base64 string value that identifies the block. Prior to encoding, the string must be less than or equal to 64 bytes in size. For a given blob, the length of the value specified for the blockid parameter must be the same size for each block.
- contentLength
-
number
The length of the request.
- sourceUrl
-
string
Specify a URL to the copy source.
- callback
-
ServiceCallback<void>
The callback
upload(msRest.HttpRequestBody, number, BlockBlobUploadOptionalParams, ServiceCallback<void>)
function upload(body: msRest.HttpRequestBody, contentLength: number, options: BlockBlobUploadOptionalParams, callback: ServiceCallback<void>)
Parameters
- body
- msRest.HttpRequestBody
Initial data
- contentLength
-
number
The length of the request.
- options
- BlockBlobUploadOptionalParams
The optional parameters
- callback
-
ServiceCallback<void>
The callback
upload(msRest.HttpRequestBody, number, Models.BlockBlobUploadOptionalParams)
The Upload Block Blob operation updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List operation.
function upload(body: msRest.HttpRequestBody, contentLength: number, options?: Models.BlockBlobUploadOptionalParams)
Parameters
- body
- msRest.HttpRequestBody
Initial data
- contentLength
-
number
The length of the request.
- options
- Models.BlockBlobUploadOptionalParams
Returns
Promise<Models.BlockBlobUploadResponse>
Promise<Models.BlockBlobUploadResponse>
upload(msRest.HttpRequestBody, number, ServiceCallback<void>)
function upload(body: msRest.HttpRequestBody, contentLength: number, callback: ServiceCallback<void>)
Parameters
- body
- msRest.HttpRequestBody
Initial data
- contentLength
-
number
The length of the request.
- callback
-
ServiceCallback<void>
The callback