Soru

Zorluk: OrtaImplement Azure Blob Storage Lifecycle Management and Retention Policies

You are designing an Azure Blob Storage lifecycle management policy for a Standard General Purpose v2 (GPv2) storage account. The policy must automatically transition block blobs to the Cool tier if they have not been modified for 30 days. Additionally, the policy must only apply to blobs that have been tagged with a Blob Index tag where the key is `ArchiveStatus` and the value is `Ready`.

Which of the following JSON policy definitions should you use?

  1. {
    "rules": [
    {
    "enabled": true,
    "name": "move-to-cool",
    "type": "Lifecycle",
    "definition": {
    "actions": {
    "baseBlob": {
    "tierToCool": {
    "daysAfterModificationGreaterThan": 30
    }
    }
    },
    "filters": {
    "blobTypes": [ "blockBlob" ],
    "blobIndexMatch": [
    {
    "name": "ArchiveStatus",
    "op": "==",
    "value": "Ready"
    }
    ]
    }
    }
    }
    ]
    }
    Cevap
  2. B
    {
    "rules": [
    {
    "enabled": true,
    "name": "move-to-cool",
    "type": "Lifecycle",
    "definition": {
    "actions": {
    "baseBlob": {
    "tierToCool": {
    "daysAfterModificationGreaterThan": 30
    }
    }
    },
    "filters": {
    "blobTypes": [ "blockBlob" ],
    "blobIndexMatch": [
    {
    "Name": "ArchiveStatus",
    "Op": "==",
    "Value": "Ready"
    }
    ]
    }
    }
    }
    ]
    }
  3. C
    {
    "rules": [
    {
    "enabled": true,
    "name": "move-to-cool",
    "type": "Lifecycle",
    "definition": {
    "actions": {
    "baseBlob": {
    "tierToCool": {
    "daysAfterModificationGreaterThan": 30
    }
    }
    },
    "filters": {
    "blobTypes": [ "blockBlob" ],
    "blobIndexMatch": [
    {
    "name": "ArchiveStatus",
    "op": "==",
    "value": "Ready"
    }
    ]
    },
    "leaseAction": "ignoreActiveLease"
    }
    }
    ]
    }
  4. D
    {
    "rules": [
    {
    "enabled": true,
    "name": "move-to-cool",
    "type": "Lifecycle",
    "definition": {
    "actions": {
    "baseBlob": {
    "tierToCool": {
    "daysAfterModificationGreaterThan": 30
    }
    }
    },
    "filters": {
    "blobTypes": [ "blockBlob" ],
    "blobIndexMatch": [
    {
    "name": "ArchiveStatus",
    "op": "==",
    "value": "Ready"
    }
    ],
    "sasTokenScope": "rwd"
    }
    }
    }
    ]
    }

Cevap

The correct JSON policy definition uses lowercase keys for the 'blobIndexMatch' array ('name', 'op', 'value') and defines the tiering transition using 'daysAfterModificationGreaterThan' inside the 'baseBlob' actions of a Standard GPv2 storage account lifecycle policy.
The correct JSON policy matches the required schema syntax for Standard GPv2 storage accounts. It correctly specifies the transition action using 'daysAfterModificationGreaterThan' and formats the filter using 'blobIndexMatch' with lowercase property keys ('name', 'op', 'value').

Adım Adım Çözüm

1
Analyze the action requirements.
Transition block blobs to Cool tier after 30 days of no modifications.
This corresponds to 'actions' -> 'baseBlob' -> 'tierToCool' -> 'daysAfterModificationGreaterThan': 30.
2
Analyze the filter requirements.
Only match block blobs tagged with ArchiveStatus = Ready using Blob Index tags.
This corresponds to 'filters' -> 'blobTypes': ['blockBlob'] and 'blobIndexMatch': [{'name': 'ArchiveStatus', 'op': '==', 'value': 'Ready'}].
3
Verify schema casing and extra parameters.
Keys within the 'blobIndexMatch' filter must be lowercase ('name', 'op', 'value'). No administrative parameters like 'leaseAction' or 'sasTokenScope' are supported in the lifecycle schema.
Ensures the policy passes ARM template and storage API schema validation.

Anahtar Kavram

Azure Blob Storage lifecycle management schema validation rules, specifically focusing on the case sensitivity of Blob Index tag filter keys ('name', 'op', 'value') and the exclusion of lease/security token attributes.
Tahmini Süre:1m 30s
Bu soruyu puanla