Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
"cgmanifest",
"Chelnokov",
"chewi",
"chinacloudapi",
"Chukwu",
"cmake",
"CMOCKA",
Expand Down Expand Up @@ -291,6 +292,7 @@
"unskipped",
"UPNs",
"usgov",
"usgovcloudapi",
"usgoviowa",
"usgovvirginia",
"vcpkg",
Expand All @@ -315,6 +317,7 @@
"Xclang",
"xcode",
"xcodebuild",
"xfiles",
"XSMB",
"zulu"
],
Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
image: $(WINDOWSVMIMAGE)
os: windows
variables:
apiviewParserVersion: "20240927.5"
apiviewParserVersion: "20261009.3"
VCPKG_DEFAULT_TRIPLET: 'x64-windows-static'
Package.EnableSBOMSigning: true
steps:
Expand Down Expand Up @@ -334,6 +334,8 @@ jobs:
- template: /eng/common/pipelines/templates/steps/detect-api-changes.yml
parameters:
ArtifactPath: $(Build.ArtifactStagingDirectory)\packages
# Test-only: keep JSON artifacts without submitting revisions to production APIView.
Condition: false

- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "cpp",
"TagPrefix": "cpp/storage",
"Tag": "cpp/storage_6016ecf9a6"
"Tag": "cpp/storage_01f138ad9c"
}
16 changes: 15 additions & 1 deletion sdk/storage/azure-storage-blobs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,28 @@

### Features Added

### Breaking Changes
- Added support for persisted session authentication for eligible blob download requests.
- Added `BlobClient::GetLayout` and related options and response types for retrieving locality
endpoints, byte ranges, and blob properties. Ranges are exposed directly through
`Models::BlobLayoutInfo::Ranges` as a vector of `Models::BlobLayoutRange`.
- Added `DownloadBlobOptions::LayoutEndpoint` for one-shot download routing and
`DownloadBlobToOptions::LayoutAwareRouting` (`Auto`, `Disabled`, `Enabled`; default `Disabled`) for
managed downloads.
- Added `Models::DownloadHint` and `Models::DownloadBlobDetails::DownloadHint`.

### Bugs Fixed

- Fixed CMake dependency resolution when FlatCC provides only a shared runtime library.

### Other Changes

- Changed the default response format for `ListBlobs` and `ListBlobsByHierarchy` from XML to
Apache Arrow. Set `ListBlobsOptions::ResponseFormat` to `StorageResponseFormat::Xml` to continue
requesting XML responses.
- Changed the default initial transfer size for partitioned uploads and downloads from 256 MiB to
4 MiB, matching the default subsequent chunk size. Explicitly configured
`InitialChunkSize` and `SingleUploadThreshold` values are still respected.

## 12.19.0 (2026-09-29)

