Skip to content

Commit d508cdf

Browse files
author
maddieclayton
committed
address comments
1 parent 3eef5be commit d508cdf

8 files changed

+29
-27
lines changed

src/ResourceManager/KeyVault/Commands.KeyVault/Commands/ImportAzureKeyVaultCertificate.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ public class ImportAzureKeyVaultCertificate : KeyVaultCmdletBase
105105
ValueFromPipeline = true,
106106
ParameterSetName = ImportWithPrivateKeyFromCollectionParameterSet,
107107
HelpMessage = "Specifies the certificate collection to add to key vault.")]
108-
[Alias("InputObject")]
109108
public X509Certificate2Collection CertificateCollection { get; set; }
110109

111110
/// <summary>

src/ResourceManager/KeyVault/Commands.KeyVault/Commands/NewAzureKeyVaultCertificatePolicy.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ public class NewAzureKeyVaultCertificatePolicy : KeyVaultCmdletBase
7171
ParameterSetName = DNSNamesParameterSet,
7272
ValueFromPipelineByPropertyName = true,
7373
HelpMessage = "Specifies the DNS names in the certificate.")]
74-
public List<string> DnsNames { get; set; }
74+
[Alias("DnsNames")]
75+
public List<string> DnsName { get; set; }
7576

7677
/// <summary>
7778
/// RenewAtNumberOfDaysBeforeExpiry
@@ -196,7 +197,7 @@ public override void ExecuteCmdlet()
196197

