Skip to content

Commit d90fb78

Browse files
microzchangEmmaZhuCopilot
authored
Storage STG100 Release (#6836)
* Storage/STG100 Protocol Layer Changes (#6695) * STG100 Protocl Layer Changes * Fix docs * Principal Bound Delegation Sas and TQF (#6699) * Principal Bound Delegation Sas and TQF * Disable test cases * Fix test cases * Fix cspell * Fix docs * Fix clang * Drop DataLake changes (#6704) * Feature support for EnableDirectoryLease and EncryptionInTransit (#6709) * Storage STG100/Create File with Content (#6713) * Create File with content * Update test record * Add feature for startFrom/beginFrom (#6708) * Add test case for list blob with startFrom (#6736) * Add test case for list blob with startFrom * Format * Remove ShareLease feature (#6833) * Update Swagger and account sas version. * Update sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp Fix typo Co-authored-by: Copilot <[email protected]> * Update sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_sas_builder.hpp Co-authored-by: Copilot <[email protected]> * Update sdk/storage/azure-storage-files-shares/CHANGELOG.md Co-authored-by: Copilot <[email protected]> * Update sdk/storage/azure-storage-files-shares/inc/azure/storage/files/shares/share_sas_builder.hpp Co-authored-by: Copilot <[email protected]> * Fix typo --------- Co-authored-by: EmmaZhu-MSFT <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 252cc30 commit d90fb78

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2626
-209
lines changed

sdk/storage/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "cpp",
44
"TagPrefix": "cpp/storage",
5-
"Tag": "cpp/storage_7f9ca72801"
5+
"Tag": "cpp/storage_d6a62566ee"
66
}

sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_options.hpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,11 @@ namespace Azure { namespace Storage { namespace Blobs {
421421
* @brief Specifies one or more datasets to include in the response.
422422
*/
423423
Models::ListBlobsIncludeFlags Include = Models::ListBlobsIncludeFlags::None;
424+
425+
/**
426+
* @brief Specifies the relative path to list paths from.
427+
*/
428+
Azure::Nullable<std::string> StartFrom;
424429
};
425430

426431
/**
@@ -828,7 +833,10 @@ namespace Azure { namespace Storage { namespace Blobs {
828833
*/
829834
struct SetBlobTagsOptions final
830835
{
831-
struct : public LeaseAccessConditions, public TagAccessConditions
836+
struct : public Azure::ModifiedConditions,
837+
public Azure::MatchConditions,
838+
public LeaseAccessConditions,
839+
public TagAccessConditions
832840
{
833841
} /**
834842
* @brief Optional conditions that must be met to perform this operation.
@@ -841,7 +849,10 @@ namespace Azure { namespace Storage { namespace Blobs {
841849
*/
842850
struct GetBlobTagsOptions final
843851
{
844-
struct : public LeaseAccessConditions, public TagAccessConditions
852+
struct : public Azure::ModifiedConditions,
853+
public Azure::MatchConditions,
854+
public LeaseAccessConditions,
855+
public TagAccessConditions
845856
{
846857
} /**
847858
* @brief Optional conditions that must be met to perform this operation.

sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,14 @@ namespace Azure { namespace Storage { namespace Sas {
254254
*/
255255
BlobSasResource Resource;
256256

257+
/**
258+
* @brief Beginning in version 2025-07-05, this value specifies the Entra ID of the user who
259+
* is authorized to use the resulting SAS URL. The resulting SAS URL must be used in
260+
* conjunction with an Entra ID token that has been issued to the user specified in this value.
261+
* Only supported by User Delegation SAS.
262+
*/
263+
std::string DelegatedUserObjectId;
264+
257265
/**
258266
* @brief Override the value returned for Cache-Control response header..
259267
*/

sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace Azure { namespace Storage { namespace Blobs {
3232
/**
3333
* The version used for the operations to Azure storage services.
3434
*/
35-
constexpr static const char* ApiVersion = "2025-07-05";
35+
constexpr static const char* ApiVersion = "2026-02-06";
3636
} // namespace _detail
3737
namespace Models {
3838
/**
@@ -1756,8 +1756,8 @@ namespace Azure { namespace Storage { namespace Blobs {
17561756
/**
17571757
* The tier of page blob on a premium storage account or tier of block blob on blob storage
17581758
* LRS accounts. For a list of allowed premium page blob tiers, see
1759-
* https://docs.microsoft.com/en-us/azure/virtual-machines/windows/premium-storage#features.
1760-
* For blob storage LRS accounts, valid values are Hot/Cool/Archive.
1759+
* https://learn.microsoft.com/azure/virtual-machines/disks-types#premium-ssd. For blob
1760+
* storage LRS accounts, valid values are Hot/Cool/Archive.
17611761
*/
17621762
Nullable<Models::AccessTier> AccessTier;
17631763
/**
@@ -3474,6 +3474,7 @@ namespace Azure { namespace Storage { namespace Blobs {
34743474
Nullable<std::string> Marker;
34753475
Nullable<std::int32_t> MaxResults;
34763476
Nullable<Models::ListBlobsIncludeFlags> Include;
3477+
Nullable<std::string> StartFrom;
34773478
};
34783479
static Response<Models::_detail::ListBlobsResult> ListBlobs(
34793480
Core::Http::_internal::HttpPipeline& pipeline,
@@ -3487,6 +3488,7 @@ namespace Azure { namespace Storage { namespace Blobs {
34873488
Nullable<std::string> Marker;
34883489
Nullable<std::int32_t> MaxResults;
34893490
Nullable<Models::ListBlobsIncludeFlags> Include;
3491+
Nullable<std::string> StartFrom;
34903492
Nullable<std::string> ShowOnly;
34913493
};
34923494
static Response<Models::_detail::ListBlobsByHierarchyResult> ListBlobsByHierarchy(
@@ -3859,6 +3861,10 @@ namespace Azure { namespace Storage { namespace Blobs {
38593861
Nullable<std::string> VersionId;
38603862
Nullable<std::string> IfTags;
38613863
Nullable<std::string> LeaseId;
3864+
Nullable<DateTime> IfModifiedSince;
3865+
Nullable<DateTime> IfUnmodifiedSince;
3866+
ETag IfMatch;
3867+
ETag IfNoneMatch;
38623868
};
38633869
static Response<std::map<std::string, std::string>> GetTags(
38643870
Core::Http::_internal::HttpPipeline& pipeline,
@@ -3873,6 +3879,10 @@ namespace Azure { namespace Storage { namespace Blobs {
38733879
Nullable<std::vector<std::uint8_t>> TransactionalContentCrc64;
38743880
Nullable<std::string> IfTags;
38753881
Nullable<std::string> LeaseId;
3882+
Nullable<DateTime> IfModifiedSince;
3883+
Nullable<DateTime> IfUnmodifiedSince;
3884+
ETag IfMatch;
3885+
ETag IfNoneMatch;
38763886
};
38773887
static Response<Models::SetBlobTagsResult> SetTags(
38783888
Core::Http::_internal::HttpPipeline& pipeline,

sdk/storage/azure-storage-blobs/src/blob_client.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,10 @@ namespace Azure { namespace Storage { namespace Blobs {
849849
protocolLayerOptions.Tags = std::move(tags);
850850
protocolLayerOptions.IfTags = options.AccessConditions.TagConditions;
851851
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
852+
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
853+
protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch;
854+
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
855+
protocolLayerOptions.IfUnmodifiedSince = options.AccessConditions.IfUnmodifiedSince;
852856
return _detail::BlobClient::SetTags(*m_pipeline, m_blobUrl, protocolLayerOptions, context);
853857
}
854858

@@ -859,6 +863,10 @@ namespace Azure { namespace Storage { namespace Blobs {
859863
_detail::BlobClient::GetBlobTagsOptions protocolLayerOptions;
860864
protocolLayerOptions.IfTags = options.AccessConditions.TagConditions;
861865
protocolLayerOptions.LeaseId = options.AccessConditions.LeaseId;
866+
protocolLayerOptions.IfMatch = options.AccessConditions.IfMatch;
867+
protocolLayerOptions.IfNoneMatch = options.AccessConditions.IfNoneMatch;
868+
protocolLayerOptions.IfModifiedSince = options.AccessConditions.IfModifiedSince;
869+
protocolLayerOptions.IfUnmodifiedSince = options.AccessConditions.IfUnmodifiedSince;
862870
return _detail::BlobClient::GetTags(
863871
*m_pipeline, m_blobUrl, protocolLayerOptions, _internal::WithReplicaStatus(context));
864872
}

sdk/storage/azure-storage-blobs/src/blob_container_client.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ namespace Azure { namespace Storage { namespace Blobs {
349349
protocolLayerOptions.Marker = options.ContinuationToken;
350350
protocolLayerOptions.MaxResults = options.PageSizeHint;
351351
protocolLayerOptions.Include = options.Include;
352+
protocolLayerOptions.StartFrom = options.StartFrom;
352353
auto response = _detail::BlobContainerClient::ListBlobs(
353354
*m_pipeline,
354355
m_blobContainerUrl,
@@ -383,6 +384,7 @@ namespace Azure { namespace Storage { namespace Blobs {
383384
protocolLayerOptions.Marker = options.ContinuationToken;
384385
protocolLayerOptions.MaxResults = options.PageSizeHint;
385386
protocolLayerOptions.Include = options.Include;
387+
protocolLayerOptions.StartFrom = options.StartFrom;
386388
auto response = _detail::BlobContainerClient::ListBlobsByHierarchy(
387389
*m_pipeline,
388390
m_blobContainerUrl,

sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <azure/core/http/http.hpp>
77
#include <azure/storage/common/crypt.hpp>
88

9-
/* cSpell:ignore rscc, rscd, rsce, rscl, rsct, skoid, sktid */
9+
/* cSpell:ignore rscc, rscd, rsce, rscl, rsct, skoid, sktid, sduoid */
1010

1111
namespace Azure { namespace Storage { namespace Sas {
1212

@@ -261,10 +261,10 @@ namespace Azure { namespace Storage { namespace Sas {
261261
+ canonicalName + "\n" + userDelegationKey.SignedObjectId + "\n"
262262
+ userDelegationKey.SignedTenantId + "\n" + signedStartsOnStr + "\n" + signedExpiresOnStr
263263
+ "\n" + userDelegationKey.SignedService + "\n" + userDelegationKey.SignedVersion
264-
+ "\n\n\n\n\n\n" + (IPRange.HasValue() ? IPRange.Value() : "") + "\n" + protocol + "\n"
265-
+ SasVersion + "\n" + resource + "\n" + snapshotVersion + "\n" + EncryptionScope + "\n"
266-
+ CacheControl + "\n" + ContentDisposition + "\n" + ContentEncoding + "\n" + ContentLanguage
267-
+ "\n" + ContentType;
264+
+ "\n\n\n\n\n" + DelegatedUserObjectId + "\n" + (IPRange.HasValue() ? IPRange.Value() : "")
265+
+ "\n" + protocol + "\n" + SasVersion + "\n" + resource + "\n" + snapshotVersion + "\n"
266+
+ EncryptionScope + "\n" + CacheControl + "\n" + ContentDisposition + "\n" + ContentEncoding
267+
+ "\n" + ContentLanguage + "\n" + ContentType;
268268

269269
std::string signature = Azure::Core::Convert::Base64Encode(_internal::HmacSha256(
270270
std::vector<uint8_t>(stringToSign.begin(), stringToSign.end()),
@@ -294,6 +294,11 @@ namespace Azure { namespace Storage { namespace Sas {
294294
"sks", _internal::UrlEncodeQueryParameter(userDelegationKey.SignedService));
295295
builder.AppendQueryParameter(
296296
"skv", _internal::UrlEncodeQueryParameter(userDelegationKey.SignedVersion));
297+
if (!DelegatedUserObjectId.empty())
298+
{
299+
builder.AppendQueryParameter(
300+
"sduoid", _internal::UrlEncodeQueryParameter(DelegatedUserObjectId));
301+
}
297302
if (!CacheControl.empty())
298303
{
299304
builder.AppendQueryParameter("rscc", _internal::UrlEncodeQueryParameter(CacheControl));
@@ -397,7 +402,7 @@ namespace Azure { namespace Storage { namespace Sas {
397402
return Permissions + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" + canonicalName + "\n"
398403
+ userDelegationKey.SignedObjectId + "\n" + userDelegationKey.SignedTenantId + "\n"
399404
+ signedStartsOnStr + "\n" + signedExpiresOnStr + "\n" + userDelegationKey.SignedService
400-
+ "\n" + userDelegationKey.SignedVersion + "\n\n\n\n\n\n"
405+
+ "\n" + userDelegationKey.SignedVersion + "\n\n\n\n\n" + DelegatedUserObjectId + "\n"
401406
+ (IPRange.HasValue() ? IPRange.Value() : "") + "\n" + protocol + "\n" + SasVersion + "\n"
402407
+ resource + "\n" + snapshotVersion + "\n" + EncryptionScope + "\n" + CacheControl + "\n"
403408
+ ContentDisposition + "\n" + ContentEncoding + "\n" + ContentLanguage + "\n" + ContentType;

0 commit comments

Comments
 (0)