Skip to content

Conversation

@vincenttran-msft
Copy link
Member

@vincenttran-msft vincenttran-msft commented Nov 12, 2025

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Nov 12, 2025
@github-actions
Copy link

github-actions bot commented Nov 12, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure_storage_blob

@vincenttran-msft vincenttran-msft changed the title [Storage] get/set_immutability_policy for BlobClient [Storage] delete/set_immutability_policy for BlobClient Nov 14, 2025
…to fix up legal hold to point to versioned as well + get bicep updated to work
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds set_immutability_policy and delete_immutability_policy methods to BlobClient, enabling the management of immutability policies on blobs. It also introduces a mechanism to specify storage account types for testing, distinguishing between standard and versioned accounts.

Key changes include:

  • Addition of new immutability policy methods to BlobClient with expiry as a required parameter
  • Consolidation of BlobImmutabilityPolicyMode and ImmutabilityPolicyMode enums into a single ImmutabilityPolicyMode enum with lowercase string representation
  • Implementation of thread-local storage account selection for test helper functions

Reviewed changes

Copilot reviewed 6 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
sdk/storage/azure_storage_blob_test/src/lib.rs Adds StorageAccount enum and thread-local storage to allow tests to specify which storage account to use
sdk/storage/azure_storage_blob/tsp-location.yaml Updates TypeSpec commit reference to reflect the new API specification
sdk/storage/azure_storage_blob/tests/blob_client.rs Adds comprehensive test for immutability policy set/delete operations using versioned storage account
sdk/storage/azure_storage_blob/src/models/mod.rs Updates model exports to include new options and remove deprecated types
sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs Renames BlobImmutabilityPolicyMode to ImmutabilityPolicyMode and removes unused result types
sdk/storage/azure_storage_blob/src/generated/models/method_options.rs Removes immutability_policy_expiry field from options (moved to required parameter)
sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs Updates header trait methods to use unified ImmutabilityPolicyMode enum and removes obsolete result headers
sdk/storage/azure_storage_blob/src/generated/models/enums_serde.rs Removes serialization for deprecated BlobImmutabilityPolicyMode enum
sdk/storage/azure_storage_blob/src/generated/models/enums_impl.rs Removes BlobImmutabilityPolicyMode implementations and adds Mutable variant to ImmutabilityPolicyMode with lowercase string representation
sdk/storage/azure_storage_blob/src/generated/models/enums.rs Removes BlobImmutabilityPolicyMode and enhances ImmutabilityPolicyMode with Mutable variant
sdk/storage/azure_storage_blob/src/generated/clients/blob_client.rs Updates method signatures to accept expiry as required parameter and returns Response<(), NoFormat> instead of custom result types
sdk/storage/azure_storage_blob/src/clients/blob_client.rs Exposes new public API methods for setting and deleting immutability policies
sdk/storage/azure_storage_blob/assets.json Updates test assets tag to include new test recordings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants