Skip to content

Conversation

@vincenttran-msft
Copy link
Member

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

SetAccessPolicy: Completely NULLED
GetAccessPolicy:

/// * date() - Date REMOVED
/// * last_modified() - Last-Modified
/// * etag() - etag
/// * access() - x-ms-blob-public-access

  • Changelog entry

@github-actions github-actions bot added the Storage Storage Service (Queues, Blobs, Files) label Nov 7, 2025
@vincenttran-msft vincenttran-msft changed the title [Storage] sgap [Storage] set/get_access_policy for ContainerClient Nov 7, 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 marked this pull request as ready for review November 15, 2025 01:17
Copilot AI review requested due to automatic review settings November 15, 2025 01:17
Copilot finished reviewing on behalf of vincenttran-msft November 15, 2025 01:21
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 support for setting and getting access policies on blob containers, allowing control over public access to container data. The implementation follows Azure Storage's access policy model using signed identifiers.

Key Changes

  • Added set_access_policy() and get_access_policy() methods to BlobContainerClient
  • Changed AccessPolicy date fields from OffsetDateTime to String to support custom formatting with exactly 7 decimal precision
  • Changed BlobTags to HashMap<String, String> conversion from TryFrom to From (breaking change)

Reviewed Changes

Copilot reviewed 11 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdk/storage/azure_storage_blob/tsp-location.yaml Updated TypeSpec commit reference
sdk/storage/azure_storage_blob/tests/blob_container_client.rs Added comprehensive test for access policy set/get operations
sdk/storage/azure_storage_blob/tests/blob_client.rs Updated blob tags test to use into() instead of try_into()
sdk/storage/azure_storage_blob/src/parsers.rs Added format_storage_datetime() helper function for RFC3339 formatting with 7 decimal places
sdk/storage/azure_storage_blob/src/models/mod.rs Added exports for new types: AccessPolicy, SignedIdentifiers, SignedIdentifiersHeaders, and related options
sdk/storage/azure_storage_blob/src/models/extensions.rs Changed BlobTags to HashMap conversion from TryFrom to From; added HashMap<String, AccessPolicy> to SignedIdentifiers conversion
sdk/storage/azure_storage_blob/src/generated/models/pub_models.rs Updated generated models: AccessPolicy fields changed to String, removed BlobContainerClientSetAccessPolicyResult, added SignedIdentifiers struct
sdk/storage/azure_storage_blob/src/generated/models/models_impl.rs Added TryFrom implementation for SignedIdentifiers to RequestContent
sdk/storage/azure_storage_blob/src/generated/models/header_traits.rs Removed BlobContainerClientSetAccessPolicyResultHeaders trait, added SignedIdentifiersHeaders trait, updated response types
sdk/storage/azure_storage_blob/src/generated/clients/blob_container_client.rs Updated generated client: get_access_policy() returns SignedIdentifiers, set_access_policy() returns unit type
sdk/storage/azure_storage_blob/src/clients/blob_container_client.rs Added public wrapper methods for set_access_policy() and get_access_policy() with documentation
sdk/storage/azure_storage_blob/assets.json Updated test assets tag
sdk/storage/azure_storage_blob/Cargo.toml Added time workspace dependency
sdk/storage/azure_storage_blob/CHANGELOG.md Added changelog entries for new features and breaking changes
sdk/storage/.dict.txt Added "subsecond" to dictionary
Cargo.lock Updated dependencies including include-file version bump and added time to azure_storage_blob

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.

2 participants