You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<value>SQL Administrator Credentials are only optional when Azure Active Directory Only Authentication is enabled via -EnableActiveDirectoryOnlyAuthentication.</value>
<value>Changing the service tier to Hyperscale also converts the geo-secondary replica to Hyperscale. For more information, see https://go.microsoft.com/fwlink/?linkid=2314103</value>
Copy file name to clipboardExpand all lines: src/Sql/Sql/Server/Cmdlet/NewAzureSqlServer.cs
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -159,26 +159,20 @@ public class NewAzureSqlServer : AzureSqlServerCmdletBase
159
159
publicGuid?FederatedClientId{get;set;}
160
160
161
161
/// <summary>
162
-
/// Soft-delete retention days for the server
162
+
/// Boolean Value for enabling Soft Delete Retention for server
163
163
/// </summary>
164
164
[Parameter(Mandatory=false,
165
-
HelpMessage="Specifies whether or not soft-delete retention is enabled for the server.")]
165
+
HelpMessage="Specify whether to enable soft-delete retention for the server. When enabled, a dropped server can be restored within the retention window (defaults to 7 days if not specified). To set a custom retention period use -SoftDeleteRetentionDays.")]
HelpMessage="Specifies the soft-delete retention days for the server.")]
172
+
HelpMessage="Specifies the number of days to retain a deleted server for possible restoration. Valid values are 0-35. A value of 0 disables soft-delete retention. If EnableSoftDeleteRetention is set without an explicit value, the default retention is 7 days.")]
173
+
[ValidateRange(0,35)]
173
174
publicint?SoftDeleteRetentionDays{get;set;}
174
175
175
-
/// <summary>
176
-
/// Soft-delete retention days for the server
177
-
/// </summary>
178
-
[Parameter(Mandatory=false,
179
-
HelpMessage="Specifies the create mode for the server, valid values for this parameter are \"Normal\" and \"Restore\".")]
180
-
publicstringCreateMode{get;set;}="Normal";
181
-
182
176
/// <summary>
183
177
/// Overriding to add warning message
184
178
/// </summary>
@@ -194,6 +188,12 @@ public override void ExecuteCmdlet()
Copy file name to clipboardExpand all lines: src/Sql/Sql/Server/Cmdlet/SetAzureSqlServer.cs
+36-6Lines changed: 36 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -126,27 +126,40 @@ public class SetAzureSqlServer : AzureSqlServerCmdletBase
126
126
publicstringIdentityType{get;set;}
127
127
128
128
/// <summary>
129
-
/// Value for soft-delete retention days for the server.
129
+
/// Boolean for enabling Soft Delete Retention for server
130
130
/// </summary>
131
131
[Parameter(Mandatory=false,
132
-
HelpMessage="Boolean value for whether or not to enable soft-delete for the server such that the server can be restored for a default of 7 days after dropping. If you want to specify a different retention period, use the RetentionDays parameter.")]
132
+
HelpMessage="Specify whether to enable soft-delete retention for the server. When enabled, a dropped server can be restored within the retention window (defaults to 7 days if not specified). To set a custom retention period use -SoftDeleteRetentionDays.")]
/// Value for soft-delete retention days for the server.
138
138
/// </summary>
139
139
[Parameter(Mandatory=false,
140
-
HelpMessage="Value for soft-delete retention days for the server such that the server can be restored for the specified number of days after dropping. Only valid values are from 0 to 35. If set to 0, soft-delete retention is disabled.")]
HelpMessage="Specifies the number of days to retain a deleted server for possible restoration. Valid values are 0-35. A value of 0 disables soft-delete retention. If EnableSoftDeleteRetention is set without an explicit value, the default retention is 7 days.")]
141
+
[ValidateRange(0,35)]
142
+
publicint?SoftDeleteRetentionDays{get;set;}
143
143
144
144
/// <summary>
145
145
/// Defines whether it is ok to skip the requesting of rule removal confirmation
146
146
/// </summary>
147
147
[Parameter(HelpMessage="Skip confirmation message for performing the action")]
148
148
publicSwitchParameterForce{get;set;}
149
149
150
+
/// <summary>
151
+
/// Overriding to add warning message
152
+
/// </summary>
153
+
publicoverridevoidExecuteCmdlet()
154
+
{
155
+
// SoftDeleteRetentionDays depends on EnableSoftDeleteRetention; if days are provided but soft-delete is not enabled, fail early.
0 commit comments