Creates an instance of BlobServiceClient.
A Client string pointing to Azure Storage blob service, such as "https://myaccount.blob.core.windows.net". You can append a SAS if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
Creates an instance of BlobServiceClient.
A Client string pointing to Azure Storage blob service, such as "https://myaccount.blob.core.windows.net". You can append a SAS if using AnonymousCredential, such as "https://myaccount.blob.core.windows.net?sasString".
Call newPipeline() to create a default pipeline, or provide a customized pipeline.
Such as AnonymousCredential, StorageSharedKeyCredential or any credential from the @azure/identity package to authenticate requests to the service. You can also provide an object that implements the TokenCredential interface. If not specified, AnonymousCredential is used.
StorageClient is a reference to protocol layer operations entry, which is generated by AutoRest generator.
Encoded URL string value.
Create a Blob container.
Name of the container to create.
} Container creation response and the corresponding container client.
Deletes a Blob container.
Name of the container to delete.
Container deletion response.
The Get Account Information operation returns the sku name and account kind for the specified account. The Get Account Information operation is available on service versions beginning with version 2018-03-28.
Response data for the Service Get Account Info operation.
Creates a BlobBatchClient object to conduct batch operations.
A new BlobBatchClient object for this service.
Creates a ContainerClient object
A container name
A new ContainerClient object for the given container name.
Gets the properties of a storage account’s Blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.
Response data for the Service Get Properties operation.
Retrieves statistics related to replication for the Blob service. It is only available on the secondary location endpoint when read-access geo-redundant replication is enabled for the storage account.
Response data for the Service Get Statistics operation.
ONLY AVAILABLE WHEN USING BEARER TOKEN AUTHENTICATION (TokenCredential).
Retrieves a user delegation key for the Blob service. This is only a valid operation when using bearer token authentication.
The start time for the user delegation SAS. Must be within 7 days of the current time
The end time for the user delegation SAS. Must be within 7 days of the current time
Returns an async iterable iterator to list all the containers under the specified account.
.byPage() returns an async iterable iterator to list the containers in pages.
Example using for await
syntax:
let i = 1;
for await (const container of blobServiceClient.listContainers()) {
console.log(`Container ${i++}: ${container.name}`);
}
Example using iter.next()
:
let i = 1;
const iter = blobServiceClient.listContainers();
let containerItem = await iter.next();
while (!containerItem.done) {
console.log(`Container ${i++}: ${containerItem.value.name}`);
containerItem = await iter.next();
}
Example using byPage()
:
// passing optional maxPageSize in the page settings
let i = 1;
for await (const response of blobServiceClient.listContainers().byPage({ maxPageSize: 20 })) {
if (response.containerItems) {
for (const container of response.containerItems) {
console.log(`Container ${i++}: ${container.name}`);
}
}
}
Example using paging with a marker:
let i = 1;
let iterator = blobServiceClient.listContainers().byPage({ maxPageSize: 2 });
let response = (await iterator.next()).value;
// Prints 2 container names
if (response.containerItems) {
for (const container of response.containerItems) {
console.log(`Container ${i++}: ${container.name}`);
}
}
// Gets next marker
let marker = response.continuationToken;
// Passing next marker as continuationToken
iterator = blobServiceClient
.listContainers()
.byPage({ continuationToken: marker, maxPageSize: 10 });
response = (await iterator.next()).value;
// Prints 10 container names
if (response.containerItems) {
for (const container of response.containerItems) {
console.log(`Container ${i++}: ${container.name}`);
}
}
An asyncIterableIterator that supports paging.
Sets properties for a storage account’s Blob service endpoint, including properties for Storage Analytics, CORS (Cross-Origin Resource Sharing) rules and soft delete settings.
Response data for the Service Set Properties operation.
Creates an instance of BlobServiceClient from connection string.
Account connection string or a SAS connection string of an Azure storage account.
[ Note - Account connection string can only be used in NODE.JS runtime. ]
Account connection string example -
DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=accountKey;EndpointSuffix=core.windows.net
SAS connection string example -
BlobEndpoint=https://myaccount.blob.core.windows.net/;QueueEndpoint=https://myaccount.queue.core.windows.net/;FileEndpoint=https://myaccount.file.core.windows.net/;TableEndpoint=https://myaccount.table.core.windows.net/;SharedAccessSignature=sasString
Generated using TypeDoc
A BlobServiceClient represents a Client to the Azure Storage Blob service allowing you to manipulate blob containers.