Azure OSS for PHP API Reference

BlobServiceClient
in package

FinalYes

Provides service-level operations for an Azure Blob Storage account.

Create this client from a service endpoint and credential, or use self::fromConnectionString() when a storage connection string is available.

Table of Contents

Properties

$credential  : StorageSharedKeyCredential|TokenCredential|null
$uri  : UriInterface
$client  : Client
$options  : BlobServiceClientOptions

Methods

__construct()  : mixed
canGenerateAccountSasUri()  : bool
Returns whether this client has a shared-key credential capable of signing an account SAS.
findBlobsByTag()  : Generator<string|int, TaggedBlob>
Finds blobs across the storage account whose index tags match the SQL expression.
fromConnectionString()  : self
Creates a client from an Azure Storage connection string.
generateAccountSasUri()  : UriInterface
Generates a Blob service URI containing a signed account SAS query string.
getBlobContainers()  : Generator<string|int, BlobContainer>
Lists containers in the storage account, following continuation markers automatically.
getContainerClient()  : BlobContainerClient
Creates a client for the named blob container without making a service request.

Properties

Methods

__construct()

public __construct(UriInterface $uri[, StorageSharedKeyCredential|TokenCredential|null $credential = null ][, BlobServiceClientOptions $options = new BlobServiceClientOptions() ]) : mixed
Parameters
$uri : UriInterface

Blob service endpoint, including any SAS query string.

$credential : StorageSharedKeyCredential|TokenCredential|null = null

Credential used to authorize requests, or null for anonymous/SAS access.

$options : BlobServiceClientOptions = new BlobServiceClientOptions()

Client transport and service-version options.

canGenerateAccountSasUri()

Returns whether this client has a shared-key credential capable of signing an account SAS.

public canGenerateAccountSasUri() : bool
Return values
bool

findBlobsByTag()

Finds blobs across the storage account whose index tags match the SQL expression.

public findBlobsByTag(string $tagFilterSqlExpression) : Generator<string|int, TaggedBlob>
Parameters
$tagFilterSqlExpression : string
Return values
Generator<string|int, TaggedBlob>

fromConnectionString()

Creates a client from an Azure Storage connection string.

public static fromConnectionString(string $connectionString[, BlobServiceClientOptions $options = new BlobServiceClientOptions() ]) : self
Parameters
$connectionString : string
$options : BlobServiceClientOptions = new BlobServiceClientOptions()
Tags
throws
InvalidConnectionStringException

When the connection string does not contain a usable Blob endpoint and credential.

Return values
self

getBlobContainers()

Lists containers in the storage account, following continuation markers automatically.

public getBlobContainers([string|null $prefix = null ]) : Generator<string|int, BlobContainer>
Parameters
$prefix : string|null = null

Optional prefix used to filter container names.

Return values
Generator<string|int, BlobContainer>
On this page

Search results