BlobServiceClient
in package
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
$credential read-only
public
StorageSharedKeyCredential|TokenCredential|null
$credential
= null
$uri
public
UriInterface
$uri
$client read-only
private
Client
$client
$options read-only
private
BlobServiceClientOptions
$options
= new BlobServiceClientOptions()
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
boolfindBlobsByTag()
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
Return values
selfgenerateAccountSasUri()
Generates a Blob service URI containing a signed account SAS query string.
public
generateAccountSasUri(AccountSasBuilder $accountSasBuilder) : UriInterface
Parameters
- $accountSasBuilder : AccountSasBuilder
Tags
Return values
UriInterfacegetBlobContainers()
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>getContainerClient()
Creates a client for the named blob container without making a service request.
public
getContainerClient(string $containerName) : BlobContainerClient
Parameters
- $containerName : string