|
#include <blob_container_client.hpp>
Public Member Functions | |
BlobContainerClient (const std::string &containerUri, std::shared_ptr< SharedKeyCredential > credential, const BlobContainerClientOptions &options=BlobContainerClientOptions()) | |
Initialize a new instance of BlobContainerClient. More... | |
BlobContainerClient (const std::string &containerUri, std::shared_ptr< Core::Credentials::ClientSecretCredential > credential, const BlobContainerClientOptions &options=BlobContainerClientOptions()) | |
Initialize a new instance of BlobContainerClient. More... | |
BlobContainerClient (const std::string &containerUri, const BlobContainerClientOptions &options=BlobContainerClientOptions()) | |
Initialize a new instance of BlobContainerClient. More... | |
BlobClient | GetBlobClient (const std::string &blobName) const |
Create a new BlobClient object by appending blobName to the end of uri. The new BlobClient uses the same request policy pipeline as this BlobContainerClient. More... | |
BlockBlobClient | GetBlockBlobClient (const std::string &blobName) const |
Create a new BlockBlobClient object by appending blobName to the end of uri. The new BlockBlobClient uses the same request policy pipeline as this BlobContainerClient. More... | |
AppendBlobClient | GetAppendBlobClient (const std::string &blobName) const |
Create a new AppendBlobClient object by appending blobName to the end of uri. The new AppendBlobClient uses the same request policy pipeline as this BlobContainerClient. More... | |
PageBlobClient | GetPageBlobClient (const std::string &blobName) const |
Create a new PageBlobClient object by appending blobName to the end of uri. The new PageBlobClient uses the same request policy pipeline as this BlobContainerClient. More... | |
std::string | GetUri () const |
Gets the container's primary uri endpoint. More... | |
Azure::Core::Response< CreateContainerResult > | Create (const CreateContainerOptions &options=CreateContainerOptions()) const |
Creates a new container under the specified account. If the container with the same name already exists, the operation fails. More... | |
Azure::Core::Response< DeleteContainerResult > | Delete (const DeleteContainerOptions &options=DeleteContainerOptions()) const |
Marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection. More... | |
Azure::Core::Response< UndeleteContainerResult > | Undelete (const std::string &deletedContainerName, const std::string &deletedContainerVersion, const UndeleteContainerOptions &options=UndeleteContainerOptions()) const |
Restores a previously deleted container. The destionation is referenced by current BlobContainerClient. More... | |
Azure::Core::Response< GetContainerPropertiesResult > | GetProperties (const GetContainerPropertiesOptions &options=GetContainerPropertiesOptions()) const |
Returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs. More... | |
Azure::Core::Response< SetContainerMetadataResult > | SetMetadata (std::map< std::string, std::string > metadata, SetContainerMetadataOptions options=SetContainerMetadataOptions()) const |
Sets one or more user-defined name-value pairs for the specified container. More... | |
Azure::Core::Response< ListBlobsFlatSegmentResult > | ListBlobsFlatSegment (const ListBlobsSegmentOptions &options=ListBlobsSegmentOptions()) const |
Returns a single segment of blobs in this container, starting from the specified Marker, Use an empty Marker to start enumeration from the beginning and the NextMarker if it's not empty to make subsequent calls to ListBlobsFlatSegment to continue enumerating the blobs segment by segment. Blobs are ordered lexicographically by name. More... | |
Azure::Core::Response< ListBlobsByHierarchySegmentResult > | ListBlobsByHierarchySegment (const std::string &delimiter, const ListBlobsSegmentOptions &options=ListBlobsSegmentOptions()) const |
Returns a single segment of blobs in this container, starting from the specified Marker, Use an empty Marker to start enumeration from the beginning and the NextMarker if it's not empty to make subsequent calls to ListBlobsByHierarchySegment to continue enumerating the blobs segment by segment. Blobs are ordered lexicographically by name. A Delimiter can be used to traverse a virtual hierarchy of blobs as though it were a file system. More... | |
Azure::Core::Response< GetContainerAccessPolicyResult > | GetAccessPolicy (const GetContainerAccessPolicyOptions &options=GetContainerAccessPolicyOptions()) const |
Gets the permissions for this container. The permissions indicate whether container data may be accessed publicly. More... | |
Azure::Core::Response< SetContainerAccessPolicyResult > | SetAccessPolicy (const SetContainerAccessPolicyOptions &options=SetContainerAccessPolicyOptions()) const |
Sets the permissions for the specified container. The permissions indicate whether blob container data may be accessed publicly. More... | |
Azure::Core::Response< AcquireContainerLeaseResult > | AcquireLease (const std::string &proposedLeaseId, int32_t duration, const AcquireContainerLeaseOptions &options=AcquireContainerLeaseOptions()) const |
Acquires a lease on the container. More... | |
Azure::Core::Response< RenewContainerLeaseResult > | RenewLease (const std::string &leaseId, const RenewContainerLeaseOptions &options=RenewContainerLeaseOptions()) const |
Renews the container's previously-acquired lease. More... | |
Azure::Core::Response< ReleaseContainerLeaseResult > | ReleaseLease (const std::string &leaseId, const ReleaseContainerLeaseOptions &options=ReleaseContainerLeaseOptions()) const |
Releases the container's previously-acquired lease. More... | |
Azure::Core::Response< ChangeContainerLeaseResult > | ChangeLease (const std::string &leaseId, const std::string &proposedLeaseId, const ChangeContainerLeaseOptions &options=ChangeContainerLeaseOptions()) const |
Changes the lease of an active lease. More... | |
Azure::Core::Response< BreakContainerLeaseResult > | BreakLease (const BreakContainerLeaseOptions &options=BreakContainerLeaseOptions()) const |
Breaks the previously-acquired lease. More... | |
Static Public Member Functions | |
static BlobContainerClient | CreateFromConnectionString (const std::string &connectionString, const std::string &containerName, const BlobContainerClientOptions &options=BlobContainerClientOptions()) |
Initialize a new instance of BlobContainerClient. More... | |
Protected Attributes | |
Azure::Core::Http::Url | m_containerUrl |
std::shared_ptr< Azure::Core::Http::HttpPipeline > | m_pipeline |
Azure::Core::Nullable< EncryptionKey > | m_customerProvidedKey |
Azure::Core::Nullable< std::string > | m_encryptionScope |
Friends | |
class | BlobServiceClient |
The BlobContainerClient allows you to manipulate Azure Storage containers and their blobs.
|
explicit |
Initialize a new instance of BlobContainerClient.
containerUri | A uri referencing the blob container that includes the name of the account and the name of the container. |
credential | The shared key credential used to sign requests. |
options | Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
|
explicit |
Initialize a new instance of BlobContainerClient.
containerUri | A uri referencing the blob container that includes the name of the account and the name of the container. |
credential | The client secret credential used to sign requests. |
options | Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
|
explicit |
Initialize a new instance of BlobContainerClient.
containerUri | A uri referencing the blob that includes the name of the account and the name of the container, and possibly also a SAS token. |
options | Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
Azure::Core::Response< AcquireContainerLeaseResult > Azure::Storage::Blobs::BlobContainerClient::AcquireLease | ( | const std::string & | proposedLeaseId, |
int32_t | duration, | ||
const AcquireContainerLeaseOptions & | options = AcquireContainerLeaseOptions() |
||
) | const |
Acquires a lease on the container.
proposedLeaseId | Proposed lease ID, in a GUID string format. |
duration | Specifies the duration of the lease, in seconds, or Azure::Storage::c_InfiniteLeaseDuration for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. A lease duration cannot be changed using renew or change. |
options | Optional parameters to execute this function. |
Azure::Core::Response< BreakContainerLeaseResult > Azure::Storage::Blobs::BlobContainerClient::BreakLease | ( | const BreakContainerLeaseOptions & | options = BreakContainerLeaseOptions() | ) | const |
Breaks the previously-acquired lease.
options | Optional parameters to execute this function. |
Azure::Core::Response< ChangeContainerLeaseResult > Azure::Storage::Blobs::BlobContainerClient::ChangeLease | ( | const std::string & | leaseId, |
const std::string & | proposedLeaseId, | ||
const ChangeContainerLeaseOptions & | options = ChangeContainerLeaseOptions() |
||
) | const |
Changes the lease of an active lease.
leaseId | ID of the previously-acquired lease. |
proposedLeaseId | Proposed lease ID, in a GUID string format. |
options | Optional parameters to execute this function. |
Azure::Core::Response< CreateContainerResult > Azure::Storage::Blobs::BlobContainerClient::Create | ( | const CreateContainerOptions & | options = CreateContainerOptions() | ) | const |
Creates a new container under the specified account. If the container with the same name already exists, the operation fails.
options | Optional parameters to execute this function. |
|
static |
Initialize a new instance of BlobContainerClient.
connectionString | A connection string includes the authentication information required for your application to access data in an Azure Storage account at runtime. |
containerName | The name of the container containing this blob. |
options | Optional client options that define the transport pipeline policies for authentication, retries, etc., that are applied to every request. |
Azure::Core::Response< DeleteContainerResult > Azure::Storage::Blobs::BlobContainerClient::Delete | ( | const DeleteContainerOptions & | options = DeleteContainerOptions() | ) | const |
Marks the specified container for deletion. The container and any blobs contained within it are later deleted during garbage collection.
options | Optional parameters to execute this function. |
Azure::Core::Response< GetContainerAccessPolicyResult > Azure::Storage::Blobs::BlobContainerClient::GetAccessPolicy | ( | const GetContainerAccessPolicyOptions & | options = GetContainerAccessPolicyOptions() | ) | const |
Gets the permissions for this container. The permissions indicate whether container data may be accessed publicly.
options | Optional parameters to execute this function. |
AppendBlobClient Azure::Storage::Blobs::BlobContainerClient::GetAppendBlobClient | ( | const std::string & | blobName | ) | const |
Create a new AppendBlobClient object by appending blobName to the end of uri. The new AppendBlobClient uses the same request policy pipeline as this BlobContainerClient.
blobName | The name of the blob. |
BlobClient Azure::Storage::Blobs::BlobContainerClient::GetBlobClient | ( | const std::string & | blobName | ) | const |
Create a new BlobClient object by appending blobName to the end of uri. The new BlobClient uses the same request policy pipeline as this BlobContainerClient.
blobName | The name of the blob. |
BlockBlobClient Azure::Storage::Blobs::BlobContainerClient::GetBlockBlobClient | ( | const std::string & | blobName | ) | const |
Create a new BlockBlobClient object by appending blobName to the end of uri. The new BlockBlobClient uses the same request policy pipeline as this BlobContainerClient.
blobName | The name of the blob. |
PageBlobClient Azure::Storage::Blobs::BlobContainerClient::GetPageBlobClient | ( | const std::string & | blobName | ) | const |
Create a new PageBlobClient object by appending blobName to the end of uri. The new PageBlobClient uses the same request policy pipeline as this BlobContainerClient.
blobName | The name of the blob. |
Azure::Core::Response< GetContainerPropertiesResult > Azure::Storage::Blobs::BlobContainerClient::GetProperties | ( | const GetContainerPropertiesOptions & | options = GetContainerPropertiesOptions() | ) | const |
Returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs.
options | Optional parameters to execute this function. |
|
inline |
Azure::Core::Response< ListBlobsByHierarchySegmentResult > Azure::Storage::Blobs::BlobContainerClient::ListBlobsByHierarchySegment | ( | const std::string & | delimiter, |
const ListBlobsSegmentOptions & | options = ListBlobsSegmentOptions() |
||
) | const |
Returns a single segment of blobs in this container, starting from the specified Marker, Use an empty Marker to start enumeration from the beginning and the NextMarker if it's not empty to make subsequent calls to ListBlobsByHierarchySegment to continue enumerating the blobs segment by segment. Blobs are ordered lexicographically by name. A Delimiter can be used to traverse a virtual hierarchy of blobs as though it were a file system.
delimiter | This can be used to to traverse a virtual hierarchy of blobs as though it were a file system. The delimiter may be a single character or a string. |
options | Optional parameters to execute this function. |
Azure::Core::Response< ListBlobsFlatSegmentResult > Azure::Storage::Blobs::BlobContainerClient::ListBlobsFlatSegment | ( | const ListBlobsSegmentOptions & | options = ListBlobsSegmentOptions() | ) | const |
Returns a single segment of blobs in this container, starting from the specified Marker, Use an empty Marker to start enumeration from the beginning and the NextMarker if it's not empty to make subsequent calls to ListBlobsFlatSegment to continue enumerating the blobs segment by segment. Blobs are ordered lexicographically by name.
options | Optional parameters to execute this function. |
Azure::Core::Response< ReleaseContainerLeaseResult > Azure::Storage::Blobs::BlobContainerClient::ReleaseLease | ( | const std::string & | leaseId, |
const ReleaseContainerLeaseOptions & | options = ReleaseContainerLeaseOptions() |
||
) | const |
Releases the container's previously-acquired lease.
leaseId | ID of the previously-acquired lease. |
options | Optional parameters to execute this function. |
Azure::Core::Response< RenewContainerLeaseResult > Azure::Storage::Blobs::BlobContainerClient::RenewLease | ( | const std::string & | leaseId, |
const RenewContainerLeaseOptions & | options = RenewContainerLeaseOptions() |
||
) | const |
Renews the container's previously-acquired lease.
leaseId | ID of the previously-acquired lease. |
options | Optional parameters to execute this function. |
Azure::Core::Response< SetContainerAccessPolicyResult > Azure::Storage::Blobs::BlobContainerClient::SetAccessPolicy | ( | const SetContainerAccessPolicyOptions & | options = SetContainerAccessPolicyOptions() | ) | const |
Sets the permissions for the specified container. The permissions indicate whether blob container data may be accessed publicly.
options | Optional parameters to execute this function. |
Azure::Core::Response< SetContainerMetadataResult > Azure::Storage::Blobs::BlobContainerClient::SetMetadata | ( | std::map< std::string, std::string > | metadata, |
SetContainerMetadataOptions | options = SetContainerMetadataOptions() |
||
) | const |
Sets one or more user-defined name-value pairs for the specified container.
metadata | Custom metadata to set for this container. |
options | Optional parameters to execute this function. |
Azure::Core::Response< UndeleteContainerResult > Azure::Storage::Blobs::BlobContainerClient::Undelete | ( | const std::string & | deletedContainerName, |
const std::string & | deletedContainerVersion, | ||
const UndeleteContainerOptions & | options = UndeleteContainerOptions() |
||
) | const |
Restores a previously deleted container. The destionation is referenced by current BlobContainerClient.
deletedContainerName | The name of the previously deleted container. |
deletedContainerVersion | The version of the previously deleted container. |
options | Optional parameters to execute this function. |