/
ContainerServiceManagedClusterData.cs
62 lines (58 loc) · 2.53 KB
/
ContainerServiceManagedClusterData.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.
#nullable disable
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Azure.Core;
using Azure.ResourceManager.ContainerService.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources.Models;
namespace Azure.ResourceManager.ContainerService
{
/// <summary> A class representing the ContainerServiceManagedCluster data model. </summary>
public partial class ContainerServiceManagedClusterData
{
/// <summary> Azure Defender settings for the security profile. </summary>
[Obsolete("This property is obsolete and will be removed in a future release", false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public ManagedClusterSecurityProfileAzureDefender SecurityAzureDefender
{
get
{
if (SecurityProfile != null && SecurityProfile.Defender != null)
{
return new ManagedClusterSecurityProfileAzureDefender
{
IsEnabled = SecurityProfile.Defender.IsSecurityMonitoringEnabled,
LogAnalyticsWorkspaceResourceId = SecurityProfile.Defender.LogAnalyticsWorkspaceResourceId
};
}
return default;
}
set
{
if (SecurityProfile is null)
SecurityProfile = new ManagedClusterSecurityProfile();
SecurityProfile.Defender = new ManagedClusterSecurityProfileDefender()
{
LogAnalyticsWorkspaceResourceId = value.LogAnalyticsWorkspaceResourceId,
IsSecurityMonitoringEnabled = value.IsEnabled
};
}
}
/// <summary> For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). </summary>
[Obsolete("This property is obsolete and will be removed in a future release", false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public UpgradeChannel? UpgradeChannel
{
get => AutoUpgradeProfile is null ? default : AutoUpgradeProfile.UpgradeChannel;
set
{
if (AutoUpgradeProfile is null)
AutoUpgradeProfile = new ManagedClusterAutoUpgradeProfile();
AutoUpgradeProfile.UpgradeChannel = value;
}
}
}
}