You are implementing a data retention solution for a high-throughput microservices logging platform that writes log blobs to an Azure Storage account named telemetrydata. The account is provisioned as a Premium Block Blobs storage account. You need to configure a lifecycle management policy to automate the following requirements:
- Automatically delete block blobs 14 days after modification if they have a blob index tag named Environment set to Staging.
- Automatically transition block blobs to the Cool tier 30 days after modification if they have a blob index tag named Environment set to Production, and delete them after 90 days.
Which of the following actions should you take to achieve these requirements?
- Change the storage account type to Standard General Purpose v2 (GPv2), and then deploy a lifecycle policy that filters blobs using blobIndexMatch for the Environment tag, applying delete to the staging blobs and both tierToCool and delete to the production blobs.Answer
- BDeploy the lifecycle policy directly to the Premium Block Blobs account, and filter the blobs using a metadataMatch rule that targets the case-sensitive x-ms-meta-Environment metadata header.
- CDeploy the lifecycle policy directly to the Premium Block Blobs account, and include a leaseState filter set to available under the policy filters block to prevent execution conflicts on leased blobs.
- DChange the storage account type to Standard General Purpose v2 (GPv2), and deploy a lifecycle policy that includes a security block containing a Shared Access Signature (SAS) token configured with write and delete permissions.
Answer
Change the storage account type to Standard General Purpose v2 (GPv2), and then deploy a lifecycle policy that filters blobs using blobIndexMatch for the Environment tag, applying delete to the staging blobs and both tierToCool and delete to the production blobs.
To support the tiering action (moving production blobs to the Cool tier), the storage account must be of a type that supports access tiers, such as Standard General Purpose v2 (GPv2). Premium Block Blobs storage accounts only support the delete action in lifecycle policies. Furthermore, blob index tags are filtered using the blobIndexMatch property in the policy rule filters.
Step-by-Step Solution
Key Concept
Azure Blob Storage Lifecycle Management policy execution, account type support, and tag-based filtering.