Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STG 79 80 81 Features #3850

Merged
merged 9 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
9 changes: 9 additions & 0 deletions sdk/storage/azure-storage-blobs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@

### Features Added

- Bumped up API version to `2021-04-10`.
- Added support for encryption scope SAS (`ses` query parameter in SAS token).
- Added encryption scope support for `BlobClient::CopyFromUri()`.
- Added support for filtering blobs on container level.
- Added support for tags copy mode (replace or copy from source) when copying blobs from URL.
- Added support for permanent delete permission in SAS.

### Breaking Changes

### Bugs Fixed

- Fixed listing blobs failure when blob name contains invalid characters in xml.
Jinming-Hu marked this conversation as resolved.
Show resolved Hide resolved

### Other Changes

## 12.5.0-beta.2 (2022-07-07)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,24 @@ namespace Azure { namespace Storage { namespace Blobs {
const UploadBlockBlobOptions& options = UploadBlockBlobOptions(),
const Azure::Core::Context& context = Azure::Core::Context()) const;

/**
* @brief The Filter Blobs operation enables callers to list blobs in a container whose
* tags match a given search expression.
*
* @param tagFilterSqlExpression The 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
Jinming-Hu marked this conversation as resolved.
Show resolved Hide resolved
* for the value of the where query parameter, however, only a subset of the OData filter syntax
* is supported in the Blob service.
* @param options Optional parameters to execute this function.
* @param context Context for cancelling long running operations.
* @return A FindBlobsByTagsPagedResponse describing the blobs.
*/
FindBlobsByTagsPagedResponse FindBlobsByTags(
const std::string& tagFilterSqlExpression,
const FindBlobsByTagsOptions& options = FindBlobsByTagsOptions(),
const Azure::Core::Context& context = Azure::Core::Context()) const;

/**
* @brief Creates a new batch object to collect subrequests that can be submitted together via
* SubmitBatch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,12 @@ namespace Azure { namespace Storage { namespace Blobs {
* Indicates whether the destination blob has a legal hold.
*/
Azure::Nullable<bool> HasLegalHold;

/**
* Indicates the tags on the destination blob should be copied from source or replaced by Tags
* in this option. Default is to replace.
*/
Models::BlobCopySourceTagsMode CopySourceTagsMode;
};

/**
Expand Down Expand Up @@ -932,6 +938,12 @@ namespace Azure { namespace Storage { namespace Blobs {
* If the two hashes do not match, the operation will fail.
*/
Azure::Nullable<ContentHash> TransactionalContentHash;

/**
* Indicates the tags on the destination blob should be copied from source or replaced by Tags
* in this option. Default is to replace.
*/
Models::BlobCopySourceTagsMode CopySourceTagsMode;
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,49 @@ namespace Azure { namespace Storage {
std::string LeaseId;
};

/**
* @brief An Azure Storage blob.
*/
struct BlobItem final
{
/**
* Blob name.
*/
std::string Name;
/**
* Indicates whether this blob was deleted.
*/
bool IsDeleted = bool();
Jinming-Hu marked this conversation as resolved.
Show resolved Hide resolved
/**
* A string value that uniquely identifies a blob snapshot.
*/
std::string Snapshot;
/**
* A string value that uniquely identifies a blob version.
*/
Nullable<std::string> VersionId;
/**
* Indicates if this is the current version of the blob.
*/
Nullable<bool> IsCurrentVersion;
/**
* Properties of a blob.
*/
BlobItemDetails Details;
/**
* Indicates that this root blob has been deleted, but it has versions that are active.
*/
Nullable<bool> HasVersionsOnly;
/**
* Size in bytes.
*/
int64_t BlobSize = int64_t();
Jinming-Hu marked this conversation as resolved.
Show resolved Hide resolved
/**
* Type of the blob.
*/
Models::BlobType BlobType;
};

/**
* @brief Response type for #Azure::Storage::Blobs::BlobBatchClient::SubmitBatch.
*/
Expand Down Expand Up @@ -267,10 +310,12 @@ namespace Azure { namespace Storage {
void OnNextPage(const Azure::Core::Context& context);

std::shared_ptr<BlobServiceClient> m_blobServiceClient;
std::shared_ptr<BlobContainerClient> m_blobContainerClient;
FindBlobsByTagsOptions m_operationOptions;
std::string m_tagFilterSqlExpression;

friend class BlobServiceClient;
friend class BlobContainerClient;
friend class Azure::Core::PagedResponse<FindBlobsByTagsPagedResponse>;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ namespace Azure { namespace Storage { namespace Sas {
*/
SetImmutabilityPolicy = 256,
Jinming-Hu marked this conversation as resolved.
Show resolved Hide resolved

/**
* @brief Indicates that permanent delete is permitted.
*/
PermanentDelete = 512,

/**
* @brief Indicates that all permissions are set.
*/
Expand Down Expand Up @@ -160,6 +165,11 @@ namespace Azure { namespace Storage { namespace Sas {
*/
SetImmutabilityPolicy = 128,

/**
* @brief Indicates that permanent delete is permitted.
*/
PermanentDelete = 256,

/**
* @brief Indicates that all permissions are set.
*/
Expand Down Expand Up @@ -269,6 +279,11 @@ namespace Azure { namespace Storage { namespace Sas {
*/
std::string ContentType;

/**
* @brief Optional encryption scope to use when sending requests authorized with this SAS url.
*/
std::string EncryptionScope;

/**
* @brief Sets the permissions for the blob container SAS.
*
Expand Down
Loading