-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
DataFactoryEncryptionConfiguration.cs
62 lines (55 loc) · 3.1 KB
/
DataFactoryEncryptionConfiguration.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using Azure.Core;
namespace Azure.ResourceManager.DataFactory.Models
{
/// <summary> Definition of CMK for the factory. </summary>
public partial class DataFactoryEncryptionConfiguration
{
/// <summary> Initializes a new instance of <see cref="DataFactoryEncryptionConfiguration"/>. </summary>
/// <param name="keyName"> The name of the key in Azure Key Vault to use as Customer Managed Key. </param>
/// <param name="vaultBaseUri"> The url of the Azure Key Vault used for CMK. </param>
/// <exception cref="ArgumentNullException"> <paramref name="keyName"/> or <paramref name="vaultBaseUri"/> is null. </exception>
public DataFactoryEncryptionConfiguration(string keyName, Uri vaultBaseUri)
{
Argument.AssertNotNull(keyName, nameof(keyName));
Argument.AssertNotNull(vaultBaseUri, nameof(vaultBaseUri));
KeyName = keyName;
VaultBaseUri = vaultBaseUri;
}
/// <summary> Initializes a new instance of <see cref="DataFactoryEncryptionConfiguration"/>. </summary>
/// <param name="keyName"> The name of the key in Azure Key Vault to use as Customer Managed Key. </param>
/// <param name="vaultBaseUri"> The url of the Azure Key Vault used for CMK. </param>
/// <param name="keyVersion"> The version of the key used for CMK. If not provided, latest version will be used. </param>
/// <param name="identity"> User assigned identity to use to authenticate to customer's key vault. If not provided Managed Service Identity will be used. </param>
internal DataFactoryEncryptionConfiguration(string keyName, Uri vaultBaseUri, string keyVersion, DataFactoryCmkIdentity identity)
{
KeyName = keyName;
VaultBaseUri = vaultBaseUri;
KeyVersion = keyVersion;
Identity = identity;
}
/// <summary> The name of the key in Azure Key Vault to use as Customer Managed Key. </summary>
public string KeyName { get; set; }
/// <summary> The url of the Azure Key Vault used for CMK. </summary>
public Uri VaultBaseUri { get; set; }
/// <summary> The version of the key used for CMK. If not provided, latest version will be used. </summary>
public string KeyVersion { get; set; }
/// <summary> User assigned identity to use to authenticate to customer's key vault. If not provided Managed Service Identity will be used. </summary>
internal DataFactoryCmkIdentity Identity { get; set; }
/// <summary> The resource id of the user assigned identity to authenticate to customer's key vault. </summary>
public string UserAssignedIdentity
{
get => Identity is null ? default : Identity.UserAssignedIdentity;
set
{
if (Identity is null)
Identity = new DataFactoryCmkIdentity();
Identity.UserAssignedIdentity = value;
}
}
}
}