BlobContainerClient
in package
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
LOGS_BLOB_CONTAINER_NAME
public
mixed
LOGS_BLOB_CONTAINER_NAME
= '$logs'
ROOT_BLOB_CONTAINER_NAME
public
mixed
ROOT_BLOB_CONTAINER_NAME
= '$root'
WEB_BLOB_CONTAINER_NAME
public
mixed
WEB_BLOB_CONTAINER_NAME
= '$web'
Properties
$containerName read-only
public
string
$containerName
$credential read-only
public
StorageSharedKeyCredential|TokenCredential|null
$credential
= null
$uri read-only
public
UriInterface
$uri
$client read-only
private
Client
$client
$options read-only
private
BlobContainerClientOptions
$options
= new BlobContainerClientOptions()
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
canGenerateSasUri()
Returns whether this client has a shared-key credential capable of signing a container SAS.
public
canGenerateSasUri() : bool
Return values
boolcreate()
Creates the container.
public
create([CreateContainerOptions $options = new CreateContainerOptions() ]) : void
Parameters
- $options : CreateContainerOptions = new CreateContainerOptions()
createAsync()
Asynchronously creates the container.
public
createAsync([CreateContainerOptions $options = new CreateContainerOptions() ]) : PromiseInterface
Parameters
- $options : CreateContainerOptions = new CreateContainerOptions()
Return values
PromiseInterfacecreateIfNotExists()
Creates the container if it does not already exist.
public
createIfNotExists([CreateContainerOptions $options = new CreateContainerOptions() ]) : void
Parameters
- $options : CreateContainerOptions = new CreateContainerOptions()
createIfNotExistsAsync()
Asynchronously creates the container if it does not already exist.
public
createIfNotExistsAsync([CreateContainerOptions $options = new CreateContainerOptions() ]) : PromiseInterface
Parameters
- $options : CreateContainerOptions = new CreateContainerOptions()
Return values
PromiseInterfacedelete()
Deletes the container.
public
delete([DeleteContainerOptions $options = new DeleteContainerOptions() ]) : void
Parameters
- $options : DeleteContainerOptions = new DeleteContainerOptions()
deleteAsync()
Asynchronously deletes the container.
public
deleteAsync([DeleteContainerOptions $options = new DeleteContainerOptions() ]) : PromiseInterface
Parameters
- $options : DeleteContainerOptions = new DeleteContainerOptions()
Return values
PromiseInterfacedeleteIfExists()
Deletes the container if it exists.
public
deleteIfExists([DeleteContainerOptions $options = new DeleteContainerOptions() ]) : void
Parameters
- $options : DeleteContainerOptions = new DeleteContainerOptions()
deleteIfExistsAsync()
Asynchronously deletes the container if it exists.
public
deleteIfExistsAsync([DeleteContainerOptions $options = new DeleteContainerOptions() ]) : PromiseInterface
Parameters
- $options : DeleteContainerOptions = new DeleteContainerOptions()
Return values
PromiseInterfaceexists()
Determines whether the container exists.
public
exists() : bool
Return values
boolexistsAsync()
Asynchronously determines whether the container exists.
public
existsAsync() : PromiseInterface
Return values
PromiseInterfacefindBlobsByTag()
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>generateSasUri()
Generates a URI for this container containing a signed service SAS query string.
public
generateSasUri(BlobSasBuilder $blobSasBuilder) : UriInterface
Parameters
- $blobSasBuilder : BlobSasBuilder
Tags
Return values
UriInterfacegetBlobClient()
Creates a general-purpose client for a blob without making a service request.
public
getBlobClient(string $blobName) : BlobClient
Parameters
- $blobName : string
Return values
BlobClientgetBlobLeaseClient()
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
BlobLeaseClientgetBlobs()
Lists blobs in a flat sequence, following continuation markers automatically.
public
getBlobs([string|null $prefix = null ][, GetBlobsOptions $options = new GetBlobsOptions() ]) : Generator<string|int, Blob>
Parameters
- $prefix : string|null = null
- $options : GetBlobsOptions = new GetBlobsOptions()
Return values
Generator<string|int, Blob>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>getBlockBlobClient()
Creates a block blob client without making a service request.
public
getBlockBlobClient(string $blobName) : BlockBlobClient
Parameters
- $blobName : string
Return values
BlockBlobClientgetProperties()
Gets the container's properties and metadata.
public
getProperties([GetContainerPropertiesOptions $options = new GetContainerPropertiesOptions() ]) : BlobContainerProperties
Parameters
- $options : GetContainerPropertiesOptions = new GetContainerPropertiesOptions()
Return values
BlobContainerPropertiesgetPropertiesAsync()
Asynchronously gets the container's properties and metadata.
public
getPropertiesAsync([GetContainerPropertiesOptions $options = new GetContainerPropertiesOptions() ]) : PromiseInterface
Parameters
- $options : GetContainerPropertiesOptions = new GetContainerPropertiesOptions()
Return values
PromiseInterfacesetMetadata()
Replaces all user-defined metadata on the container.
public
setMetadata(array<string|int, string> $metadata[, SetContainerMetadataOptions $options = new SetContainerMetadataOptions() ]) : void
Parameters
- $metadata : array<string|int, string>
- $options : SetContainerMetadataOptions = new SetContainerMetadataOptions()
setMetadataAsync()
Asynchronously replaces all user-defined metadata on the container.
public
setMetadataAsync(array<string|int, string> $metadata[, SetContainerMetadataOptions $options = new SetContainerMetadataOptions() ]) : PromiseInterface
Parameters
- $metadata : array<string|int, string>
- $options : SetContainerMetadataOptions = new SetContainerMetadataOptions()
Return values
PromiseInterfacegetBlobUri()
private
getBlobUri(string $blobName) : UriInterface
Parameters
- $blobName : string
Return values
UriInterfacelistBlobs()
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