Azure OSS for PHP API Reference

BlobContainerClient
in package

FinalYes

Provides operations for an Azure Blob Storage container and the blobs within it.

Table of Contents

Constants

LOGS_BLOB_CONTAINER_NAME  : mixed = '$logs'
ROOT_BLOB_CONTAINER_NAME  : mixed = '$root'
WEB_BLOB_CONTAINER_NAME  : mixed = '$web'

Properties

$containerName  : string
$credential  : StorageSharedKeyCredential|TokenCredential|null
$uri  : UriInterface
$client  : Client
$options  : BlobContainerClientOptions

Methods

__construct()  : mixed
canGenerateSasUri()  : bool
Returns whether this client has a shared-key credential capable of signing a container SAS.
create()  : void
Creates the container.
createAsync()  : PromiseInterface
Asynchronously creates the container.
createIfNotExists()  : void
Creates the container if it does not already exist.
createIfNotExistsAsync()  : PromiseInterface
Asynchronously creates the container if it does not already exist.
delete()  : void
Deletes the container.
deleteAsync()  : PromiseInterface
Asynchronously deletes the container.
deleteIfExists()  : void
Deletes the container if it exists.
deleteIfExistsAsync()  : PromiseInterface
Asynchronously deletes the container if it exists.
exists()  : bool
Determines whether the container exists.
existsAsync()  : PromiseInterface
Asynchronously determines whether the container exists.
findBlobsByTag()  : Generator<string|int, TaggedBlob>
Finds blobs in this container whose index tags match the SQL expression.
generateSasUri()  : UriInterface
Generates a URI for this container containing a signed service SAS query string.
getBlobClient()  : BlobClient
Creates a general-purpose client for a blob without making a service request.
getBlobLeaseClient()  : BlobLeaseClient
Creates a lease client for this container without making a service request.
getBlobs()  : Generator<string|int, Blob>
Lists blobs in a flat sequence, following continuation markers automatically.
getBlobsByHierarchy()  : Generator<string|int, Blob|BlobPrefix>
Lists blobs as a hierarchy of blob items and virtual-directory prefixes.
getBlockBlobClient()  : BlockBlobClient
Creates a block blob client without making a service request.
getProperties()  : BlobContainerProperties
Gets the container's properties and metadata.
getPropertiesAsync()  : PromiseInterface
Asynchronously gets the container's properties and metadata.
setMetadata()  : void
Replaces all user-defined metadata on the container.
setMetadataAsync()  : PromiseInterface
Asynchronously replaces all user-defined metadata on the container.
getBlobUri()  : UriInterface
listBlobs()  : ListBlobsResponseBody

Constants

Properties

Methods

__construct()

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

URI of the container, including any SAS query string.

$credential : StorageSharedKeyCredential|TokenCredential|null = null

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

$options : BlobContainerClientOptions = new BlobContainerClientOptions()

Client transport and service-version options.

Tags
throws
InvalidBlobUriException

When the URI does not identify a container.

canGenerateSasUri()

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

public canGenerateSasUri() : bool
Return values
bool

exists()

Determines whether the container exists.

public exists() : bool
Return values
bool

existsAsync()

Asynchronously determines whether the container exists.

public existsAsync() : PromiseInterface
Return values
PromiseInterface

findBlobsByTag()

Finds blobs in this container whose index tags match the SQL expression.

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

getBlobClient()

Creates a general-purpose client for a blob without making a service request.

public getBlobClient(string $blobName) : BlobClient
Parameters
$blobName : string
Return values
BlobClient

getBlobLeaseClient()

Creates a lease client for this container without making a service request.

public getBlobLeaseClient([string|null $leaseId = null ]) : BlobLeaseClient
Parameters
$leaseId : string|null = null
Return values
BlobLeaseClient

getBlobsByHierarchy()

Lists blobs as a hierarchy of blob items and virtual-directory prefixes.

public getBlobsByHierarchy([string|null $prefix = null ][, string $delimiter = '/' ][, GetBlobsOptions $options = new GetBlobsOptions() ]) : Generator<string|int, Blob|BlobPrefix>
Parameters
$prefix : string|null = null
$delimiter : string = '/'
$options : GetBlobsOptions = new GetBlobsOptions()
Return values
Generator<string|int, Blob|BlobPrefix>

getBlobUri()

private getBlobUri(string $blobName) : UriInterface
Parameters
$blobName : string
Return values
UriInterface

listBlobs()

private listBlobs(string|null $prefix, string|null $delimiter, string $marker, int|null $maxResults) : ListBlobsResponseBody
Parameters
$prefix : string|null
$delimiter : string|null
$marker : string
$maxResults : int|null
Return values
ListBlobsResponseBody
On this page

Search results