Skip to content

Commit ee0497e

Browse files
authored
[KeyVault] Doc update about SAN certificate (#12785)
* Update help message for DnsName; add an example * Format
1 parent 72533af commit ee0497e

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

src/KeyVault/KeyVault/Commands/NewAzureKeyVaultCertificatePolicy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class NewAzureKeyVaultCertificatePolicy : KeyVaultCmdletBase
6868
Position = 1,
6969
ParameterSetName = DNSNamesParameterSet,
7070
ValueFromPipelineByPropertyName = true,
71-
HelpMessage = "Specifies the DNS names in the certificate.")]
71+
HelpMessage = "Specifies the DNS names in the certificate. Subject Alternative Names (SANs) can be specified as DNS names.")]
7272
[Alias("DnsNames")]
7373
public List<string> DnsName { get; set; }
7474

src/KeyVault/KeyVault/help/New-AzKeyVaultCertificatePolicy.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,36 @@ Creates an in-memory certificate policy object. (autogenerated)
8080
New-AzKeyVaultCertificatePolicy -IssuerName 'Self' -KeyType RSA -RenewAtNumberOfDaysBeforeExpiry <Int32> -SecretContentType application/x-pkcs12 -SubjectName 'CN=contoso.com' -ValidityInMonths 6
8181
```
8282

83+
### Example 3: Create a Subject Alternate Name (or SAN) certificate
84+
85+
```powershell
86+
PS C:\> New-AzKeyVaultCertificatePolicy -SecretContentType "application/x-pkcs12" -SubjectName "CN=contoso.com" -DnsName "contoso.com","support.contoso.com","docs.contoso.com" -IssuerName "Self"
87+
88+
SecretContentType : application/x-pkcs12
89+
Kty : RSA
90+
KeySize : 2048
91+
Curve :
92+
Exportable :
93+
ReuseKeyOnRenewal : False
94+
SubjectName : CN=contoso.com
95+
DnsNames : {contoso.com, support.contoso.com, docs.contoso.com}
96+
KeyUsage :
97+
Ekus :
98+
ValidityInMonths :
99+
IssuerName : Self
100+
CertificateType :
101+
RenewAtNumberOfDaysBeforeExpiry :
102+
RenewAtPercentageLifetime :
103+
EmailAtNumberOfDaysBeforeExpiry :
104+
EmailAtPercentageLifetime :
105+
CertificateTransparency :
106+
Enabled : True
107+
Created :
108+
Updated :
109+
```
110+
111+
This example creates a SAN certificate with 3 DNS names.
112+
83113
## PARAMETERS
84114

85115
### -CertificateTransparency
@@ -165,7 +195,7 @@ Accept wildcard characters: False
165195
```
166196
167197
### -DnsName
168-
Specifies the DNS names in the certificate.
198+
Specifies the DNS names in the certificate. Subject Alternative Names (SANs) can be specified as DNS names.
169199
170200
```yaml
171201
Type: System.Collections.Generic.List`1[System.String]

0 commit comments

Comments
 (0)