azure-storage-blob\src\Blob\BlobRestProxy.php

Show: PublicProtectedPrivateinherited
Table of Contents
LICENSE: The MIT License (the "License") you may not use this file except in compliance with the License.

You may obtain a copy of the License at https://github.com/azure/azure-storage-php/LICENSE

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

PHP version 5

Author
Azure Storage PHP SDK  
Category
Microsoft  
Copyright
2016 Microsoft Corporation  
License
https://github.com/azure/azure-storage-php/LICENSE  
Link
https://github.com/azure/azure-storage-php  
Package
MicrosoftAzure\Storage\Blob  

\MicrosoftAzure\Storage\Blob\BlobRestProxy

Package: MicrosoftAzure\Storage\Blob
This class constructs HTTP requests and receive HTTP responses for blob service layer.
Implements
Parent(s)
\MicrosoftAzure\Storage\Common\Internal\ServiceRestProxy
Author
Azure Storage PHP SDK  
Category
Microsoft  
Copyright
2016 Microsoft Corporation  
Inherited_from
\MicrosoftAzure\Storage\Common\Internal\ServiceRestProxy  
License
https://github.com/azure/azure-storage-php/LICENSE  
Link
https://github.com/azure/azure-storage-php  

Properties

>VPropertyprotected\MicrosoftAzure\Storage\Common\Internal\Serialization\ISerializer $dataSerializer
Details
Type
\MicrosoftAzure\Storage\Common\Internal\Serialization\ISerializer

Methods

methodpublic__construct(\MicrosoftAzure\Storage\Common\Internal\Serialization\ISerializer $dataSerializer = null) : void
inherited

Initializes new RestProxy object.

Inherited from:
Parameters
NameTypeDescription
$dataSerializer\MicrosoftAzure\Storage\Common\Internal\Serialization\ISerializer

The data serializer.

