azure-storage-blobs
Public Member Functions | Static Public Member Functions | List of all members
Azure::Storage::Blobs::BlobServiceClient Class Referencefinal

#include <blob_service_client.hpp>

Public Member Functions

 BlobServiceClient (const std::string &serviceUrl, std::shared_ptr< StorageSharedKeyCredential > credential, const BlobClientOptions &options=BlobClientOptions())
 Initialize a new instance of BlobServiceClient. More...
 
 BlobServiceClient (const std::string &serviceUrl, std::shared_ptr< Core::Credentials::TokenCredential > credential, const BlobClientOptions &options=BlobClientOptions())
 Initialize a new instance of BlobServiceClient. More...
 
 BlobServiceClient (const std::string &serviceUrl, const BlobClientOptions &options=BlobClientOptions())
 Initialize a new instance of BlobServiceClient. More...
 
BlobContainerClient GetBlobContainerClient (const std::string &blobContainerName) const
 Creates a new BlobContainerClient object with the same URL as this BlobServiceClient. The new BlobContainerClient uses the same request policy pipeline as this BlobServiceClient. More...
 
std::string GetUrl () const
 Gets the blob service's primary URL endpoint. More...
 
ListBlobContainersPagedResponse ListBlobContainers (const ListBlobContainersOptions &options=ListBlobContainersOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Returns a collection of blob containers in the storage account. Enumerating the blob containers may make multiple requests to the service while fetching all the values. Containers are ordered lexicographically by name. More...
 
Azure::Response< Models::UserDelegationKeyGetUserDelegationKey (const Azure::DateTime &expiresOn, const GetUserDelegationKeyOptions &options=GetUserDelegationKeyOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Retrieves a key that can be used to delegate Active Directory authorization to shared access signatures. More...
 
Azure::Response< Models::SetServicePropertiesResultSetProperties (Models::BlobServiceProperties properties, const SetServicePropertiesOptions &options=SetServicePropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 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. You can also use this operation to set the default request version for all incoming requests to the Blob service that do not have a version specified. More...
 
Azure::Response< Models::BlobServicePropertiesGetProperties (const GetServicePropertiesOptions &options=GetServicePropertiesOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Gets the properties of a storage account's blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. More...
 
Azure::Response< Models::AccountInfoGetAccountInfo (const GetAccountInfoOptions &options=GetAccountInfoOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Returns the sku name and account kind for the specified account. More...
 
Azure::Response< Models::ServiceStatisticsGetStatistics (const GetBlobServiceStatisticsOptions &options=GetBlobServiceStatisticsOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 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. More...
 
FindBlobsByTagsPagedResponse FindBlobsByTags (const std::string &tagFilterSqlExpression, const FindBlobsByTagsOptions &options=FindBlobsByTagsOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 The Filter Blobs operation enables callers to list blobs across all containers whose tags match a given search expression. Filter blobs searches across all containers within a storage account but can be scoped within the expression to a single container. More...
 
Azure::Response< BlobContainerClientCreateBlobContainer (const std::string &blobContainerName, const CreateBlobContainerOptions &options=CreateBlobContainerOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Creates a new blob container under the specified account. If the container with the same name already exists, the operation fails. More...
 
Azure::Response< Models::DeleteBlobContainerResultDeleteBlobContainer (const std::string &blobContainerName, const DeleteBlobContainerOptions &options=DeleteBlobContainerOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Marks the specified blob container for deletion. The container and any blobs contained within it are later deleted during garbage collection. More...
 
Azure::Response< BlobContainerClientUndeleteBlobContainer (const std::string deletedBlobContainerName, const std::string deletedBlobContainerVersion, const UndeleteBlobContainerOptions &options=UndeleteBlobContainerOptions(), const Azure::Core::Context &context=Azure::Core::Context()) const
 Restores a previously deleted container. More...
 

Static Public Member Functions

static BlobServiceClient CreateFromConnectionString (const std::string &connectionString, const BlobClientOptions &options=BlobClientOptions())
 Initialize a new instance of BlobServiceClient. More...
 

Detailed Description

The BlobServiceClient allows you to manipulate Azure Storage service resources and blob containers. The storage account provides the top-level namespace for the Blob service.

Constructor & Destructor Documentation

◆ BlobServiceClient() [1/3]

Azure::Storage::Blobs::BlobServiceClient::BlobServiceClient ( const std::string &  serviceUrl,
std::shared_ptr< StorageSharedKeyCredential >  credential,
const BlobClientOptions options = BlobClientOptions() 
)
explicit
Parameters
serviceUrlA URL referencing the blob that includes the name of the account.
credentialThe shared key credential used to sign requests.
optionsOptional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

◆ BlobServiceClient() [2/3]

Azure::Storage::Blobs::BlobServiceClient::BlobServiceClient ( const std::string &  serviceUrl,
std::shared_ptr< Core::Credentials::TokenCredential >  credential,
const BlobClientOptions options = BlobClientOptions() 
)
explicit
Parameters
serviceUrlA URL referencing the blob that includes the name of the account.
credentialThe token credential used to sign requests.
optionsOptional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

◆ BlobServiceClient() [3/3]

Azure::Storage::Blobs::BlobServiceClient::BlobServiceClient ( const std::string &  serviceUrl,
const BlobClientOptions options = BlobClientOptions() 
)
explicit
Parameters
serviceUrlA URL referencing the blob that includes the name of the account, and possibly also a SAS token.
optionsOptional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.

Member Function Documentation

◆ CreateBlobContainer()

Azure::Response< BlobContainerClient > Azure::Storage::Blobs::BlobServiceClient::CreateBlobContainer ( const std::string &  blobContainerName,
const CreateBlobContainerOptions options = CreateBlobContainerOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
blobContainerNameThe name of the container to create.
optionsOptional parameters to execute this function.
contextContext for cancelling long running operations.
Returns
A BlobContainerClient referencing the newly created container.

◆ CreateFromConnectionString()

BlobServiceClient Azure::Storage::Blobs::BlobServiceClient::CreateFromConnectionString ( const std::string &  connectionString,
const BlobClientOptions options = BlobClientOptions() 
)
static
Parameters
connectionStringA connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime.
optionsOptional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request.
Returns
A new BlobServiceClient instance.

◆ DeleteBlobContainer()

Azure::Response< Models::DeleteBlobContainerResult > Azure::Storage::Blobs::BlobServiceClient::DeleteBlobContainer ( const std::string &  blobContainerName,
const DeleteBlobContainerOptions options = DeleteBlobContainerOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
blobContainerNameThe name of the container to delete.
optionsOptional parameters to execute this function.
contextContext for cancelling long running operations.
Returns
A DeleteBlobContainerResult if successful.

◆ FindBlobsByTags()

FindBlobsByTagsPagedResponse Azure::Storage::Blobs::BlobServiceClient::FindBlobsByTags ( const std::string &  tagFilterSqlExpression,
const FindBlobsByTagsOptions options = FindBlobsByTagsOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
tagFilterSqlExpressionThe where parameter enables the caller to query blobs whose tags match a given expression. The given expression must evaluate to true for a blob to be returned in the results. The[OData - ABNF] filter syntax rule defines the formal grammar for the value of the where query parameter, however, only a subset of the OData filter syntax is supported in the Blob service.
optionsOptional parameters to execute this function.
contextContext for cancelling long running operations.
Returns
A FindBlobsByTagsPagedResponse describing the blobs.

◆ GetAccountInfo()

Azure::Response< Models::AccountInfo > Azure::Storage::Blobs::BlobServiceClient::GetAccountInfo ( const GetAccountInfoOptions options = GetAccountInfoOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to execute this function.
contextContext for cancelling long running operations.
Returns
AccountInfo describing the account.

◆ GetBlobContainerClient()

BlobContainerClient Azure::Storage::Blobs::BlobServiceClient::GetBlobContainerClient ( const std::string &  blobContainerName) const
Returns
A new BlobContainerClient instance.

◆ GetProperties()

Azure::Response< Models::BlobServiceProperties > Azure::Storage::Blobs::BlobServiceClient::GetProperties ( const GetServicePropertiesOptions options = GetServicePropertiesOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to execute this function.
contextContext for cancelling long running operations.
Returns
A BlobServiceProperties describing the service properties.

◆ GetStatistics()

Azure::Response< Models::ServiceStatistics > Azure::Storage::Blobs::BlobServiceClient::GetStatistics ( const GetBlobServiceStatisticsOptions options = GetBlobServiceStatisticsOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to execute this function.
contextContext for cancelling long running operations.
Returns
A ServiceStatistics describing the service replication statistics.

◆ GetUrl()

std::string Azure::Storage::Blobs::BlobServiceClient::GetUrl ( ) const
inline
Returns
the blob service's primary URL endpoint.

◆ GetUserDelegationKey()

Azure::Response< Models::UserDelegationKey > Azure::Storage::Blobs::BlobServiceClient::GetUserDelegationKey ( const Azure::DateTime &  expiresOn,
const GetUserDelegationKeyOptions options = GetUserDelegationKeyOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
expiresOnExpiration of the key's validity. The time should be specified in UTC, and will be truncated to second.
optionsOptional parameters to execute this function.
contextContext for cancelling long running operations.
Returns
A deserialized UserDelegationKey instance.

◆ ListBlobContainers()

ListBlobContainersPagedResponse Azure::Storage::Blobs::BlobServiceClient::ListBlobContainers ( const ListBlobContainersOptions options = ListBlobContainersOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
optionsOptional parameters to execute this function.
contextContext for cancelling long running operations.
Returns
A ListBlobContainersPagedResponse describing the blob containers in the storage account.

◆ SetProperties()

Azure::Response< Models::SetServicePropertiesResult > Azure::Storage::Blobs::BlobServiceClient::SetProperties ( Models::BlobServiceProperties  properties,
const SetServicePropertiesOptions options = SetServicePropertiesOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
propertiesThe blob service properties.
optionsOptional parameters to execute this function.
contextContext for cancelling long running operations.
Returns
A SetServicePropertiesResult on successfully setting the properties.

◆ UndeleteBlobContainer()

Azure::Response< BlobContainerClient > Azure::Storage::Blobs::BlobServiceClient::UndeleteBlobContainer ( const std::string  deletedBlobContainerName,
const std::string  deletedBlobContainerVersion,
const UndeleteBlobContainerOptions options = UndeleteBlobContainerOptions(),
const Azure::Core::Context &  context = Azure::Core::Context() 
) const
Parameters
deletedBlobContainerNameThe name of the previously deleted container.
deletedBlobContainerVersionThe version of the previously deleted container.
optionsOptional parameters to execute this function.
contextContext for cancelling long running operations.
Returns
A BlobContainerClient referencing the undeleted container.

The documentation for this class was generated from the following files: