Azure SDK for C++ (January 2021)
The Azure SDK team is pleased to make available the January 2021 client library release.
Beta
- Azure Core
- Azure Identity
- Azure Storage Common
- Azure Storage Blobs
- Azure Storage Files DataLake
- Azure Storage Files Shares
Installation Instructions
To install any of our packages, copy and paste the following commands into a terminal:
git clone https://github.com/Azure/azure-sdk-for-cpp
# git checkout <tag_name>
# For example:
git checkout azure-storage-blobs_12.0.0-beta.6
Feedback
If you have a bug or feature request for one of the libraries, please post an issue to GitHub.
Release highlights
azure-core Changelog
New Features
- Added a WinHTTP-based
HttpTransportcalledWinHttpTransportand use that as the defaultTransportPolicyOptions.Transporton Windows when sending and receiving requests and responses over the wire. - Added
Rangetype toAzure::Core::Httpnamespace. - Added support for long-running operations with
Operation<T>. - Added support for setting a custom transport adapter by implementing the method
std::shared_ptr<HttpTransport> ::AzureSdkGetCustomHttpTransport(). - Added interoperability between
std::chrono::system_clocktypes andDateTime. - Added default constructor to
DateTimeand support for dates since 0001. - Added Base64 encoding and decoding utility APIs to the
Azure::Corenamespace available fromazure/core/base64.hpp. - Added
Http::Response<void>template specialization. - Added
GetHeadersAsString()on theAzure::Core::Http::Requestclass. - Added a
platform.hppheader file for defining commonly used OS-specific#defineconstants. - Added
IsCancelled()on theAzure::Core::Contextclass.
Breaking Changes
- Removed
DateTime::operator Duration(),DateTime::Durationtypedef andDateTime::Now(). - Moved
Azure::Core::BearerTokenAuthenticationPolicy, defined inazure/core/credentials.hpptoAzure::Core::Httpnamespace inazure/core/http/policy.hppheader. - Changed type of
Token::ExpiresOntoDateTime. - Renamed exception
OperationCanceledExceptiontoOperationCancelledExceptionandThrowIfCanceled()toThrowIfCancelled()on theContextclass. - Moved
Azure::Core::Version, defined inazure/core/version.hppto theAzure::Core::Detailsnamespace. - Changed
Azure::Core::AuthenticationExceptionto derive fromstd::exceptioninstead ofstd::runtime_error. - Changed the
BodyStream::ReadAPI from being a pure virtual function to non-virtual. - Removed
CurlConnection,CurlConnectionPool,CurlSession, andCurlNetworkConnectionby making headers meant as implementation, private. - Removed option
AllowBeastfromCurlTransportSSLOptionsinCurlTransportOptions. - Changed default option
NoRevokefromCurlTransportSSLOptionsfor theCurlTransportOptionstotrue. This disables the revocation list checking by default.
Bug Fixes
- Fixed the Curl transport adapter connection pooling when setting options.
- Fixed setting up the default transport adapter.
- Fixed linker error of missing pthread on Linux.
- Initialize class data members to avoid MSVC warning.
- Throw
Azure::Core::Http::TransportExceptionifcurl_easy_init()returns a null handle.
Other changes and Improvements
- Added support for distributing the C++ SDK as a source package via vcpkg.
azure-identity Changelog
Breaking Changes
- Moved
Azure::Identity::Version, defined inazure/identity/version.hppto theAzure::Identity::Detailsnamespace.
Other changes and Improvements
- Add high-level and simplified identity.hpp file for simpler include experience for customers.
azure-storage-common Changelog
New Features
- Added new type
ContentHash. - Added definition of
Metadata. - Support setting account SAS permission with a raw string.
Breaking Changes
- Renamed
SharedKeyCredentialtoStorageSharedKeyCredential. - Renamed
StorageSharedKeyCredential::UpdateAccountKeytoUpdate. - Made
StorageRetryPolicy,StoragePerRetryPolicyandSharedKeyPolicyprivate by moving them to theDetailsnamespace. - Removed
StorageRetryOptions, useAzure::Core::Http::RetryOptionsinstead. - Moved Account SAS into
Azure::Storage::Sasnamespace. - All date time related strings are now changed to
Azure::Core::DateTimetype. - Made version strings private by moving them into the
Detailsnamespace. - Moved
Base64EncodeandBase64Decodefrom theAzure::Storagenamespace toAzure::Coreand removed the string accepting overload ofBase64Encode. - Renamed public constants so they no longer start with the prefix
c_. For example,c_InfiniteLeaseDurationbecameInfiniteLeaseDuration.
Bug Fixes
- Fixed default EndpointSuffix when parsing a connection string.
azure-storage-blobs Changelog
New Features
- Added
CreateIfNotExistsandDeleteIfExistsfor blob containers and blobs. - Added
IsHierarchicalNamespaceEnabledinGetAccountInfoResult. - Added
PageBlobClient::GetPageRangesDiffandPageBlobClient::GetManagedDiskPageRangesDiff. - Added
CreateBlobContainer,DeleteBlobContainer,UndeleteBlobContainerintoBlobServiceClient. - Added
DeleteBlobtoBlobContainerClient. - Support setting blob SAS permission with a raw string.
Breaking Changes
- Renamed
AppendBlobAccessConditions::MaxSizetoIfMaxSizeLessThanOrEqual. - Renamed
AppendBlobAccessConditions::AppendPositiontoIfAppendPositionEqual. BlobServiceProperties.DefaultServiceVersionis now nullable.- Renamed
DeleteBlobSubRequest::containerNametoblobContainerName. - Renamed
SetBlobAccessTierSubRequest::containerNametoblobContainerName. - Renamed
BlobSasBuilder::ContainerNametoBlobContainerName. - Renamed
BlobSasResource::ContainertoBlobContainer. - Renamed
AccountSasResource::ContainertoBlobContainer - Renamed some structs:
CreateContainerResulttoCreateBlobContainerOptionsCreateContainerOptionstoCreateBlobContainerOptionsDeleteContainerResulttoDeleteBlobContainerResultDeleteContainerOptionstoDeleteBlobContainerOptionsGetContainerPropertiesResulttoGetBlobContainerPropertiesResultGetContainerPropertiesOptionstoGetBlobContainerPropertiesOptionsSetContainerMetadataResulttoSetBlobContainerMetadataResultSetContainerMetadataOptionstoSetBlobContainerMetadataOptionsGetContainerAccessPolicyResulttoGetBlobContainerAccessPolicyResultGetContainerAccessPolicyOptionstoGetBlobContainerAccessPolicyOptionsSetContainerAccessPolicyResulttoSetBlobContainerAccessPolicyResultSetContainerAccessPolicyOptionstoSetBlobContainerAccessPolicyOptionsAcquireContainerLeaseResulttoAcquireBlobContainerLeaseResultAcquireContainerLeaseOptionstoAcquireBlobContainerLeaseOptionsRenewContainerLeaseResulttoRenewBlobContainerLeaseResultRenewContainerLeaseOptionstoRenewBlobContainerLeaseOptionsReleaseContainerLeaseResulttoReleaseBlobContainerLeaseResultReleaseContainerLeaseOptionstoReleaseBlobContainerLeaseOptionsChangeContainerLeaseResulttoChangeBlobContainerLeaseResultChangeContainerLeaseOptionstoChangeBlobContainerLeaseOptionsBreakContainerLeaseResulttoBreakBlobContainerLeaseResultBreakContainerLeaseOptionstoBreakBlobContainerLeaseOptionsContainerAccessConditionstoBlobContainerAccessConditionsListContainersSegmentResulttoListBlobContainersSegmentResultListContainersSegmentOptionstoListBlobContainersSegmentOptions
- API signature for
CommitBlockListhas changed.BlockTypedoesn’t need to be specified anymore. PageBlobClient::GetPageRangesdoesn’t support getting difference between current blob and a snapshot anymore. UsePageBlobClient::GetPageRangesDiffinstead.- Moved Blob SAS into
Azure::Storage::Sasnamespace. - Replaced all transactional content MD5/CRC64 with the
ContentHashstruct. EncryptionKeySha256is changed to binary (std::vector<uint8_t>).ContentMd5HTTP header is renamed toContentHash, the type is also changed toContentHash.ServerEncryptedfields are renamed toIsServerEncrypted, and changed to non-nullable type.- Added
Isprefix to bool variable names. LikeIsAccessTierInferred,IsDeleted. IsServerEncrypted,EncryptionKeySha256andEncryptionScopeare removed fromClearPageBlobPagesResult, since they are never returned from storage server.ListBlobsFlatSegmentis renamed toListBlobsSinglePage.ListBlobsByHierarchySegmentis renamed toListBlobsByHierarchySinglePage.ListBlobContainersSegmentis renamed toListBlobContainersSinglePage.FindBlobsByTagsis renamed toFindBlobsByTagsSinglePage.MaxResultsin list APIs are renamed toPageSizeHint.- All date time related strings are now changed to
Azure::Core::DateTimetype. - Replaced
std::pair<int64_t, int64_t>withAzure::Core::Http::Rangeto denote blob ranges. - Made version strings private by moving them into the
Detailsnamespace. - Replaced scoped enums that don’t support bitwise operations with extensible enum.
- Continuation token of result types are changed to nullable.
- Renamed
Models::DeleteSnapshotsOption::OnlytoOnlySnapshots. - Renamed
SourceConditionsin API options toSourceAccessConditions. - Removed Blob Batch.
DownloadBlobResult::Content-Rangeis changed to anAzure::Core::Http::Range, an extra fieldBlobSizeis added.- Removed
UndeletefromBlobContainerClient. BlobRetentionPolicy::Enabledis renamed toBlobRetentionPolicy::IsEnabled,BlobStaticWebsite::Enabledis renamed toBlobStaticWebsite::IsEnabled.- Changed type for metadata to case-insensitive
std::map. - Changed parameter type for token credential from
Azure::Identity::ClientSecretCredentialtoAzure::Core::TokenCredential. - Renamed member function
GetUriof client types toGetUrl. BlobClient::GetBlockBlobClient,BlobClient::GetAppendBlobClientandBlobClient::GetPageBlobClientare renamed toBlobClient::AsBlockBlobClient,BlobClient::AsAppendBlobClientandBlobClient::AsPageBlobClientrespectively.
azure-storage-files-shares Changelog
New Features
- Added support for
CreateIfNotExistsfor Share and Directory clients, andDeleteIfExistsfor Share, Directory and File clients. - Support setting file SAS permission with a raw string.
Breaking Changes
- Removed constructors in clients that takes a
Azure::Identity::ClientSecretCredential. - Removed Share Lease related APIs such as
ShareClient::AcquireLeaseandReleaseLeasesince they are not supported in recent service versions. - Moved File SAS into
Azure::Storage::Sasnamespace. - Replaced all transactional content MD5/CRC64 with the
ContentHashstruct. FileShareHttpHeadersis renamed toShareFileHttpHeaders, and memberstd::string ContentMd5is changed toStorage::ContentHash ContentHash.- All date time related strings are now changed to
Azure::Core::DateTimetype. - Moved version strings into
Detailsnamespace. - Renamed all functions and structures that could retrieve partial query results from the server to have
SinglePagesuffix instead ofSegmentsuffix. - Removed
FileRange,ClearRange, andOffsetandLengthpair in options. They are now represented withAzure::Core::Http::Range. - Replace scoped enums that don’t support bitwise operations with extensible enum.
IsServerEncryptedmembers inDownloadFileToResult,UploadFileFromResult,FileDownloadResultandFileGetPropertiesResultare no longer nullable.- Create APIs for Directory and File now returns
FileShareSmbPropertiesthat aggregates SMB related properties. DirectoryClientis renamed toShareDirectoryClient,FileClientis renamed toShareFileClient.- Directory and File related result types and options types now have a
Shareprefix. For example,SetDirectoryPropertiesResultis changed toSetShareDirectoryPropertiesResult. - Renamed
GetSubDirectoryClienttoGetSubdirectoryClient.
azure-storage-files-datalake Changelog
New Features
- Support setting DataLake SAS permission with a raw string.
- Added support for
CreateIfNotExistsandDeleteIfExistsfor FileSystem, Path, Directory and File clients.
Breaking Changes
- Moved DataLake SAS into
Azure::Storage::Sasnamespace. EncrytionKeySha256are changed to binary (std::vector<uint8_t>).- Replaced all transactional content MD5/CRC64 with the
ContentHashstruct. DataLakeHttpHeadersis renamed toPathHttpHeaders, and now containsContentHashfor the resource.- All date time related strings are now changed to
Azure::Core::DateTimetype. CreationTimeis renamed toCreatedOn.AccessTierChangeTimeis renamed toAccessTierChangedOn.CopyCompletionTimeis renamed toCopyCompletedOn.ExpiryTimeis renamed toExpiresOn.LastAccessTimeis renamed toLastAccessedOn.- Made version strings private by moving them into the
Detailsnamespace. - Renamed all functions and structures that could retrieve partial query results from the server to have
SinglePagesuffix instead ofSegmentsuffix. ReadFileResultnow haveContentRangeas string.ReadFileOptionsnow haveAzure::Core::Http::Rangeinstead ofContent-LengthandOffset.- Replaced scoped enums that don’t support bitwise operations with extensible enum.
ListPathsis renamed toListPathsSinglePageand its related return type and options are also renamed accordingly.- Added
DataLakeprefix toFileSystemClient,PathClient,DirectoryClient, andFileClienttypes. - FileSystems, Path, Directory and File related result types and options types now have a
DataLakeprefix. For example,GetFileSystemPropertiesResultis changed toGetDataLakeFileSystemPropertiesResult. - Renamed
GetSubDirectoryClienttoGetSubdirectoryClient. - Removed
NamespaceEnabledfield inCreateDataLakeFileSystemResult.
Latest Releases
View all the latest versions of C++ packages here.