Skip to content

Can enable containerDeleteRetentionPolicy without giving retention days #28450

@GaneshMSFT

Description

@GaneshMSFT

Describe the bug

Can run the following command without giving this falg containerDeleteRetentionPolicy.days then the value is set to be null. This value is also accepting 0. That value only accept in the range of 1 to 365.

az storage account blob-service-properties update --set containerDeleteRetentionPolicy.enabled=true --account-name <storageaccountname> --resource-group <resourcegroupname>

Related command

az storage account blob-service-properties update

Errors

No errors

Issue script & Debug output

output.txt

Expected behavior

Command should ask how many retention days I want to set

Environment Summary

azure-cli 2.57.0

core 2.57.0
telemetry 1.1.0

Extensions:
interactive 0.5.3
ssh 1.1.6
storage-preview 0.8.3

Dependencies:
msal 1.26.0
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\ganeshm.azure\cliextensions'

Python (Windows) 3.11.7 (tags/v3.11.7:fa7a6f2, Dec 4 2023, 19:13:08) [MSC v.1937 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamStorageaz storagecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.potential-pruningquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions