Skip to content

Commit 61f6b56

Browse files
committed
Added missing DefaultParameterSetName
1 parent cebff3e commit 61f6b56

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

src/IotHub/IotHub/IotHub/AddAzureRmIotHubKey.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2323
using Microsoft.Azure.Management.IotHub.Models;
2424
using ResourceManager.Common.ArgumentCompleters;
2525

26-
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IotHubKey", SupportsShouldProcess = true)]
26+
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IotHubKey", DefaultParameterSetName = ResourceParameterSet, SupportsShouldProcess = true)]
2727
[OutputType(typeof(PSSharedAccessSignatureAuthorizationRule))]
2828
public class AddAzureRmIotHubKey : IotHubBaseCmdlet
2929
{

src/IotHub/IotHub/IotHub/GetAzureRmIotHubKey.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2323
using Microsoft.Azure.Management.IotHub.Models;
2424
using ResourceManager.Common.ArgumentCompleters;
2525

26-
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IotHubKey")]
26+
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IotHubKey", DefaultParameterSetName = ResourceParameterSet)]
2727
[OutputType(typeof(PSSharedAccessSignatureAuthorizationRule))]
2828
public class GetAzureRmIotHubKey : IotHubBaseCmdlet
2929
{
@@ -59,7 +59,14 @@ public class GetAzureRmIotHubKey : IotHubBaseCmdlet
5959
public string Name { get; set; }
6060

6161
[Parameter(
62+
Position = 1,
63+
Mandatory = false,
64+
ParameterSetName = ResourceIdParameterSet,
65+
HelpMessage = "Name of the Key")]
66+
[Parameter(
67+
Position = 2,
6268
Mandatory = false,
69+
ParameterSetName = ResourceParameterSet,
6370
HelpMessage = "Name of the Key")]
6471
[ValidateNotNullOrEmpty]
6572
public string KeyName { get; set; }

src/IotHub/IotHub/IotHub/NewAzureRmIotHubKey.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2626
using Microsoft.Azure.Management.IotHub.Models;
2727
using ResourceManager.Common.ArgumentCompleters;
2828

29-
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IotHubKey", SupportsShouldProcess = true)]
29+
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IotHubKey", DefaultParameterSetName = ResourceParameterSet, SupportsShouldProcess = true)]
3030
[OutputType(typeof(PSSharedAccessSignatureAuthorizationRule))]
3131
public class NewAzureRmIotHubKey : IotHubBaseCmdlet
3232
{

src/IotHub/IotHub/IotHub/RemoveAzureRmIotHubKey.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Microsoft.Azure.Commands.Management.IotHub
2626
using PSIotHubProperties = Microsoft.Azure.Commands.Management.IotHub.Properties;
2727
using ResourceManager.Common.ArgumentCompleters;
2828

29-
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IotHubKey", SupportsShouldProcess = true)]
29+
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "IotHubKey", DefaultParameterSetName = ResourceParameterSet, SupportsShouldProcess = true)]
3030
[OutputType(typeof(PSSharedAccessSignatureAuthorizationRule))]
3131
public class RemoveAzureRmIotHubKey : IotHubBaseCmdlet
3232
{

0 commit comments

Comments
 (0)