Skip to content

Commit 422cd3a

Browse files
committed
Fix static analysis errors
1 parent db84af2 commit 422cd3a

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

src/Sql/Sql/ManagedInstance/Cmdlet/NewAzureSqlManagedInstance.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ public class NewAzureSqlManagedInstance : ManagedInstanceCmdletBase
342342
/// </summary>
343343
[Parameter(Mandatory = false,
344344
HelpMessage = "List of user assigned identities")]
345-
public List<string> UserAssignedIdentities { get; set; }
345+
public List<string> UserAssignedIdentity { get; set; }
346346

347347
/// <summary>
348348
/// Gets or sets whether or not to run this cmdlet in the background as a job
@@ -517,7 +517,7 @@ public override void ExecuteCmdlet()
517517
AdministratorPassword = (this.AdministratorCredential != null) ? this.AdministratorCredential.Password : null,
518518
AdministratorLogin = (this.AdministratorCredential != null) ? this.AdministratorCredential.UserName : null,
519519
Tags = TagsConversionHelper.CreateTagDictionary(Tag, validate: true),
520-
Identity = ResourceIdentityHelper.GetIdentityObjectFromType(this.AssignIdentity.IsPresent ? this.AssignIdentity.ToString() : null, UserAssignedIdentities ?? null),
520+
Identity = ResourceIdentityHelper.GetIdentityObjectFromType(this.AssignIdentity.IsPresent ? this.AssignIdentity.ToString() : null, UserAssignedIdentity ?? null),
521521
LicenseType = this.LicenseType,
522522
// `-StorageSizeInGB 0` as a parameter to this cmdlet means "use default".
523523
// For non-MI database, we can just pass in 0 and the server will treat 0 as default.

src/Sql/Sql/ManagedInstance/Cmdlet/SetAzureSqlManagedInstance.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ public class SetAzureSqlManagedInstance : ManagedInstanceCmdletBase
223223
/// </summary>
224224
[Parameter(Mandatory = false,
225225
HelpMessage = "List of user assigned identities")]
226-
public List<string> UserAssignedIdentities { get; set; }
226+
public List<string> UserAssignedIdentity { get; set; }
227227

228228
/// <summary>
229229
/// Gets or sets whether or not to run this cmdlet in the background as a job
@@ -308,7 +308,7 @@ protected override IEnumerable<AzureSqlManagedInstanceModel> ApplyUserInputToMod
308308
PublicDataEndpointEnabled = this.PublicDataEndpointEnabled,
309309
ProxyOverride = this.ProxyOverride,
310310
Tags = TagsConversionHelper.CreateTagDictionary(Tag, validate: true),
311-
Identity = model.FirstOrDefault().Identity ?? ResourceIdentityHelper.GetIdentityObjectFromType(this.AssignIdentity.IsPresent ? this.AssignIdentity.ToString() : null, UserAssignedIdentities ?? null),
311+
Identity = model.FirstOrDefault().Identity ?? ResourceIdentityHelper.GetIdentityObjectFromType(this.AssignIdentity.IsPresent ? this.AssignIdentity.ToString() : null, UserAssignedIdentity ?? null),
312312
InstancePoolName = this.InstancePoolName,
313313
MinimalTlsVersion = this.MinimalTlsVersion,
314314
MaintenanceConfigurationId = this.MaintenanceConfigurationId,

src/Sql/Sql/Server/Cmdlet/NewAzureSqlServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public class NewAzureSqlServer : AzureSqlServerCmdletBase
108108
/// </summary>
109109
[Parameter(Mandatory = false,
110110
HelpMessage = "List of user assigned identities")]
111-
public List<string> UserAssignedIdentities { get; set; }
111+
public List<string> UserAssignedIdentity { get; set; }
112112

113113
/// <summary>
114114
/// Gets or sets whether or not to run this cmdlet in the background as a job
@@ -205,7 +205,7 @@ public override void ExecuteCmdlet()
205205
SqlAdministratorPassword = (this.SqlAdministratorCredentials != null) ? this.SqlAdministratorCredentials.Password : null,
206206
SqlAdministratorLogin = (this.SqlAdministratorCredentials != null) ? this.SqlAdministratorCredentials.UserName : null,
207207
Tags = TagsConversionHelper.CreateTagDictionary(Tags, validate: true),
208-
Identity = ResourceIdentityHelper.GetIdentityObjectFromType(this.AssignIdentity.IsPresent ? this.AssignIdentity.ToString() : null, UserAssignedIdentities ?? null),
208+
Identity = ResourceIdentityHelper.GetIdentityObjectFromType(this.AssignIdentity.IsPresent ? this.AssignIdentity.ToString() : null, UserAssignedIdentity ?? null),
209209
MinimalTlsVersion = this.MinimalTlsVersion,
210210
PublicNetworkAccess = this.PublicNetworkAccess,
211211
PrimaryUserAssignedIdentityId = this.PrimaryUserAssignedIdentityId,

src/Sql/Sql/Server/Cmdlet/SetAzureSqlServer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public class SetAzureSqlServer : AzureSqlServerCmdletBase
102102
/// </summary>
103103
[Parameter(Mandatory = false,
104104
HelpMessage = "List of user assigned identities")]
105-
public List<string> UserAssignedIdentities { get; set; }
105+
public List<string> UserAssignedIdentity { get; set; }
106106

107107
/// <summary>
108108
/// Defines whether it is ok to skip the requesting of rule removal confirmation
@@ -141,7 +141,7 @@ public class SetAzureSqlServer : AzureSqlServerCmdletBase
141141
Tags = TagsConversionHelper.ReadOrFetchTags(this, model.FirstOrDefault().Tags),
142142
ServerVersion = this.ServerVersion,
143143
Location = model.FirstOrDefault().Location,
144-
Identity = model.FirstOrDefault().Identity ?? ResourceIdentityHelper.GetIdentityObjectFromType(this.AssignIdentity.IsPresent ? this.AssignIdentity.ToString() : null, UserAssignedIdentities ?? null),
144+
Identity = model.FirstOrDefault().Identity ?? ResourceIdentityHelper.GetIdentityObjectFromType(this.AssignIdentity.IsPresent ? this.AssignIdentity.ToString() : null, UserAssignedIdentity ?? null),
145145
PublicNetworkAccess = this.PublicNetworkAccess,
146146
MinimalTlsVersion = this.MinimalTlsVersion,
147147
SqlAdministratorLogin = model.FirstOrDefault().SqlAdministratorLogin,

src/Sql/Sql/TransparentDataEncryption/Cmdlet/SetAzureRmSqlManagedInstanceTransparentDataEncryptionProtector.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public class SetAzureRmSqlManagedInstanceTransparentDataEncryptionProtector : Az
7070
/// </summary>
7171
[Parameter(Mandatory = false,
7272
ValueFromPipelineByPropertyName = true,
73-
Position = 4,
7473
HelpMessage = "The Key Auto Rotation status")]
7574
[ValidateNotNullOrEmpty]
7675
public SwitchParameter AutoRotationEnabled { get; set; }

src/Sql/Sql/TransparentDataEncryption/Cmdlet/SetAzureSqlServerTransparentDataEncryptionProtector.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public class SetAzureSqlServerTransparentDataEncryptionProtector : AzureSqlServe
5353
/// </summary>
5454
[Parameter(Mandatory = false,
5555
ValueFromPipelineByPropertyName = true,
56-
Position = 4,
5756
HelpMessage = "The Key Auto Rotation status")]
5857
[ValidateNotNullOrEmpty]
5958
public SwitchParameter AutoRotationEnabled { get; set; }

0 commit comments

Comments
 (0)