methodpublicabortCopy(string $container, string $blob, string $copyId, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : void

Abort a blob copy operation

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$copyIdstring

copy operation identifier.

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Details
See
 
methodpublicabortCopyAsync(string $container, string $blob, string $copyId, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to abort a blob copy operation

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$copyIdstring

copy operation identifier.

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicacquireLease(string $container, string $blob, string $proposedLeaseId = null, integer $leaseDuration = null, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\LeaseResult

Establishes an exclusive write lock on a blob. To write to a locked blob, a client must provide a lease ID.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$proposedLeaseIdstring

lease id when acquiring

$leaseDurationinteger

the lease duration. A non-infinite lease can be between 15 and 60 seconds. Default is never to expire.

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\LeaseResult
Details
See
 
methodpublicacquireLeaseAsync(string $container, string $blob, string $proposedLeaseId = null, integer $leaseDuration = null, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to establish an exclusive one-minute write lock on a blob.

To write to a locked blob, a client must provide a lease ID.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$proposedLeaseIdstring

lease id when acquiring

$leaseDurationinteger

the lease duration. A non-infinite lease can be between 15 and 60 seconds. Default is never to expire.

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodprotectedaddMetadataHeaders(array $headers, array $metadata = null) : array
inherited

Adds metadata elements to headers array

Inherited from:
Parameters
NameTypeDescription
$headersarray

HTTP request headers

$metadataarray

user specified metadata

Returns
TypeDescription
array
methodpublicaddOptionalAccessConditionHeader(array $headers,  $accessConditions = null) : array

Adds optional header to headers if set

Parameters
NameTypeDescription
$headersarray

The array of request headers.

$accessConditions
Returns
TypeDescription
array
methodprotectedaddOptionalHeader(array $headers, string $key, string $value) : void
inherited

Adds optional header.

Inherited from:

Doesn't add the value if it satisfies empty().

Parameters
NameTypeDescription
$headersarray

&$headers The HTTP header parameters.

$keystring

The HTTP header name.

$valuestring

The HTTP header value.

methodprotectedaddOptionalQueryParam(array $queryParameters, string $key, string $value) : void
inherited

Adds optional query parameter.

Inherited from:

Doesn't add the value if it satisfies empty().

Parameters
NameTypeDescription
$queryParametersarray

&$queryParameters The query parameters.

$keystring

The query variable name.

$valuestring

The query variable value.

methodpublicaddOptionalSourceAccessConditionHeader(array $headers,  $accessConditions = null) : array

Adds optional header to headers if set

Parameters
NameTypeDescription
$headersarray

The array of request headers.

$accessConditions
Returns
TypeDescription
array
methodpublicaddPostParameter(array $postParameters, string $key, string $value) : array
inherited

Adds HTTP POST parameter to the specified

Inherited from:
Parameters
NameTypeDescription
$postParametersarray

An array of HTTP POST parameters.

$keystring

The key of a HTTP POST parameter.

$valuestring

the value of a HTTP POST parameter.

Returns
TypeDescription
array
methodpublicappendBlock(string $container, string $blob, resource | string | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\AppendBlockOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\AppendBlockResult

Commits a new block of data to the end of an existing append blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$contentresource | string | \Psr\Http\Message\StreamInterface

the blob block contents

$options\MicrosoftAzure\Storage\Blob\Models\AppendBlockOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\AppendBlockResult
Details
See
 
methodpublicappendBlockAsync(string $container, string $blob, resource | string | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\AppendBlockOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to commit a new block of data to the end of an existing append blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$contentresource | string | \Psr\Http\Message\StreamInterface

the blob block contents

$options\MicrosoftAzure\Storage\Blob\Models\AppendBlockOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicbreakLease(string $container, string $blob, integer $breakPeriod = null, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\BreakLeaseResult

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

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$breakPeriodinteger

the proposed duration of seconds that lease should continue before it it broken, between 0 and 60 seconds.

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\BreakLeaseResult
Details
See
 
methodpublicbreakLeaseAsync(string $container, string $blob, integer $breakPeriod = null, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to end the lease but ensure that another client cannot acquire a new lease until the current lease period has expired.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$breakPeriodinteger

break period, in seconds

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicchangeLease(string $container, string $blob, string $leaseId, string $proposedLeaseId, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\LeaseResult

change an existing lease

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$leaseIdstring

lease id when acquiring

$proposedLeaseIdstring

lease id when acquiring

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\LeaseResult
Details
See
 
methodpublicchangeLeaseAsync(string $container, string $blob, string $leaseId, string $proposedLeaseId, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to change an existing lease

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$leaseIdstring

lease id when acquiring

$proposedLeaseIdstring

the proposed lease id

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicclearBlobPages(string $container, string $blob, \MicrosoftAzure\Storage\Common\Models\Range $range, \MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesResult

Clears a range of pages from the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$range\MicrosoftAzure\Storage\Common\Models\Range

Can be up to the value of the blob's full size. Note that ranges must be aligned to 512 (0-511, 512-1023)

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesResult
Details
See
 
methodpublicclearBlobPagesAsync(string $container, string $blob, \MicrosoftAzure\Storage\Common\Models\Range $range, \MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to clear a range of pages from the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$range\MicrosoftAzure\Storage\Common\Models\Range

Can be up to the value of the blob's full size. Note that ranges must be aligned to 512 (0-511, 512-1023)

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliccommitBlobBlocks(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\BlockList | array<mixed,\MicrosoftAzure\Storage\Blob\Models\Block> $blockList, \MicrosoftAzure\Storage\Blob\Models\CommitBlobBlocksOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\PutBlobResult

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

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.

Parameters
NameTypeDescription
$containerstring

The container name.

$blobstring

The blob name.

$blockList\MicrosoftAzure\Storage\Blob\Models\BlockList | array<mixed,\MicrosoftAzure\Storage\Blob\Models\Block>

The block entries.

$options\MicrosoftAzure\Storage\Blob\Models\CommitBlobBlocksOptions

The optional parameters.

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\PutBlobResult
Details
See
 
methodpubliccommitBlobBlocksAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\BlockList | array<mixed,\MicrosoftAzure\Storage\Blob\Models\Block> $blockList, \MicrosoftAzure\Storage\Blob\Models\CommitBlobBlocksOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

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

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.

Parameters
NameTypeDescription
$containerstring

The container name.

$blobstring

The blob name.

$blockList\MicrosoftAzure\Storage\Blob\Models\BlockList | array<mixed,\MicrosoftAzure\Storage\Blob\Models\Block>

The block entries.

$options\MicrosoftAzure\Storage\Blob\Models\CommitBlobBlocksOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliccopyBlob(string $destinationContainer, string $destinationBlob, string $sourceContainer, string $sourceBlob, \MicrosoftAzure\Storage\Blob\Models\CopyBlobOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\CopyBlobResult

Copies a source blob to a destination blob within the same storage account.

Parameters
NameTypeDescription
$destinationContainerstring

name of the destination container

$destinationBlobstring

name of the destination blob

$sourceContainerstring

name of the source container

$sourceBlobstring

name of the source blob

$options\MicrosoftAzure\Storage\Blob\Models\CopyBlobOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\CopyBlobResult
Details
See
 
methodpubliccopyBlobAsync(string $destinationContainer, string $destinationBlob, string $sourceContainer, string $sourceBlob, \MicrosoftAzure\Storage\Blob\Models\CopyBlobOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to copy a source blob to a destination blob within the same storage account.

Parameters
NameTypeDescription
$destinationContainerstring

name of the destination container

$destinationBlobstring

name of the destination blob

$sourceContainerstring

name of the source container

$sourceBlobstring

name of the source blob

$options\MicrosoftAzure\Storage\Blob\Models\CopyBlobOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliccopyBlobFromURL(string $destinationContainer, string $destinationBlob, string $sourceURL, \MicrosoftAzure\Storage\Blob\Models\CopyBlobFromURLOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\CopyBlobResult

Copies from a source URL to a destination blob.

Parameters
NameTypeDescription
$destinationContainerstring

name of the destination container

$destinationBlobstring

name of the destination blob

$sourceURLstring

URL of the source resource

$options\MicrosoftAzure\Storage\Blob\Models\CopyBlobFromURLOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\CopyBlobResult
Details
See
 
methodpubliccopyBlobFromURLAsync(string $destinationContainer, string $destinationBlob, string $sourceURL, \MicrosoftAzure\Storage\Blob\Models\CopyBlobFromURLOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to copy from source URL to a destination blob.

Parameters
NameTypeDescription
$destinationContainerstring

name of the destination container

$destinationBlobstring

name of the destination blob

$sourceURLstring

URL of the source resource

$options\MicrosoftAzure\Storage\Blob\Models\CopyBlobFromURLOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliccreateAppendBlob(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\CreateBlobOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\PutBlobResult

Create a new append blob.

If the blob already exists on the service, it will be overwritten.

Parameters
NameTypeDescription
$containerstring

The container name.

$blobstring

The blob name.

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobOptions

The optional parameters.

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\PutBlobResult
Details
See
 
methodpubliccreateAppendBlobAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\CreateBlobOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to create a new append blob.

If the blob already exists on the service, it will be overwritten.

Parameters
NameTypeDescription
$containerstring

The container name.

$blobstring

The blob name.

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliccreateBlobBlock(string $container, string $blob, string $blockId, resource | string | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\CreateBlobBlockOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\PutBlockResult

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

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$blockIdstring

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.

$contentresource | string | \Psr\Http\Message\StreamInterface

the blob block contents

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobBlockOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\PutBlockResult
Details
See
 
methodpubliccreateBlobBlockAsync(string $container, string $blob, string $blockId, resource | string | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\CreateBlobBlockOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

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

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$blockIdstring

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.

$contentresource | string | \Psr\Http\Message\StreamInterface

the blob block contents

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobBlockOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodprotectedcreateBlobBlockHeader(\MicrosoftAzure\Storage\Blob\Models\CreateBlobBlockOptions $options = null) : array

create the header for createBlobBlock(s)

Parameters
NameTypeDescription
$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobBlockOptions

the option of the request

Returns
TypeDescription
array
methodprotectedcreateBlobBlockQueryParams(\MicrosoftAzure\Storage\Blob\Models\CreateBlobBlockOptions $options, string $blockId, boolean $isConcurrent = false) : array

create the query params for createBlobBlock(s)

Parameters
NameTypeDescription
$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobBlockOptions

the option of the request

$blockIdstring

the block id of the block.

$isConcurrentboolean

if the query parameter is for concurrent upload.

Returns
TypeDescription
arraythe constructed query parameters.
methodpubliccreateBlobPages(string $container, string $blob, \MicrosoftAzure\Storage\Common\Models\Range $range, string | resource | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesResult

Creates a range of pages to a page blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$range\MicrosoftAzure\Storage\Common\Models\Range

Can be up to 4 MB in size. Note that ranges must be aligned to 512 (0-511, 512-1023)

$contentstring | resource | \Psr\Http\Message\StreamInterface

the blob contents.

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesResult
Details
See
 
methodpubliccreateBlobPagesAsync(string $container, string $blob, \MicrosoftAzure\Storage\Common\Models\Range $range, string | resource | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to create a range of pages to a page blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$range\MicrosoftAzure\Storage\Common\Models\Range

Can be up to 4 MB in size. Note that ranges must be aligned to 512 (0-511, 512-1023)

$contentstring | resource | \Psr\Http\Message\StreamInterface

the blob contents.

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobPagesOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliccreateBlobService(string $connectionString, array $options = array()) : \MicrosoftAzure\Storage\Blob\BlobRestProxy
static

Builds a blob service object, it accepts the following options:

  • http: (array) the underlying guzzle options. refer to http://docs.guzzlephp.org/en/latest/request-options.html for detailed available options
  • middlewares: (mixed) the middleware should be either an instance of a sub-class that implements \MicrosoftAzure\Storage\Blob\MicrosoftAzure\Storage\Common\Middlewares\IMiddleware, or a callable that follows the Guzzle middleware implementation convention

Please refer to https://azure.microsoft.com/en-us/documentation/articles/storage-configure-connection-string for how to construct a connection string with storage account name/key, or with a shared access signature (SAS Token).

Parameters
NameTypeDescription
$connectionStringstring

The configuration connection string.

$optionsarray

Array of options to pass to the service

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\BlobRestProxy
methodpubliccreateBlobServiceWithTokenCredential(string $token, string $connectionString, array $options = array()) : \MicrosoftAzure\Storage\Blob\BlobRestProxy
static

Builds a blob service object, it accepts the following options:

  • http: (array) the underlying guzzle options. refer to http://docs.guzzlephp.org/en/latest/request-options.html for detailed available options
  • middlewares: (mixed) the middleware should be either an instance of a sub-class that implements \MicrosoftAzure\Storage\Blob\MicrosoftAzure\Storage\Common\Middlewares\IMiddleware, or a callable that follows the Guzzle middleware implementation convention

Please refer to https://docs.microsoft.com/en-us/azure/storage/common/storage-auth-aad for authenticate access to Azure blobs and queues using Azure Active Directory.

Parameters
NameTypeDescription
$tokenstring

The bearer token passed as reference.

$connectionStringstring

The configuration connection string.

$optionsarray

Array of options to pass to the service

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\BlobRestProxy
methodpubliccreateBlobSnapshot(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\CreateBlobSnapshotOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\CreateBlobSnapshotResult

Creates a snapshot of a blob.

Parameters
NameTypeDescription
$containerstring

The name of the container.

$blobstring

The name of the blob.

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobSnapshotOptions

The optional parameters.

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\CreateBlobSnapshotResult
Details
See
 
methodpubliccreateBlobSnapshotAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\CreateBlobSnapshotOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to create a snapshot of a blob.

Parameters
NameTypeDescription
$containerstring

The name of the container.

$blobstring

The name of the blob.

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobSnapshotOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliccreateBlockBlob(string $container, string $blob, string | resource | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\CreateBlockBlobOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\PutBlobResult

Creates a new block blob or updates the content of an existing block blob.

Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with createBlockBlob 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 createBlockList method. Note that the default content type is application/octet-stream.

Parameters
NameTypeDescription
$containerstring

The name of the container.

$blobstring

The name of the blob.

$contentstring | resource | \Psr\Http\Message\StreamInterface

The content of the blob.

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlockBlobOptions

The optional parameters.

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\PutBlobResult
Details
See
 
methodpubliccreateBlockBlobAsync(string $container, string $blob, string | resource | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\CreateBlockBlobOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates a promise to create a new block blob or updates the content of an existing block blob.

Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with createBlockBlob 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 createBlockList method.

Parameters
NameTypeDescription
$containerstring

The name of the container.

$blobstring

The name of the blob.

$contentstring | resource | \Psr\Http\Message\StreamInterface

The content of the blob.

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlockBlobOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodprotectedcreateBlockBlobByMultipleUploadAsync(string $container, string $blob, \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\CreateBlockBlobOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

This method creates the blob blocks. This method will send the request concurrently for better performance.

Parameters
NameTypeDescription
$containerstring

Name of the container

$blobstring

Name of the blob

$content\Psr\Http\Message\StreamInterface

Content's stream

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlockBlobOptions

Array that contains all the option

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
methodprotectedcreateBlockBlobBySingleUploadAsync(string $container, string $blob, \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\CreateBlobOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to create a new block blob or updates the content of an existing block blob. This only supports contents smaller than single upload threashold.

Updating an existing block blob overwrites any existing metadata on the blob.

Parameters
NameTypeDescription
$containerstring

The name of the container.

$blobstring

The name of the blob.

$content\Psr\Http\Message\StreamInterface

The content of the blob.

$options\MicrosoftAzure\Storage\Blob\Models\CreateBlobOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliccreateContainer(string $container, \MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions $options = null) : void

Creates a new container in the given storage account.

Parameters
NameTypeDescription
$containerstring

The container name.

$options\MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions

The optional parameters.

Details
See
 
methodpubliccreateContainerAnonymousAccess(string $primaryServiceEndpoint, array $options = array()) : \MicrosoftAzure\Storage\Blob\BlobRestProxy
static

Builds an anonymous access object with given primary service endpoint. The service endpoint should contain a scheme and a host, e.g.: http://mystorageaccount.blob.core.windows.net

Parameters
NameTypeDescription
$primaryServiceEndpointstring

Primary service endpoint.

$optionsarray

Optional request options.

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\BlobRestProxy
methodpubliccreateContainerAsync(string $container, \MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates a new container in the given storage account.

Parameters
NameTypeDescription
$containerstring

The container name.

$options\MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodprotectedcreateMiddlewareStack(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $serviceOptions) : \MicrosoftAzure\Storage\Common\Middlewares\MiddlewareStack
inherited

Create a middleware stack with given middleware.

Inherited from:
Parameters
NameTypeDescription
$serviceOptions\MicrosoftAzure\Storage\Common\Models\ServiceOptions

The options user passed in.

Returns
TypeDescription
\MicrosoftAzure\Storage\Common\Middlewares\MiddlewareStack
methodpubliccreatePageBlob(string $container, string $blob, integer $length, \MicrosoftAzure\Storage\Blob\Models\CreatePageBlobOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\PutBlobResult

Creates a new page blob. Note that calling createPageBlob to create a page blob only initializes the blob.

To add content to a page blob, call createBlobPages method.

Parameters
NameTypeDescription
$containerstring

The container name.

$blobstring

The blob name.

$lengthinteger

Specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary.

$options\MicrosoftAzure\Storage\Blob\Models\CreatePageBlobOptions

The optional parameters.

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\PutBlobResult
Details
See
 
methodpubliccreatePageBlobAsync(string $container, string $blob, integer $length, \MicrosoftAzure\Storage\Blob\Models\CreatePageBlobOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to create a new page blob. Note that calling createPageBlob to create a page blob only initializes the blob.

To add content to a page blob, call createBlobPages method.

Parameters
NameTypeDescription
$containerstring

The container name.

$blobstring

The blob name.

$lengthinteger

Specifies the maximum size for the page blob, up to 1 TB. The page blob size must be aligned to a 512-byte boundary.

$options\MicrosoftAzure\Storage\Blob\Models\CreatePageBlobOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliccreatePageBlobFromContent(string $container, string $blob, integer $length, string | resource | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\CreatePageBlobFromContentOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\GetBlobPropertiesResult

Create a new page blob and upload the content to the page blob.

Parameters
NameTypeDescription
$containerstring

The name of the container.

$blobstring

The name of the blob.

$lengthinteger

The length of the blob.

$contentstring | resource | \Psr\Http\Message\StreamInterface

The content of the blob.

$options\MicrosoftAzure\Storage\Blob\Models\CreatePageBlobFromContentOptions

The optional parameters.

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\GetBlobPropertiesResult
Details
See
 
methodpubliccreatePageBlobFromContentAsync(string $container, string $blob, integer $length, string | resource | \Psr\Http\Message\StreamInterface $content, \MicrosoftAzure\Storage\Blob\Models\CreatePageBlobFromContentOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates a promise to create a new page blob and upload the content to the page blob.

Parameters
NameTypeDescription
$containerstring

The name of the container.

$blobstring

The name of the blob.

$lengthinteger

The length of the blob.

$contentstring | resource | \Psr\Http\Message\StreamInterface

The content of the blob.

$options\MicrosoftAzure\Storage\Blob\Models\CreatePageBlobFromContentOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodprotectedcreateRequest(string $method, array $headers, array $queryParams, array $postParameters, string $path,  $locationMode, string $body = \MicrosoftAzure\Storage\Common\Internal\Resources::EMPTY_STRING) : \GuzzleHttp\Psr7\Request
inherited

Create the request to be sent.

Inherited from:
Parameters
NameTypeDescription
$methodstring

The method of the HTTP request

$headersarray

The header field of the request

$queryParamsarray

The query parameter of the request

$postParametersarray

The HTTP POST parameters

$pathstring

URL path

$locationMode
$bodystring

Request body

Returns
TypeDescription
\GuzzleHttp\Psr7\Request
methodpublicdeleteBlob(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\DeleteBlobOptions $options = null) : void

Deletes a blob or blob snapshot.

Note that if the snapshot entry is specified in the $options then only this blob snapshot is deleted. To delete all blob snapshots, do not set Snapshot and just set getDeleteSnaphotsOnly to true.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\DeleteBlobOptions

optional parameters

Details
See
 
methodpublicdeleteBlobAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\DeleteBlobOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to delete a blob or blob snapshot.

Note that if the snapshot entry is specified in the $options then only this blob snapshot is deleted. To delete all blob snapshots, do not set Snapshot and just set getDeleteSnaphotsOnly to true.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\DeleteBlobOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicdeleteContainer(string $container, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : void

Deletes a container in the given storage account.

Parameters
NameTypeDescription
$containerstring

The container name.

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

The optional parameters.

Details
See
 
methodpublicdeleteContainerAsync(string $container, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterface

Create a promise for deleting a container.

Parameters
NameTypeDescription
$containerstring

name of the container

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions | null

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
methodpublicgenerateMetadataHeaders(array $metadata = null) : array
inherited

Generates metadata headers by prefixing each element with 'x-ms-meta'.

Inherited from:
Parameters
NameTypeDescription
$metadataarray

user defined metadata.

Returns
TypeDescription
array
methodprotectedgenerateRequestOptions(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $serviceOptions, callable $handler) : array
inherited

Generate the request options using the given service options and stored information.

Inherited from:
Parameters
NameTypeDescription
$serviceOptions\MicrosoftAzure\Storage\Common\Models\ServiceOptions

The service options used to generate request options.

$handlercallable

The handler used to send the request.

Returns
TypeDescription
array
methodpublicgetAccountName() : string
inherited

Gets the account name.

Inherited from:
Returns
TypeDescription
string
methodpublicgetBlob(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\GetBlobOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\GetBlobResult

Reads or downloads a blob from the system, including its metadata and properties.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\GetBlobOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\GetBlobResult
Details
See
 
methodpublicgetBlobAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\GetBlobOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to read or download a blob from the system, including its metadata and properties.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\GetBlobOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicgetBlobMetadata(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\GetBlobMetadataOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\GetBlobMetadataResult

Returns all properties and metadata on the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\GetBlobMetadataOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\GetBlobMetadataResult
Details
See
 
methodpublicgetBlobMetadataAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\GetBlobMetadataOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to return all properties and metadata on the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\GetBlobMetadataOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicgetBlobProperties(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\GetBlobPropertiesOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\GetBlobPropertiesResult

Returns all properties and metadata on the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\GetBlobPropertiesOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\GetBlobPropertiesResult
Details
See
 
methodpublicgetBlobPropertiesAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\GetBlobPropertiesOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to return all properties and metadata on the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\GetBlobPropertiesOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicgetBlobUrl(string $container, string $blob) : string

Creates full URI to the given blob.

Parameters
NameTypeDescription
$containerstring

The container name.

$blobstring

The blob name.

Returns
TypeDescription
string
methodpublicgetBlockSize() : integer

Get the value for blockSize

Returns
TypeDescription
integer
methodpublicgetContainerAcl(string $container, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\GetContainerACLResult

Gets the access control list (ACL) and any container-level access policies for the container.

Parameters
NameTypeDescription
$containerstring

The container name.

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

The optional parameters.

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\GetContainerACLResult
Details
See
 
methodpublicgetContainerAclAsync(string $container, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates the promise to get the access control list (ACL) and any container-level access policies for the container.

Parameters
NameTypeDescription
$containerstring

The container name.

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicgetContainerMetadata(string $container, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\GetContainerPropertiesResult

Returns only user-defined metadata for the specified container.

Parameters
NameTypeDescription
$containerstring

name

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\GetContainerPropertiesResult
Details
See
 
methodpublicgetContainerMetadataAsync(string $container, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Create promise to return only user-defined metadata for the specified container.

Parameters
NameTypeDescription
$containerstring

name

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicgetContainerProperties(string $container, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\GetContainerPropertiesResult

Returns all properties and metadata on the container.

Parameters
NameTypeDescription
$containerstring

name

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\GetContainerPropertiesResult
Details
See
 
methodpublicgetContainerPropertiesAsync(string $container, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Create promise to return all properties and metadata on the container.

Parameters
NameTypeDescription
$containerstring

name

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicgetMiddlewares() : array
inherited

Gets middlewares that will be handling the request and response.

Inherited from:
Returns
TypeDescription
array
methodpublicgetPsrPrimaryUri() : \GuzzleHttp\Psr7\Uri
inherited

Get the primary URI in PSR form.

Inherited from:
Returns
TypeDescription
\GuzzleHttp\Psr7\Uri
methodpublicgetPsrSecondaryUri() : \GuzzleHttp\Psr7\Uri
inherited

Get the secondary URI in PSR form.

Inherited from:
Returns
TypeDescription
\GuzzleHttp\Psr7\Uri
methodpublicgetServiceProperties(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : \MicrosoftAzure\Storage\Common\Models\GetServicePropertiesResult
inherited

Gets the properties of the service.

Inherited from:
Parameters
NameTypeDescription
$options\MicrosoftAzure\Storage\Common\Models\ServiceOptions

The optional parameters.

Returns
TypeDescription
\MicrosoftAzure\Storage\Common\Models\GetServicePropertiesResult
Details
See
 
methodpublicgetServicePropertiesAsync(\MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
inherited

Creates promise to get the properties of the service.

Inherited from:
Parameters
NameTypeDescription
$options\MicrosoftAzure\Storage\Common\Models\ServiceOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicgetServiceStats(\MicrosoftAzure\Storage\Common\Models\ServiceOptions | null $options = null) : \MicrosoftAzure\Storage\Common\Models\GetServiceStatsResult
inherited

Retrieves statistics related to replication for the service. The operation will only be sent to secondary location endpoint.

Inherited from:
Parameters
NameTypeDescription
$options\MicrosoftAzure\Storage\Common\Models\ServiceOptions | null

The options this operation sends with.

Returns
TypeDescription
\MicrosoftAzure\Storage\Common\Models\GetServiceStatsResult
methodpublicgetServiceStatsAsync(\MicrosoftAzure\Storage\Common\Models\ServiceOptions | null $options = null) : \GuzzleHttp\Promise\PromiseInterface
inherited

Creates promise that retrieves statistics related to replication for the service. The operation will only be sent to secondary location endpoint.

Inherited from:
Parameters
NameTypeDescription
$options\MicrosoftAzure\Storage\Common\Models\ServiceOptions | null

The options this operation sends with.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
methodpublicgetSingleBlobUploadThresholdInBytes() : integer

Get the value for SingleBlobUploadThresholdInBytes

Returns
TypeDescription
integer
methodpublicgroupQueryValues(array $values) : string
staticinherited

Groups set of values into one value separated with Resources::SEPARATOR

Inherited from:
Parameters
NameTypeDescription
$valuesarray

array of values to be grouped.

Returns
TypeDescription
string
methodpubliclistBlobBlocks(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\ListBlobBlocksOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\ListBlobBlocksResult

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

There are two block lists maintained for a blob: 1) Committed Block List: The list of blocks that have been successfully committed to a given blob with commitBlobBlocks. 2) Uncommitted Block List: The list of blocks that have been uploaded for a blob using Put Block (REST API), but that have not yet been committed. These blocks are stored in Windows Azure in association with a blob, but do not yet form part of the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\ListBlobBlocksOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\ListBlobBlocksResult
Details
See
 
methodpubliclistBlobBlocksAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\ListBlobBlocksOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to retrieve the list of blocks that have been uploaded as part of a block blob.

There are two block lists maintained for a blob: 1) Committed Block List: The list of blocks that have been successfully committed to a given blob with commitBlobBlocks. 2) Uncommitted Block List: The list of blocks that have been uploaded for a blob using Put Block (REST API), but that have not yet been committed. These blocks are stored in Windows Azure in association with a blob, but do not yet form part of the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\ListBlobBlocksOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliclistBlobs(string $container, \MicrosoftAzure\Storage\Blob\Models\ListBlobsOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\ListBlobsResult

Lists all of the blobs in the given container.

Parameters
NameTypeDescription
$containerstring

The container name.

$options\MicrosoftAzure\Storage\Blob\Models\ListBlobsOptions

The optional parameters.

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\ListBlobsResult
Details
See
 
methodpubliclistBlobsAsync(string $container, \MicrosoftAzure\Storage\Blob\Models\ListBlobsOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to list all of the blobs in the given container.

Parameters
NameTypeDescription
$containerstring

The container name.

$options\MicrosoftAzure\Storage\Blob\Models\ListBlobsOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliclistContainers(\MicrosoftAzure\Storage\Blob\Models\ListContainersOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\ListContainersResult

Lists all of the containers in the given storage account.

Parameters
NameTypeDescription
$options\MicrosoftAzure\Storage\Blob\Models\ListContainersOptions

The optional parameters.

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\ListContainersResult
Details
See
 
methodpubliclistContainersAsync(\MicrosoftAzure\Storage\Blob\Models\ListContainersOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Create a promise for lists all of the containers in the given storage account.

Parameters
NameTypeDescription
$options\MicrosoftAzure\Storage\Blob\Models\ListContainersOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
methodpubliclistPageBlobRanges(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesResult

Returns a list of active page ranges for a page blob. Active page ranges are those that have been populated with data.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesResult
Details
See
 
methodpubliclistPageBlobRangesAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to return a list of active page ranges for a page blob.

Active page ranges are those that have been populated with data.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpubliclistPageBlobRangesDiff(string $container, string $blob, string $previousSnapshotTime, \MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesDiffResult

Returns a list of page ranges that have been updated or cleared.

Returns a list of page ranges that have been updated or cleared since the snapshot specified by previousSnapshotTime. Gets all of the page ranges by default, or only the page ranges over a specific range of bytes if rangeStart and rangeEnd in the options are specified.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$previousSnapshotTimestring

previous snapshot time for comparison which should be prior to the snapshot time defined in options

$options\MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesDiffResult
Details
See
 
methodpubliclistPageBlobRangesDiffAsync(string $container, string $blob, string $previousSnapshotTime, \MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to return a list of page ranges that have been updated or cleared.

Creates promise to return a list of page ranges that have been updated or cleared since the snapshot specified by previousSnapshotTime. Gets all of the page ranges by default, or only the page ranges over a specific range of bytes if rangeStart and rangeEnd in the options are specified.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$previousSnapshotTimestring

previous snapshot time for comparison which should be prior to the snapshot time defined in options

$options\MicrosoftAzure\Storage\Blob\Models\ListPageBlobRangesOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodprotectedonRejected(string | \Exception $reason, array | integer $expected) : \Psr\Http\Message\ResponseInterface
inherited

Inherited from:
Parameters
NameTypeDescription
$reasonstring | \Exception

Rejection reason.

$expectedarray | integer

Expected Status Codes.

Returns
TypeDescription
\Psr\Http\Message\ResponseInterface
methodpublicpushMiddleware(callable | \MicrosoftAzure\Storage\Common\Internal\IMiddleware $middleware) : void
inherited

Push a new middleware into the middlewares array. The newly added middleware will be the most inner middleware when executed.

Inherited from:
Parameters
NameTypeDescription
$middlewarecallable | \MicrosoftAzure\Storage\Common\Internal\IMiddleware

the middleware to be added.

methodpublicreleaseLease(string $container, string $blob, string $leaseId, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : void

Frees the lease if it is no longer needed so that another client may immediately acquire a lease against the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$leaseIdstring

lease id when acquiring

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Details
See
 
methodpublicreleaseLeaseAsync(string $container, string $blob, string $leaseId, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to free the lease if it is no longer needed so that another client may immediately acquire a lease against the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$leaseIdstring

lease id when acquiring

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicrenewLease(string $container, string $blob, string $leaseId, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\LeaseResult

Renews an existing lease

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$leaseIdstring

lease id when acquiring

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\LeaseResult
Details
See
 
methodpublicrenewLeaseAsync(string $container, string $blob, string $leaseId, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to renew an existing lease

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$leaseIdstring

lease id when acquiring

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicsaveBlobToFile(string $path, string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\GetBlobOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\GetBlobResult

Downloads a blob to a file, the result contains its metadata and properties. The result will not contain a stream pointing to the content of the file.

Parameters
NameTypeDescription
$pathstring

The path and name of the file

$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\GetBlobOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\GetBlobResult
Details
See
 
methodpublicsaveBlobToFileAsync(string $path, string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\GetBlobOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to download a blob to a file, the result contains its metadata and properties. The result will not contain a stream pointing to the content of the file.

Parameters
NameTypeDescription
$pathstring

The path and name of the file

$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\GetBlobOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Throws
ExceptionDescription
\Exception
Details
See
 
methodprotectedsendAsync(string $method, array $headers, array $queryParams, array $postParameters, string $path, array | integer $expected = \MicrosoftAzure\Storage\Common\Internal\Resources::STATUS_OK, string $body = \MicrosoftAzure\Storage\Common\Internal\Resources::EMPTY_STRING, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $serviceOptions = null) : \GuzzleHttp\Promise\PromiseInterface
inherited

Create promise of sending HTTP request with the specified parameters.

Inherited from:
Parameters
NameTypeDescription
$methodstring

HTTP method used in the request

$headersarray

HTTP headers.

$queryParamsarray

URL query parameters.

$postParametersarray

The HTTP POST parameters.

$pathstring

URL path

$expectedarray | integer

Expected Status Codes.

$bodystring

Request body

$serviceOptions\MicrosoftAzure\Storage\Common\Models\ServiceOptions

Service options

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
methodprotectedsendConcurrentAsync(callable $generator, integer $statusCode, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $options) : \GuzzleHttp\Promise\Promise | \GuzzleHttp\Promise\PromiseInterface
inherited

Send the requests concurrently. Number of concurrency can be modified by inserting a new key/value pair with the key 'number_of_concurrency' into the $requestOptions of $serviceOptions. Return only the promise.

Inherited from:
Parameters
NameTypeDescription
$generatorcallable

the generator function to generate request upon fulfillment

$statusCodeinteger

The expected status code for each of the request generated by generator.

$options\MicrosoftAzure\Storage\Common\Models\ServiceOptions

The service options for the concurrent requests.

Returns
TypeDescription
\GuzzleHttp\Promise\Promise | \GuzzleHttp\Promise\PromiseInterface
methodprotectedsendContext(\MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext $context) : \GuzzleHttp\Psr7\Response
inherited

Sends the context.

Inherited from:
Parameters
NameTypeDescription
$context\MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext

The context of the request.

Returns
TypeDescription
\GuzzleHttp\Psr7\Response
methodprotectedsendContextAsync(\MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext $context) : \GuzzleHttp\Promise\PromiseInterface
inherited

Creates the promise to send the context.

Inherited from:
Parameters
NameTypeDescription
$context\MicrosoftAzure\Storage\Common\Internal\Http\HttpCallContext

The context of the request.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
methodpublicsetBlobMetadata(string $container, string $blob, array $metadata, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\SetBlobMetadataResult

Sets metadata headers on the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$metadataarray

key/value pair representation

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\SetBlobMetadataResult
Details
See
 
methodpublicsetBlobMetadataAsync(string $container, string $blob, array $metadata, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to set metadata headers on the blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$metadataarray

key/value pair representation

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicsetBlobProperties(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\SetBlobPropertiesOptions $options = null) : \MicrosoftAzure\Storage\Blob\Models\SetBlobPropertiesResult

Sets system properties defined for a blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\SetBlobPropertiesOptions

optional parameters

Returns
TypeDescription
\MicrosoftAzure\Storage\Blob\Models\SetBlobPropertiesResult
Details
See
 
methodpublicsetBlobPropertiesAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\SetBlobPropertiesOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to set system properties defined for a blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\SetBlobPropertiesOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicsetBlobTier(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\SetBlobTierOptions $options = null) : void

Sets blob tier on the blob.

Parameters
NameTypeDescription
$containerstring

name

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\SetBlobTierOptions

optional parameters

Details
See
 
methodpublicsetBlobTierAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\SetBlobTierOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Sets blob tier on the blob.

Parameters
NameTypeDescription
$containerstring

name

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\SetBlobTierOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicsetBlockSize(integer $val) : void

Set the value for block size, Max 100MB

Parameters
NameTypeDescription
$valinteger

The max size for each block to be sent.

methodpublicsetContainerAcl(string $container, \MicrosoftAzure\Storage\Blob\Models\ContainerACL $acl, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : void

Sets the ACL and any container-level access policies for the container.

Parameters
NameTypeDescription
$containerstring

name

$acl\MicrosoftAzure\Storage\Blob\Models\ContainerACL

access control list for container

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Details
See
 
methodpublicsetContainerAclAsync(string $container, \MicrosoftAzure\Storage\Blob\Models\ContainerACL $acl, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Creates promise to set the ACL and any container-level access policies for the container.

Parameters
NameTypeDescription
$containerstring

name

$acl\MicrosoftAzure\Storage\Blob\Models\ContainerACL

access control list for container

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicsetContainerMetadata(string $container, array $metadata, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : void

Sets metadata headers on the container.

Parameters
NameTypeDescription
$containerstring

name

$metadataarray

metadata key/value pair.

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Details
See
 
methodpublicsetContainerMetadataAsync(string $container, array $metadata, \MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Sets metadata headers on the container.

Parameters
NameTypeDescription
$containerstring

name

$metadataarray

metadata key/value pair.

$options\MicrosoftAzure\Storage\Blob\Models\BlobServiceOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicsetServiceProperties(\MicrosoftAzure\Storage\Common\Models\ServiceProperties $serviceProperties, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : void
inherited

Sets the properties of the service.

Inherited from:

It's recommended to use getServiceProperties, alter the returned object and then use setServiceProperties with this altered object.

Parameters
NameTypeDescription
$serviceProperties\MicrosoftAzure\Storage\Common\Models\ServiceProperties

The service properties.

$options\MicrosoftAzure\Storage\Common\Models\ServiceOptions

The optional parameters.

Details
See
 
methodpublicsetServicePropertiesAsync(\MicrosoftAzure\Storage\Common\Models\ServiceProperties $serviceProperties, \MicrosoftAzure\Storage\Common\Models\ServiceOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface
inherited

Creates the promise to set the properties of the service.

Inherited from:

It's recommended to use getServiceProperties, alter the returned object and then use setServiceProperties with this altered object.

Parameters
NameTypeDescription
$serviceProperties\MicrosoftAzure\Storage\Common\Models\ServiceProperties

The service properties.

$options\MicrosoftAzure\Storage\Common\Models\ServiceOptions

The optional parameters.

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
methodpublicsetSingleBlobUploadThresholdInBytes(integer $val) : void

Set the value for SingleBlobUploadThresholdInBytes, Max 256MB

Parameters
NameTypeDescription
$valinteger

The max size to send as a single blob block

methodpublicthrowIfError(\Psr\Http\Message\ResponseInterface $response, array | integer $expected) : void
staticinherited

Throws ServiceException if the received status code is not expected.

Inherited from:
Parameters
NameTypeDescription
$response\Psr\Http\Message\ResponseInterface

The response received

$expectedarray | integer

The expected status codes.

Throws
ExceptionDescription
\MicrosoftAzure\Storage\Common\Exceptions\ServiceException
methodpublicundeleteBlob(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\UndeleteBlobOptions $options = null) : void

Undeletes a blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\UndeleteBlobOptions

optional parameters

Details
See
 
methodpublicundeleteBlobAsync(string $container, string $blob, \MicrosoftAzure\Storage\Blob\Models\UndeleteBlobOptions $options = null) : \GuzzleHttp\Promise\PromiseInterface

Undeletes a blob.

Parameters
NameTypeDescription
$containerstring

name of the container

$blobstring

name of the blob

$options\MicrosoftAzure\Storage\Blob\Models\UndeleteBlobOptions

optional parameters

Returns
TypeDescription
\GuzzleHttp\Promise\PromiseInterface
Details
See
 
Documentation was generated by phpDocumentor 2.9.1.