-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
KeyVaultCertificateSource.cs
79 lines (72 loc) · 5.08 KB
/
KeyVaultCertificateSource.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using Azure.Core;
namespace Azure.ResourceManager.Cdn.Models
{
/// <summary> Describes the parameters for using a user's KeyVault certificate for securing custom domain. </summary>
public partial class KeyVaultCertificateSource
{
/// <summary> Initializes a new instance of KeyVaultCertificateSource. </summary>
/// <param name="sourceType"></param>
/// <param name="subscriptionId"> Subscription Id of the user's Key Vault containing the SSL certificate. </param>
/// <param name="resourceGroupName"> Resource group of the user's Key Vault containing the SSL certificate. </param>
/// <param name="vaultName"> The name of the user's Key Vault containing the SSL certificate. </param>
/// <param name="secretName"> The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. </param>
/// <param name="updateRule"> Describes the action that shall be taken when the certificate is updated in Key Vault. </param>
/// <param name="deleteRule"> Describes the action that shall be taken when the certificate is removed from Key Vault. </param>
/// <exception cref="ArgumentNullException"> <paramref name="subscriptionId"/>, <paramref name="resourceGroupName"/>, <paramref name="vaultName"/> or <paramref name="secretName"/> is null. </exception>
public KeyVaultCertificateSource(KeyVaultCertificateSourceType sourceType, string subscriptionId, string resourceGroupName, string vaultName, string secretName, CertificateUpdateAction updateRule, CertificateDeleteAction deleteRule)
{
Argument.AssertNotNull(subscriptionId, nameof(subscriptionId));
Argument.AssertNotNull(resourceGroupName, nameof(resourceGroupName));
Argument.AssertNotNull(vaultName, nameof(vaultName));
Argument.AssertNotNull(secretName, nameof(secretName));
SourceType = sourceType;
SubscriptionId = subscriptionId;
ResourceGroupName = resourceGroupName;
VaultName = vaultName;
SecretName = secretName;
UpdateRule = updateRule;
DeleteRule = deleteRule;
}
/// <summary> Initializes a new instance of KeyVaultCertificateSource. </summary>
/// <param name="sourceType"></param>
/// <param name="subscriptionId"> Subscription Id of the user's Key Vault containing the SSL certificate. </param>
/// <param name="resourceGroupName"> Resource group of the user's Key Vault containing the SSL certificate. </param>
/// <param name="vaultName"> The name of the user's Key Vault containing the SSL certificate. </param>
/// <param name="secretName"> The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. </param>
/// <param name="secretVersion"> The version(GUID) of Key Vault Secret in Key Vault. </param>
/// <param name="updateRule"> Describes the action that shall be taken when the certificate is updated in Key Vault. </param>
/// <param name="deleteRule"> Describes the action that shall be taken when the certificate is removed from Key Vault. </param>
internal KeyVaultCertificateSource(KeyVaultCertificateSourceType sourceType, string subscriptionId, string resourceGroupName, string vaultName, string secretName, string secretVersion, CertificateUpdateAction updateRule, CertificateDeleteAction deleteRule)
{
SourceType = sourceType;
SubscriptionId = subscriptionId;
ResourceGroupName = resourceGroupName;
VaultName = vaultName;
SecretName = secretName;
SecretVersion = secretVersion;
UpdateRule = updateRule;
DeleteRule = deleteRule;
}
/// <summary> Gets or sets the source type. </summary>
public KeyVaultCertificateSourceType SourceType { get; set; }
/// <summary> Subscription Id of the user's Key Vault containing the SSL certificate. </summary>
public string SubscriptionId { get; set; }
/// <summary> Resource group of the user's Key Vault containing the SSL certificate. </summary>
public string ResourceGroupName { get; set; }
/// <summary> The name of the user's Key Vault containing the SSL certificate. </summary>
public string VaultName { get; set; }
/// <summary> The name of Key Vault Secret (representing the full certificate PFX) in Key Vault. </summary>
public string SecretName { get; set; }
/// <summary> The version(GUID) of Key Vault Secret in Key Vault. </summary>
public string SecretVersion { get; set; }
/// <summary> Describes the action that shall be taken when the certificate is updated in Key Vault. </summary>
public CertificateUpdateAction UpdateRule { get; set; }
/// <summary> Describes the action that shall be taken when the certificate is removed from Key Vault. </summary>
public CertificateDeleteAction DeleteRule { get; set; }
}
}