### Features Added
Expand Down
6 changes: 6 additions & 0 deletions sdk/storage/azure-storage-blobs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,13 @@ set(
src/page_blob_client.cpp
src/private/avro_parser.cpp
src/private/avro_parser.hpp
src/private/data_locality.cpp
src/private/data_locality.hpp
src/private/package_version.hpp
src/private/session_authentication_policy.cpp
src/private/session_authentication_policy.hpp
src/private/token_credential_session_provider.cpp
src/private/token_credential_session_provider.hpp
src/rest_client.cpp
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,17 @@ namespace Azure { namespace Storage { namespace Blobs {
const GetAccountInfoOptions& options = GetAccountInfoOptions(),
const Azure::Core::Context& context = Azure::Core::Context()) const;

/**
* @brief Gets the data locality layout for this blob.
*
* @param options Optional parameters to execute this function.
* @param context Context for cancelling long running operations.
* @return A paged response containing the blob's data locality layout.
*/
BlobLayoutPagedResponse GetLayout(
const GetBlobLayoutOptions& options = GetBlobLayoutOptions(),
const Azure::Core::Context& context = Azure::Core::Context()) const;

protected:
/** @brief Blob Url */
Azure::Core::Url m_blobUrl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,14 @@ namespace Azure { namespace Storage { namespace Blobs {
* @brief Marks the specified container for deletion. The container and any blobs
* contained within it are later deleted during garbage collection.
*
* @remark When a container is deleted, a container with the same name cannot be created for at
* least 30 seconds. The container might not be available for more than 30 seconds if the
* service is still processing the request. While the container is being deleted, attempts to
* create a container with the same name fail with status code 409 (Conflict). Operations on
* blobs within the container, including reads and writes, may continue to succeed for up to 30
* seconds after the delete request is accepted. After this period, all operations on the
* container and its blobs fail with status code 404 (Not Found).
*
* @param options Optional parameters to execute this function.
* @param context Context for cancelling long running operations.
* @return A DeleteBlobContainerResult if successful.
Expand All @@ -165,6 +173,14 @@ namespace Azure { namespace Storage { namespace Blobs {
* @brief Marks the specified container for deletion if it exists. The container and any blobs
* contained within it are later deleted during garbage collection.
*
* @remark When a container is deleted, a container with the same name cannot be created for at
* least 30 seconds. The container might not be available for more than 30 seconds if the
* service is still processing the request. While the container is being deleted, attempts to
* create a container with the same name fail with status code 409 (Conflict). Operations on
* blobs within the container, including reads and writes, may continue to succeed for up to 30
* seconds after the delete request is accepted. After this period, all operations on the
* container and its blobs fail with status code 404 (Not Found).
*
* @param options Optional parameters to execute this function.
* @param context Context for cancelling long running operations.
* @return A DeleteBlobContainerResult if the container exists.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

#include "azure/storage/blobs/rest_client.hpp"

#include <azure/core/credentials/credentials.hpp>
#include <azure/core/datetime.hpp>
#include <azure/core/http/http.hpp>
#include <azure/core/internal/client_options.hpp>
#include <azure/core/internal/extendable_enumeration.hpp>
#include <azure/core/match_conditions.hpp>
Expand All @@ -23,6 +26,90 @@

namespace Azure { namespace Storage { namespace Blobs {

class ContainerSessionProvider;
class SessionProvider;

namespace _detail {
class SessionAuthenticationPolicy;
class TokenCredentialSessionProvider;
} // namespace _detail

/**
* @brief Specifies how persisted session authentication is used.
*/
enum class SessionMode
{
/**
* @brief Lets the SDK determine when to use sessions.
*
* @note Currently behaves the same as #Disabled.
*/
Auto,

/**
* @brief Disables session authentication.
*/
Disabled,

/**
* @brief Prefers session authentication for eligible requests.
*
* @note The client can fall back to bearer authentication while acquiring a session, when
* session creation is temporarily unavailable, or when the service rejects a session.
*/
Enabled,
};

/**
* @brief Configures persisted session authentication.
*/
struct SessionOptions final
{
/**
* @brief The session authentication mode.
*
* In Auto mode, clients currently use bearer authentication.
*/
SessionMode Mode = SessionMode::Auto;

/**
* @brief Account name used when signing requests. Required when it cannot be inferred from URL.
*
* For custom endpoints, both AccountName and Provider must be specified.
*/
std::string AccountName;

/**
* @brief Optional provider whose session cache can be shared by multiple clients.
*
* When unset, each independently constructed client creates its own provider. Clients derived
* from that client share its provider and cache. For custom endpoints, both Provider and
* AccountName must be specified.
*/
std::shared_ptr<SessionProvider> Provider;
};

/**
* @brief Determines whether locality-aware routing is used for managed downloads.
*/
enum class LayoutAwareRouting
{
/**
* @brief The client library determines whether locality-aware routing is enabled.
*/
Auto,

/**
* @brief Locality-aware routing is disabled.
*/
Disabled,

/**
* @brief Locality-aware routing is enabled.
*/
Enabled,
};

/**
* @brief Audiences available for blob service
*
Expand Down Expand Up @@ -287,6 +374,50 @@ namespace Azure { namespace Storage { namespace Blobs {
* @brief Optional. Configures whether to do content validation for blob downloads.
*/
Azure::Nullable<TransferValidationOptions> DownloadValidationOptions;

/**
* @brief Configures persisted session authentication.
*/
Blobs::SessionOptions Session;
};

/**
* @brief Base type for providers that own and cache persisted sessions.
*
* Session providers can be shared by multiple clients through #SessionOptions::Provider.
* Use #ContainerSessionProvider for TokenCredential-based session authentication.
*/
class SessionProvider {
public:
virtual ~SessionProvider();

private:
friend class ContainerSessionProvider;
friend class _detail::SessionAuthenticationPolicy;

SessionProvider();

std::shared_ptr<_detail::TokenCredentialSessionProvider> m_provider;
};

/**
* @brief Creates and caches container-scoped sessions using a TokenCredential.
*/
class ContainerSessionProvider final : public SessionProvider {
public:
/**
* @brief Creates a provider backed by a TokenCredential.
*
* @param serviceUrl The Blob service URL.
* @param credential The credential used to create sessions.
* @param options Client options used by Create Session requests.
*/
ContainerSessionProvider(
const std::string& serviceUrl,
std::shared_ptr<const Azure::Core::Credentials::TokenCredential> credential,
const BlobClientOptions& options);

~ContainerSessionProvider() override;
};

/**
Expand Down Expand Up @@ -478,7 +609,7 @@ namespace Azure { namespace Storage { namespace Blobs {
enum class StorageResponseFormat
{
/**
* @brief Let the service choose the response format (default).
* @brief Use the default response format, which is currently Apache Arrow.
*/
Auto,
/**
Expand Down Expand Up @@ -801,6 +932,14 @@ namespace Azure { namespace Storage { namespace Blobs {
* @brief Optional. Configures whether to do content validation for blob downloads.
*/
Azure::Nullable<TransferValidationOptions> ValidationOptions;

/**
* @brief Optional. The layout endpoint to use for this download.
*
* When set, the request is sent to this endpoint while preserving the client endpoint in the
* Host header.
*/
std::string LayoutEndpoint;
};

/**
Expand All @@ -823,7 +962,7 @@ namespace Azure { namespace Storage { namespace Blobs {
* downloaded in a single request. Blobs larger than this limit will continue being downloaded
* in chunks of size ChunkSize.
*/
int64_t InitialChunkSize = 256 * 1024 * 1024;
int64_t InitialChunkSize = 4 * 1024 * 1024;

/**
* @brief The maximum number of bytes in a single request.
Expand All @@ -840,6 +979,12 @@ namespace Azure { namespace Storage { namespace Blobs {
* @brief Optional. Configures whether to do content validation for blob downloads.
*/
Azure::Nullable<TransferValidationOptions> ValidationOptions;

/**
* @brief Determines whether locality-aware routing is used for the parallel range requests.
* Disabled by default.
*/
Blobs::LayoutAwareRouting LayoutAwareRouting = Blobs::LayoutAwareRouting::Disabled;
};

/**
Expand Down Expand Up @@ -1069,7 +1214,7 @@ namespace Azure { namespace Storage { namespace Blobs {
* @brief Blob smaller than this will be uploaded with a single upload operation. This value
* cannot be larger than 5000 MiB.
*/
int64_t SingleUploadThreshold = 256 * 1024 * 1024;
int64_t SingleUploadThreshold = 4 * 1024 * 1024;

/**
* @brief The maximum number of bytes in a single request. This value cannot be larger than
Expand Down Expand Up @@ -1812,6 +1957,27 @@ namespace Azure { namespace Storage { namespace Blobs {
{
};

/**
* @brief Optional parameters for #Azure::Storage::Blobs::BlobClient::GetLayout.
*/
struct GetBlobLayoutOptions final
{
/**
* @brief The range of bytes for which to retrieve the layout.
*/
Azure::Nullable<Core::Http::HttpRange> Range;

/**
* @brief The continuation token for retrieving the next page.
*/
Azure::Nullable<std::string> ContinuationToken;

/**
* @brief Access conditions for the operation.
*/
BlobAccessConditions AccessConditions;
};

namespace _detail {
inline std::string TagsToString(const std::map<std::string, std::string>& tags)
{
Expand Down
Loading
Loading