microsoft / microsoft/fabric-cli
[FEATURE] [SQL database] Add properties.backupRetentionDays setter for SQLDatabase items
Open
@HasanAboShally is already working on this.
Since Feb 2, 2026.
blocked
enhancement
- Dominant language
- Python
- Stars
- 173
- Forks
- 63
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 4
Description
Use Case / Problem
Fabric CLI can read (get) SQL database properties, but cannot update backup retention via CLI. Teams managing multiple environments (dev/test/prod) need to standardize and automate retention settings (e.g., 7/14/21/35 days) without manual portal steps.
Proposed Solution
Add support for setting properties.backupRetentionDays on *.SQLDatabase items using the existing set command pattern (property path via -q, input via -i).
Sample command:
set <DBname>.SQLDatabase -q "properties.backupRetentionDays" -i 21
Expected behavior:
- Validate input is an integer and within the service-allowed range (fail with a clear error if not).
- Confirm the updated value in the command output (or return the updated resource payload).
Alternatives Considered
- Manually updating retention in the Fabric UI (not automatable and leads to configuration drift).
Impact Assessment
- This aligns with Microsoft Fabric roadmap items
Implementation Attestation
- I understand this feature should maintain backward compatibility with existing commands
- I confirm this feature request does not introduce performance regressions for existing workflows
- I acknowledge that new features must follow fabric-cli's established patterns and conventions
Implementation Notes
This should mirror existing property updates already supported by set for other item types.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.