Soru

Zorluk: KolayManage Properties, Metadata, and Access Tiers for Azure Blob Storage

You are writing a .NET application to update the custom metadata of an Azure Blob Storage blob. The blob currently has an active exclusive-write lease.

Which of the following is required to successfully update the blob's metadata?

  1. A
    Prefix the metadata keys with `x-ms-meta-` inside the SDK's metadata dictionary.
  2. B
    Submit the update without a lease ID, as leases only protect the blob's binary content from deletion.
  3. Provide the active lease ID in the request conditions.Cevap
  4. D
    Use a long-lived account-level SAS token with full administrative permissions to bypass the lease.

Cevap

Providing the active lease ID in the request conditions is required to update the metadata of a leased blob.
Updating metadata is a write operation. When a blob is leased, any write operation must include the active lease ID. Passing this ID in the request conditions allows the storage service to verify ownership of the lock and permit the metadata change.

Adım Adım Çözüm

1
Identify that updating metadata is a write operation on the blob.
Recognize that metadata operations are subject to the same concurrency controls as content updates.
This establishes that any active locks on the blob will affect the metadata update request.
2
Check the lease status of the blob.
Identify that the blob has an active exclusive-write lease.
An active lease prevents any modifications unless the correct lease ID is supplied.
3
Include the active lease ID in the request parameters when calling the update method.
The SDK attaches the lease ID to the request headers, allowing the update to proceed.
This satisfies the lease precondition and prevents a Precondition Failed (HTTP 412) error.

Anahtar Kavram

Writing or modifying a leased blob's properties or metadata requires specifying the active lease ID in the request.
Bu soruyu puanla