Skip to content

Commit 881765f

Browse files
committed
Add prompt
1 parent 1579dc1 commit 881765f

File tree

1 file changed

+6
-0
lines changed
  • src/azure-cli/azure/cli/command_modules/sql

1 file changed

+6
-0
lines changed

src/azure-cli/azure/cli/command_modules/sql/custom.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3140,6 +3140,12 @@ def update_long_term_retention(
31403140
if time_based_immutability_mode.lower() not in ['unlocked', 'locked']:
31413141
raise CLIError('Invalid value for time-based immutability mode. '
31423142
'Valid values are "unlocked" or "locked".')
3143+
if time_based_immutability_mode.lower() == 'locked':
3144+
if not yes:
3145+
confirmation = prompt_y_n("""Once locked, immutable backups cannot be modified or deleted for the full retention period. There is no extra cost to enable immutability, but standard backup storage charges apply. Note: The logical Azure SQL Server cannot be deleted during the retention period.
3146+
Do you want to proceed?""")
3147+
if not confirmation:
3148+
return
31433149

31443150
kwargs['weekly_retention'] = weekly_retention
31453151

0 commit comments

Comments
 (0)