197198
var policy = new PSKeyVaultCertificatePolicy
198199
{
199-
DnsNames = DnsNames,
200+
DnsNames = DnsName,
200201
KeyUsage = KeyUsage,
201202
Ekus = Ekus,
202203
Enabled = !Disabled.IsPresent,
@@ -263,9 +264,9 @@ private void ValidateEkus()
263264

264265
private void ValidateDnsNames()
265266
{
266-
if (DnsNames != null)
267+
if (DnsName != null)
267268
{
268-
foreach (var dnsName in DnsNames)
269+
foreach (var dnsName in DnsName)
269270
{
270271
if (string.IsNullOrWhiteSpace(dnsName))
271272
{

src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultCertificateIssuer.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ public class SetAzureKeyVaultCertificateIssuer : KeyVaultCmdletBase
111111
ValueFromPipelineByPropertyName = true,
112112
HelpMessage = "Specifies the certificate issuer to set.")]
113113
[ValidateNotNullOrEmpty]
114-
public PSKeyVaultCertificateIssuerIdentityItem Issuer { get; set; }
114+
[Alias("Issuer")]
115+
public PSKeyVaultCertificateIssuerIdentityItem InputObject { get; set; }
115116

116117
#endregion
117118

@@ -129,9 +130,9 @@ public override void ExecuteCmdlet()
129130
{
130131
PSKeyVaultCertificateIssuer issuerToUse;
131132

132-
if (Issuer != null)
133+
if (InputObject != null)
133134
{
134-
issuerToUse = (PSKeyVaultCertificateIssuer) Issuer;
135+
issuerToUse = (PSKeyVaultCertificateIssuer) InputObject;
135136
}
136137
else
137138
{

src/ResourceManager/KeyVault/Commands.KeyVault/Commands/SetAzureKeyVaultCertificatePolicy.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public class SetAzureKeyVaultCertificatePolicy : KeyVaultCmdletBase
6969
/// </summary>
7070
[Parameter(Mandatory = true,
7171
Position = 2,
72-
ValueFromPipelineByPropertyName = true,
72+
ValueFromPipeline = true,
7373
ParameterSetName = ByValueParameterSet,
7474
HelpMessage = "Specifies the certificate policy.")]
7575
[ValidateNotNull]
@@ -150,7 +150,8 @@ public class SetAzureKeyVaultCertificatePolicy : KeyVaultCmdletBase
150150
[Parameter(ValueFromPipelineByPropertyName = true,
151151
ParameterSetName = ExpandedRenewNumberParameterSet,
152152
HelpMessage = "Specifies the subject name of the certificate.")]
153-
public List<string> DnsNames { get; set; }
153+
[Alias("DnsNames")]
154+
public List<string> DnsName { get; set; }
154155

155156
/// <summary>
156157
/// Key Usage
@@ -266,7 +267,7 @@ public override void ExecuteCmdlet()
266267

267268
policy = new PSKeyVaultCertificatePolicy
268269
{
269-
DnsNames = DnsNames,
270+
DnsNames = DnsName,
270271
KeyUsage = KeyUsage,
271272
Ekus = Ekus,
272273
Enabled = !Disabled.IsPresent,
@@ -340,9 +341,9 @@ private void ValidateEkus()
340341

341342
private void ValidateDnsNames()
342343
{
343-
if (DnsNames != null)
344+
if (DnsName != null)
344345
{
345-
foreach (var dnsName in DnsNames)
346+
foreach (var dnsName in DnsName)
346347
{
347348
if (string.IsNullOrWhiteSpace(dnsName))
348349
{

src/ResourceManager/KeyVault/Commands.KeyVault/help/Import-AzureKeyVaultCertificate.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Specifies the certificate collection to add to a key vault.
8787
```yaml
8888
Type: X509Certificate2Collection
8989
Parameter Sets: ImportWithPrivateKeyFromCollection
90-
Aliases: InputObject
90+
Aliases:
9191

9292
Required: True
9393
Position: 2

src/ResourceManager/KeyVault/Commands.KeyVault/help/New-AzureKeyVaultCertificatePolicy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ New-AzureKeyVaultCertificatePolicy [-IssuerName] <String> [-SubjectName] <String
2727
### DNSNames
2828
```
2929
New-AzureKeyVaultCertificatePolicy [-IssuerName] <String> [[-SubjectName] <String>]
30-
[-DnsNames] <System.Collections.Generic.List`1[System.String]> [-RenewAtNumberOfDaysBeforeExpiry <Int32>]
30+
[-DnsName] <System.Collections.Generic.List`1[System.String]> [-RenewAtNumberOfDaysBeforeExpiry <Int32>]
3131
[-RenewAtPercentageLifetime <Int32>] [-SecretContentType <String>] [-ReuseKeyOnRenewal] [-Disabled]
3232
[-KeyUsage <System.Collections.Generic.List`1[System.String]>]
3333
[-Ekus <System.Collections.Generic.List`1[System.String]>] [-ValidityInMonths <Int32>]
@@ -95,13 +95,13 @@ Accept pipeline input: True (ByPropertyName)
9595
Accept wildcard characters: False
9696
```
9797
98-
### -DnsNames
98+
### -DnsName
9999
Specifies the DNS names in the certificate.
100100
101101
```yaml
102102
Type: System.Collections.Generic.List`1[System.String]
103103
Parameter Sets: DNSNames
104-
Aliases:
104+
Aliases: DnsNames
105105

106106
Required: True
107107
Position: 1

src/ResourceManager/KeyVault/Commands.KeyVault/help/Set-AzureKeyVaultCertificateIssuer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Set-AzureKeyVaultCertificateIssuer [-VaultName] <String> [-Name] <String> [-Issu
2424
### ByValue
2525
```
2626
Set-AzureKeyVaultCertificateIssuer [-VaultName] <String> [-Name] <String>
27-
-Issuer <PSKeyVaultCertificateIssuerIdentityItem> [-PassThru] [-DefaultProfile <IAzureContextContainer>]
27+
-InputObject <PSKeyVaultCertificateIssuerIdentityItem> [-PassThru] [-DefaultProfile <IAzureContextContainer>]
2828
[-WhatIf] [-Confirm] [<CommonParameters>]
2929
```
3030

@@ -87,13 +87,13 @@ Accept pipeline input: False
8787
Accept wildcard characters: False
8888
```
8989
90-
### -Issuer
91-
Specifies the certificate issuer to update.
90+
### -InputObject
91+
Specifies the certificate issuer to set.
9292
9393
```yaml
9494
Type: PSKeyVaultCertificateIssuerIdentityItem
9595
Parameter Sets: ByValue
96-
Aliases:
96+
Aliases: Issuer
9797

9898
Required: True
9999
Position: Named

src/ResourceManager/KeyVault/Commands.KeyVault/help/Set-AzureKeyVaultCertificatePolicy.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Creates or updates the policy for a certificate in a key vault.
1717
```
1818
Set-AzureKeyVaultCertificatePolicy [-VaultName] <String> [-Name] <String> [-RenewAtPercentageLifetime <Int32>]
1919
[-SecretContentType <String>] [-ReuseKeyOnRenewal <Boolean>] [-Disabled] [-SubjectName <String>]
20-
[-DnsNames <System.Collections.Generic.List`1[System.String]>]
20+
[-DnsName <System.Collections.Generic.List`1[System.String]>]
2121
[-KeyUsage <System.Collections.Generic.List`1[System.String]>]
2222
[-Ekus <System.Collections.Generic.List`1[System.String]>] [-ValidityInMonths <Int32>] [-IssuerName <String>]
2323
[-CertificateType <String>] [-EmailAtNumberOfDaysBeforeExpiry <Int32>] [-EmailAtPercentageLifetime <Int32>]
@@ -37,7 +37,7 @@ Set-AzureKeyVaultCertificatePolicy [-VaultName] <String> [-Name] <String>
3737
```
3838
Set-AzureKeyVaultCertificatePolicy [-VaultName] <String> [-Name] <String>
3939
-RenewAtNumberOfDaysBeforeExpiry <Int32> [-SecretContentType <String>] [-ReuseKeyOnRenewal <Boolean>]
40-
[-Disabled] [-SubjectName <String>] [-DnsNames <System.Collections.Generic.List`1[System.String]>]
40+
[-Disabled] [-SubjectName <String>] [-DnsName <System.Collections.Generic.List`1[System.String]>]
4141
[-KeyUsage <System.Collections.Generic.List`1[System.String]>]
4242
[-Ekus <System.Collections.Generic.List`1[System.String]>] [-ValidityInMonths <Int32>] [-IssuerName <String>]
4343
[-CertificateType <String>] [-EmailAtNumberOfDaysBeforeExpiry <Int32>] [-EmailAtPercentageLifetime <Int32>]
@@ -104,13 +104,13 @@ Accept pipeline input: True (ByPropertyName)
104104
Accept wildcard characters: False
105105
```
106106
107-
### -DnsNames
108-
Specifies the DNS names in the certificate.
107+
### -DnsName
108+
Specifies the subject name of the certificate.
109109
110110
```yaml
111111
Type: System.Collections.Generic.List`1[System.String]
112112
Parameter Sets: ExpandedRenewPercentage, ExpandedRenewNumber
113-
Aliases:
113+
Aliases: DnsNames
114114

115115
Required: False
116116
Position: Named
@@ -175,7 +175,7 @@ Aliases: CertificatePolicy
175175
Required: True
176176
Position: 2
177177
Default value: None
178-
Accept pipeline input: True (ByPropertyName)
178+
Accept pipeline input: True (ByValue)
179179
Accept wildcard characters: False
180180
```
181181

0 commit comments

Comments
 (0)