-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ContainerServiceManagedClusterData.cs
270 lines (259 loc) · 21.4 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System.Collections.Generic;
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.
/// Managed cluster.
/// </summary>
public partial class ContainerServiceManagedClusterData : TrackedResourceData
{
/// <summary> Initializes a new instance of ContainerServiceManagedClusterData. </summary>
/// <param name="location"> The location. </param>
public ContainerServiceManagedClusterData(AzureLocation location) : base(location)
{
AgentPoolProfiles = new ChangeTrackingList<ManagedClusterAgentPoolProfile>();
AddonProfiles = new ChangeTrackingDictionary<string, ManagedClusterAddonProfile>();
IdentityProfile = new ChangeTrackingDictionary<string, ContainerServiceUserAssignedIdentity>();
PrivateLinkResources = new ChangeTrackingList<ContainerServicePrivateLinkResourceData>();
}
/// <summary> Initializes a new instance of ContainerServiceManagedClusterData. </summary>
/// <param name="id"> The id. </param>
/// <param name="name"> The name. </param>
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="tags"> The tags. </param>
/// <param name="location"> The location. </param>
/// <param name="sku"> The managed cluster SKU. </param>
/// <param name="extendedLocation"> The extended location of the Virtual Machine. </param>
/// <param name="identity"> The identity of the managed cluster, if configured. Current supported identity types: None, SystemAssigned, UserAssigned. </param>
/// <param name="provisioningState"> The current provisioning state. </param>
/// <param name="powerState"> The Power State of the cluster. </param>
/// <param name="creationData"> CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot. </param>
/// <param name="maxAgentPools"> The max number of agent pools for the managed cluster. </param>
/// <param name="kubernetesVersion"> When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. </param>
/// <param name="currentKubernetesVersion"> The version of Kubernetes the Managed Cluster is running. </param>
/// <param name="dnsPrefix"> This cannot be updated once the Managed Cluster has been created. </param>
/// <param name="fqdnSubdomain"> This cannot be updated once the Managed Cluster has been created. </param>
/// <param name="fqdn"> The FQDN of the master pool. </param>
/// <param name="privateFqdn"> The FQDN of private cluster. </param>
/// <param name="azurePortalFqdn"> The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. </param>
/// <param name="agentPoolProfiles"> The agent pool properties. </param>
/// <param name="linuxProfile"> The profile for Linux VMs in the Managed Cluster. </param>
/// <param name="windowsProfile"> The profile for Windows VMs in the Managed Cluster. </param>
/// <param name="servicePrincipalProfile"> Information about a service principal identity for the cluster to use for manipulating Azure APIs. </param>
/// <param name="addonProfiles"> The profile of managed cluster add-on. </param>
/// <param name="podIdentityProfile"> See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity integration. </param>
/// <param name="oidcIssuerProfile"> The OIDC issuer profile of the Managed Cluster. </param>
/// <param name="nodeResourceGroup"> The name of the resource group containing agent pool nodes. </param>
/// <param name="nodeResourceGroupProfile"> The node resource group configuration profile. </param>
/// <param name="enableRbac"> Whether to enable Kubernetes Role-Based Access Control. </param>
/// <param name="enablePodSecurityPolicy"> (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. </param>
/// <param name="enableNamespaceResources"> The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM Resource. </param>
/// <param name="networkProfile"> The network configuration profile. </param>
/// <param name="aadProfile"> The Azure Active Directory configuration. </param>
/// <param name="autoUpgradeProfile"> The auto upgrade configuration. </param>
/// <param name="autoScalerProfile"> Parameters to be applied to the cluster-autoscaler when enabled. </param>
/// <param name="apiServerAccessProfile"> The access profile for managed cluster API server. </param>
/// <param name="diskEncryptionSetId"> This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. </param>
/// <param name="identityProfile"> Identities associated with the cluster. </param>
/// <param name="privateLinkResources"> Private link resources associated with the cluster. </param>
/// <param name="disableLocalAccounts"> If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). </param>
/// <param name="httpProxyConfig"> Configurations for provisioning the cluster with HTTP proxy servers. </param>
/// <param name="securityProfile"> Security profile for the managed cluster. </param>
/// <param name="storageProfile"> Storage profile for the managed cluster. </param>
/// <param name="ingressProfile"> Ingress profile for the managed cluster. </param>
/// <param name="publicNetworkAccess"> Allow or deny public network access for AKS. </param>
/// <param name="workloadAutoScalerProfile"> Workload Auto-scaler profile for the managed cluster. </param>
/// <param name="azureMonitorProfile"> Prometheus addon profile for the container service cluster. </param>
/// <param name="guardrailsProfile"> The guardrails profile holds all the guardrails information for a given cluster. </param>
internal ContainerServiceManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary<string, string> tags, AzureLocation location, ManagedClusterSku sku, ExtendedLocation extendedLocation, ManagedServiceIdentity identity, string provisioningState, ContainerServicePowerState powerState, ContainerServiceCreationData creationData, int? maxAgentPools, string kubernetesVersion, string currentKubernetesVersion, string dnsPrefix, string fqdnSubdomain, string fqdn, string privateFqdn, string azurePortalFqdn, IList<ManagedClusterAgentPoolProfile> agentPoolProfiles, ContainerServiceLinuxProfile linuxProfile, ManagedClusterWindowsProfile windowsProfile, ManagedClusterServicePrincipalProfile servicePrincipalProfile, IDictionary<string, ManagedClusterAddonProfile> addonProfiles, ManagedClusterPodIdentityProfile podIdentityProfile, ManagedClusterOidcIssuerProfile oidcIssuerProfile, string nodeResourceGroup, ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile, bool? enableRbac, bool? enablePodSecurityPolicy, bool? enableNamespaceResources, ContainerServiceNetworkProfile networkProfile, ManagedClusterAadProfile aadProfile, ManagedClusterAutoUpgradeProfile autoUpgradeProfile, ManagedClusterAutoScalerProfile autoScalerProfile, ManagedClusterApiServerAccessProfile apiServerAccessProfile, ResourceIdentifier diskEncryptionSetId, IDictionary<string, ContainerServiceUserAssignedIdentity> identityProfile, IList<ContainerServicePrivateLinkResourceData> privateLinkResources, bool? disableLocalAccounts, ManagedClusterHttpProxyConfig httpProxyConfig, ManagedClusterSecurityProfile securityProfile, ManagedClusterStorageProfile storageProfile, ManagedClusterIngressProfile ingressProfile, ContainerServicePublicNetworkAccess? publicNetworkAccess, ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile, ManagedClusterAzureMonitorProfile azureMonitorProfile, ManagedClusterGuardrailsProfile guardrailsProfile) : base(id, name, resourceType, systemData, tags, location)
{
Sku = sku;
ExtendedLocation = extendedLocation;
Identity = identity;
ProvisioningState = provisioningState;
PowerState = powerState;
CreationData = creationData;
MaxAgentPools = maxAgentPools;
KubernetesVersion = kubernetesVersion;
CurrentKubernetesVersion = currentKubernetesVersion;
DnsPrefix = dnsPrefix;
FqdnSubdomain = fqdnSubdomain;
Fqdn = fqdn;
PrivateFqdn = privateFqdn;
AzurePortalFqdn = azurePortalFqdn;
AgentPoolProfiles = agentPoolProfiles;
LinuxProfile = linuxProfile;
WindowsProfile = windowsProfile;
ServicePrincipalProfile = servicePrincipalProfile;
AddonProfiles = addonProfiles;
PodIdentityProfile = podIdentityProfile;
OidcIssuerProfile = oidcIssuerProfile;
NodeResourceGroup = nodeResourceGroup;
NodeResourceGroupProfile = nodeResourceGroupProfile;
EnableRbac = enableRbac;
EnablePodSecurityPolicy = enablePodSecurityPolicy;
EnableNamespaceResources = enableNamespaceResources;
NetworkProfile = networkProfile;
AadProfile = aadProfile;
AutoUpgradeProfile = autoUpgradeProfile;
AutoScalerProfile = autoScalerProfile;
ApiServerAccessProfile = apiServerAccessProfile;
DiskEncryptionSetId = diskEncryptionSetId;
IdentityProfile = identityProfile;
PrivateLinkResources = privateLinkResources;
DisableLocalAccounts = disableLocalAccounts;
HttpProxyConfig = httpProxyConfig;
SecurityProfile = securityProfile;
StorageProfile = storageProfile;
IngressProfile = ingressProfile;
PublicNetworkAccess = publicNetworkAccess;
WorkloadAutoScalerProfile = workloadAutoScalerProfile;
AzureMonitorProfile = azureMonitorProfile;
GuardrailsProfile = guardrailsProfile;
}
/// <summary> The managed cluster SKU. </summary>
public ManagedClusterSku Sku { get; set; }
/// <summary> The extended location of the Virtual Machine. </summary>
public ExtendedLocation ExtendedLocation { get; set; }
/// <summary> The identity of the managed cluster, if configured. Current supported identity types: None, SystemAssigned, UserAssigned. </summary>
public ManagedServiceIdentity Identity { get; set; }
/// <summary> The current provisioning state. </summary>
public string ProvisioningState { get; }
/// <summary> The Power State of the cluster. </summary>
internal ContainerServicePowerState PowerState { get; }
/// <summary> Tells whether the cluster is Running or Stopped. </summary>
public ContainerServiceStateCode? PowerStateCode
{
get => PowerState?.Code;
}
/// <summary> CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot. </summary>
internal ContainerServiceCreationData CreationData { get; set; }
/// <summary> This is the ARM ID of the source object to be used to create the target object. </summary>
public ResourceIdentifier CreationDataSourceResourceId
{
get => CreationData is null ? default : CreationData.SourceResourceId;
set
{
if (CreationData is null)
CreationData = new ContainerServiceCreationData();
CreationData.SourceResourceId = value;
}
}
/// <summary> The max number of agent pools for the managed cluster. </summary>
public int? MaxAgentPools { get; }
/// <summary> When you upgrade a supported AKS cluster, Kubernetes minor versions cannot be skipped. All upgrades must be performed sequentially by major version number. For example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> 1.16.x is not allowed. See [upgrading an AKS cluster](https://docs.microsoft.com/azure/aks/upgrade-cluster) for more details. </summary>
public string KubernetesVersion { get; set; }
/// <summary> The version of Kubernetes the Managed Cluster is running. </summary>
public string CurrentKubernetesVersion { get; }
/// <summary> This cannot be updated once the Managed Cluster has been created. </summary>
public string DnsPrefix { get; set; }
/// <summary> This cannot be updated once the Managed Cluster has been created. </summary>
public string FqdnSubdomain { get; set; }
/// <summary> The FQDN of the master pool. </summary>
public string Fqdn { get; }
/// <summary> The FQDN of private cluster. </summary>
public string PrivateFqdn { get; }
/// <summary> The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. </summary>
public string AzurePortalFqdn { get; }
/// <summary> The agent pool properties. </summary>
public IList<ManagedClusterAgentPoolProfile> AgentPoolProfiles { get; }
/// <summary> The profile for Linux VMs in the Managed Cluster. </summary>
public ContainerServiceLinuxProfile LinuxProfile { get; set; }
/// <summary> The profile for Windows VMs in the Managed Cluster. </summary>
public ManagedClusterWindowsProfile WindowsProfile { get; set; }
/// <summary> Information about a service principal identity for the cluster to use for manipulating Azure APIs. </summary>
public ManagedClusterServicePrincipalProfile ServicePrincipalProfile { get; set; }
/// <summary> The profile of managed cluster add-on. </summary>
public IDictionary<string, ManagedClusterAddonProfile> AddonProfiles { get; }
/// <summary> See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity integration. </summary>
public ManagedClusterPodIdentityProfile PodIdentityProfile { get; set; }
/// <summary> The OIDC issuer profile of the Managed Cluster. </summary>
public ManagedClusterOidcIssuerProfile OidcIssuerProfile { get; set; }
/// <summary> The name of the resource group containing agent pool nodes. </summary>
public string NodeResourceGroup { get; set; }
/// <summary> The node resource group configuration profile. </summary>
internal ManagedClusterNodeResourceGroupProfile NodeResourceGroupProfile { get; set; }
/// <summary> The restriction level applied to the cluster's node resource group. </summary>
public ManagedClusterNodeResourceGroupRestrictionLevel? NodeResourceGroupRestrictionLevel
{
get => NodeResourceGroupProfile is null ? default : NodeResourceGroupProfile.RestrictionLevel;
set
{
if (NodeResourceGroupProfile is null)
NodeResourceGroupProfile = new ManagedClusterNodeResourceGroupProfile();
NodeResourceGroupProfile.RestrictionLevel = value;
}
}
/// <summary> Whether to enable Kubernetes Role-Based Access Control. </summary>
public bool? EnableRbac { get; set; }
/// <summary> (DEPRECATED) Whether to enable Kubernetes pod security policy (preview). PodSecurityPolicy was deprecated in Kubernetes v1.21, and removed from Kubernetes in v1.25. Learn more at https://aka.ms/k8s/psp and https://aka.ms/aks/psp. </summary>
public bool? EnablePodSecurityPolicy { get; set; }
/// <summary> The default value is false. It can be enabled/disabled on creation and updating of the managed cluster. See [https://aka.ms/NamespaceARMResource](https://aka.ms/NamespaceARMResource) for more details on Namespace as a ARM Resource. </summary>
public bool? EnableNamespaceResources { get; set; }
/// <summary> The network configuration profile. </summary>
public ContainerServiceNetworkProfile NetworkProfile { get; set; }
/// <summary> The Azure Active Directory configuration. </summary>
public ManagedClusterAadProfile AadProfile { get; set; }
/// <summary> The auto upgrade configuration. </summary>
public ManagedClusterAutoUpgradeProfile AutoUpgradeProfile { get; set; }
/// <summary> Parameters to be applied to the cluster-autoscaler when enabled. </summary>
public ManagedClusterAutoScalerProfile AutoScalerProfile { get; set; }
/// <summary> The access profile for managed cluster API server. </summary>
public ManagedClusterApiServerAccessProfile ApiServerAccessProfile { get; set; }
/// <summary> This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. </summary>
public ResourceIdentifier DiskEncryptionSetId { get; set; }
/// <summary> Identities associated with the cluster. </summary>
public IDictionary<string, ContainerServiceUserAssignedIdentity> IdentityProfile { get; }
/// <summary> Private link resources associated with the cluster. </summary>
public IList<ContainerServicePrivateLinkResourceData> PrivateLinkResources { get; }
/// <summary> If set to true, getting static credentials will be disabled for this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details see [disable local accounts](https://docs.microsoft.com/azure/aks/managed-aad#disable-local-accounts-preview). </summary>
public bool? DisableLocalAccounts { get; set; }
/// <summary> Configurations for provisioning the cluster with HTTP proxy servers. </summary>
public ManagedClusterHttpProxyConfig HttpProxyConfig { get; set; }
/// <summary> Security profile for the managed cluster. </summary>
public ManagedClusterSecurityProfile SecurityProfile { get; set; }
/// <summary> Storage profile for the managed cluster. </summary>
public ManagedClusterStorageProfile StorageProfile { get; set; }
/// <summary> Ingress profile for the managed cluster. </summary>
internal ManagedClusterIngressProfile IngressProfile { get; set; }
/// <summary> Web App Routing settings for the ingress profile. </summary>
public ManagedClusterIngressProfileWebAppRouting IngressWebAppRouting
{
get => IngressProfile is null ? default : IngressProfile.WebAppRouting;
set
{
if (IngressProfile is null)
IngressProfile = new ManagedClusterIngressProfile();
IngressProfile.WebAppRouting = value;
}
}
/// <summary> Allow or deny public network access for AKS. </summary>
public ContainerServicePublicNetworkAccess? PublicNetworkAccess { get; set; }
/// <summary> Workload Auto-scaler profile for the managed cluster. </summary>
public ManagedClusterWorkloadAutoScalerProfile WorkloadAutoScalerProfile { get; set; }
/// <summary> Prometheus addon profile for the container service cluster. </summary>
internal ManagedClusterAzureMonitorProfile AzureMonitorProfile { get; set; }
/// <summary> Metrics profile for the prometheus service addon. </summary>
public ManagedClusterMonitorProfileMetrics AzureMonitorMetrics
{
get => AzureMonitorProfile is null ? default : AzureMonitorProfile.Metrics;
set
{
if (AzureMonitorProfile is null)
AzureMonitorProfile = new ManagedClusterAzureMonitorProfile();
AzureMonitorProfile.Metrics = value;
}
}
/// <summary> The guardrails profile holds all the guardrails information for a given cluster. </summary>
public ManagedClusterGuardrailsProfile GuardrailsProfile { get; set; }
}
}