-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
ArmContainerServiceModelFactory.cs
964 lines (901 loc) · 84.8 KB
/
ArmContainerServiceModelFactory.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
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using Azure.Core;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources.Models;
namespace Azure.ResourceManager.ContainerService.Models
{
/// <summary> Model factory for models. </summary>
public static partial class ArmContainerServiceModelFactory
{
/// <summary> Initializes a new instance of <see cref="ContainerService.OSOptionProfileData"/>. </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="osOptionPropertyList"> The list of OS options. </param>
/// <returns> A new <see cref="ContainerService.OSOptionProfileData"/> instance for mocking. </returns>
public static OSOptionProfileData OSOptionProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable<ContainerServiceOSOptionProperty> osOptionPropertyList = null)
{
osOptionPropertyList ??= new List<ContainerServiceOSOptionProperty>();
return new OSOptionProfileData(
id,
name,
resourceType,
systemData,
osOptionPropertyList?.ToList(),
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ContainerServiceOSOptionProperty"/>. </summary>
/// <param name="osType"> The OS type. </param>
/// <param name="enableFipsImage"> Whether the image is FIPS-enabled. </param>
/// <returns> A new <see cref="Models.ContainerServiceOSOptionProperty"/> instance for mocking. </returns>
public static ContainerServiceOSOptionProperty ContainerServiceOSOptionProperty(string osType = null, bool enableFipsImage = default)
{
return new ContainerServiceOSOptionProperty(osType, enableFipsImage, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.KubernetesVersionListResult"/>. </summary>
/// <param name="values"> Array of AKS supported Kubernetes versions. </param>
/// <returns> A new <see cref="Models.KubernetesVersionListResult"/> instance for mocking. </returns>
public static KubernetesVersionListResult KubernetesVersionListResult(IEnumerable<KubernetesVersion> values = null)
{
values ??= new List<KubernetesVersion>();
return new KubernetesVersionListResult(values?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.KubernetesVersion"/>. </summary>
/// <param name="version"> major.minor version of Kubernetes release. </param>
/// <param name="capabilitiesSupportPlan"> Capabilities on this Kubernetes version. </param>
/// <param name="isPreview"> Whether this version is in preview mode. </param>
/// <param name="patchVersions"> Patch versions of Kubernetes release. </param>
/// <returns> A new <see cref="Models.KubernetesVersion"/> instance for mocking. </returns>
public static KubernetesVersion KubernetesVersion(string version = null, IEnumerable<KubernetesSupportPlan> capabilitiesSupportPlan = null, bool? isPreview = null, IReadOnlyDictionary<string, KubernetesPatchVersion> patchVersions = null)
{
capabilitiesSupportPlan ??= new List<KubernetesSupportPlan>();
patchVersions ??= new Dictionary<string, KubernetesPatchVersion>();
return new KubernetesVersion(version, capabilitiesSupportPlan != null ? new KubernetesVersionCapabilities(capabilitiesSupportPlan?.ToList(), serializedAdditionalRawData: null) : null, isPreview, patchVersions, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.KubernetesPatchVersion"/>. </summary>
/// <param name="upgrades"> Possible upgrade path for given patch version. </param>
/// <returns> A new <see cref="Models.KubernetesPatchVersion"/> instance for mocking. </returns>
public static KubernetesPatchVersion KubernetesPatchVersion(IEnumerable<string> upgrades = null)
{
upgrades ??= new List<string>();
return new KubernetesPatchVersion(upgrades?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="ContainerService.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="clusterIdentity"> The identity of the managed cluster, if configured. </param>
/// <param name="provisioningState"> The current provisioning state. </param>
/// <param name="powerStateCode"> The Power State of the cluster. </param>
/// <param name="maxAgentPools"> The max number of agent pools for the managed cluster. </param>
/// <param name="kubernetesVersion"> Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. 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"> If kubernetesVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to it. If kubernetesVersion was <major.minor>, this field will contain the full <major.minor.patch> version being used. </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="enableRbac"> Whether to enable Kubernetes Role-Based Access Control. </param>
/// <param name="supportPlan"> The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'. </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="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="upgradeOverrideSettings"> Settings for upgrading a cluster. </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="publicNetworkAccess"> Allow or deny public network access for AKS. </param>
/// <param name="workloadAutoScalerProfile"> Workload Auto-scaler profile for the managed cluster. </param>
/// <param name="azureMonitorMetrics"> Azure Monitor addon profiles for monitoring the managed cluster. </param>
/// <param name="serviceMeshProfile"> Service mesh profile for a managed cluster. </param>
/// <param name="resourceId"> The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence). </param>
/// <returns> A new <see cref="ContainerService.ContainerServiceManagedClusterData"/> instance for mocking. </returns>
public static ContainerServiceManagedClusterData ContainerServiceManagedClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary<string, string> tags = null, AzureLocation location = default, ManagedClusterSku sku = null, ExtendedLocation extendedLocation = null, ManagedClusterIdentity clusterIdentity = null, string provisioningState = null, ContainerServiceStateCode? powerStateCode = null, int? maxAgentPools = null, string kubernetesVersion = null, string currentKubernetesVersion = null, string dnsPrefix = null, string fqdnSubdomain = null, string fqdn = null, string privateFqdn = null, string azurePortalFqdn = null, IEnumerable<ManagedClusterAgentPoolProfile> agentPoolProfiles = null, ContainerServiceLinuxProfile linuxProfile = null, ManagedClusterWindowsProfile windowsProfile = null, ManagedClusterServicePrincipalProfile servicePrincipalProfile = null, IDictionary<string, ManagedClusterAddonProfile> addonProfiles = null, ManagedClusterPodIdentityProfile podIdentityProfile = null, ManagedClusterOidcIssuerProfile oidcIssuerProfile = null, string nodeResourceGroup = null, bool? enableRbac = null, KubernetesSupportPlan? supportPlan = null, bool? enablePodSecurityPolicy = null, ContainerServiceNetworkProfile networkProfile = null, ManagedClusterAadProfile aadProfile = null, ManagedClusterAutoUpgradeProfile autoUpgradeProfile = null, UpgradeOverrideSettings upgradeOverrideSettings = null, ManagedClusterAutoScalerProfile autoScalerProfile = null, ManagedClusterApiServerAccessProfile apiServerAccessProfile = null, ResourceIdentifier diskEncryptionSetId = null, IDictionary<string, ContainerServiceUserAssignedIdentity> identityProfile = null, IEnumerable<ContainerServicePrivateLinkResourceData> privateLinkResources = null, bool? disableLocalAccounts = null, ManagedClusterHttpProxyConfig httpProxyConfig = null, ManagedClusterSecurityProfile securityProfile = null, ManagedClusterStorageProfile storageProfile = null, ContainerServicePublicNetworkAccess? publicNetworkAccess = null, ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile = null, ManagedClusterMonitorProfileMetrics azureMonitorMetrics = null, ServiceMeshProfile serviceMeshProfile = null, ResourceIdentifier resourceId = null)
{
tags ??= new Dictionary<string, string>();
agentPoolProfiles ??= new List<ManagedClusterAgentPoolProfile>();
addonProfiles ??= new Dictionary<string, ManagedClusterAddonProfile>();
identityProfile ??= new Dictionary<string, ContainerServiceUserAssignedIdentity>();
privateLinkResources ??= new List<ContainerServicePrivateLinkResourceData>();
return new ContainerServiceManagedClusterData(
id,
name,
resourceType,
systemData,
tags,
location,
sku,
extendedLocation,
clusterIdentity,
provisioningState,
powerStateCode != null ? new ContainerServicePowerState(powerStateCode, serializedAdditionalRawData: null) : null,
maxAgentPools,
kubernetesVersion,
currentKubernetesVersion,
dnsPrefix,
fqdnSubdomain,
fqdn,
privateFqdn,
azurePortalFqdn,
agentPoolProfiles?.ToList(),
linuxProfile,
windowsProfile,
servicePrincipalProfile,
addonProfiles,
podIdentityProfile,
oidcIssuerProfile,
nodeResourceGroup,
enableRbac,
supportPlan,
enablePodSecurityPolicy,
networkProfile,
aadProfile,
autoUpgradeProfile,
upgradeOverrideSettings != null ? new ClusterUpgradeSettings(upgradeOverrideSettings, serializedAdditionalRawData: null) : null,
autoScalerProfile,
apiServerAccessProfile,
diskEncryptionSetId,
identityProfile,
privateLinkResources?.ToList(),
disableLocalAccounts,
httpProxyConfig,
securityProfile,
storageProfile,
publicNetworkAccess,
workloadAutoScalerProfile,
azureMonitorMetrics != null ? new ManagedClusterAzureMonitorProfile(azureMonitorMetrics, serializedAdditionalRawData: null) : null,
serviceMeshProfile,
resourceId,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterAgentPoolProfile"/>. </summary>
/// <param name="count"> Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. </param>
/// <param name="vmSize"> VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. </param>
/// <param name="osDiskSizeInGB"> OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. </param>
/// <param name="osDiskType"> The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). </param>
/// <param name="kubeletDiskType"> Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. </param>
/// <param name="workloadRuntime"> Determines the type of workload a node can run. </param>
/// <param name="vnetSubnetId"> If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. </param>
/// <param name="podSubnetId"> If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. </param>
/// <param name="maxPods"> The maximum number of pods that can run on a node. </param>
/// <param name="osType"> The operating system type. The default is Linux. </param>
/// <param name="osSku"> Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. </param>
/// <param name="maxCount"> The maximum number of nodes for auto-scaling. </param>
/// <param name="minCount"> The minimum number of nodes for auto-scaling. </param>
/// <param name="enableAutoScaling"> Whether to enable auto-scaler. </param>
/// <param name="scaleDownMode"> This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. </param>
/// <param name="agentPoolType"> The type of Agent Pool. </param>
/// <param name="mode"> A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. </param>
/// <param name="orchestratorVersion"> Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). </param>
/// <param name="currentOrchestratorVersion"> If orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> version being used. </param>
/// <param name="nodeImageVersion"> The version of node image. </param>
/// <param name="upgradeSettings"> Settings for upgrading the agentpool. </param>
/// <param name="provisioningState"> The current deployment or provisioning state. </param>
/// <param name="powerStateCode"> When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. </param>
/// <param name="availabilityZones"> The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. </param>
/// <param name="enableNodePublicIP"> Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false. </param>
/// <param name="nodePublicIPPrefixId"> This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. </param>
/// <param name="scaleSetPriority"> The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. </param>
/// <param name="scaleSetEvictionPolicy"> This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. </param>
/// <param name="spotMaxPrice"> Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). </param>
/// <param name="tags"> The tags to be persisted on the agent pool virtual machine scale set. </param>
/// <param name="nodeLabels"> The node labels to be persisted across all nodes in agent pool. </param>
/// <param name="nodeTaints"> The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. </param>
/// <param name="proximityPlacementGroupId"> The ID for Proximity Placement Group. </param>
/// <param name="kubeletConfig"> The Kubelet configuration on the agent pool nodes. </param>
/// <param name="linuxOSConfig"> The OS configuration of Linux agent nodes. </param>
/// <param name="enableEncryptionAtHost"> This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption. </param>
/// <param name="enableUltraSsd"> Whether to enable UltraSSD. </param>
/// <param name="enableFips"> See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details. </param>
/// <param name="gpuInstanceProfile"> GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. </param>
/// <param name="creationDataSourceResourceId"> CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. </param>
/// <param name="capacityReservationGroupId"> AKS will associate the specified agent pool with the Capacity Reservation Group. </param>
/// <param name="hostGroupId"> This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). </param>
/// <param name="networkProfile"> Network-related settings of an agent pool. </param>
/// <param name="name"> Windows agent pool names must be 6 characters or less. </param>
/// <returns> A new <see cref="Models.ManagedClusterAgentPoolProfile"/> instance for mocking. </returns>
public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(int? count = null, string vmSize = null, int? osDiskSizeInGB = null, ContainerServiceOSDiskType? osDiskType = null, KubeletDiskType? kubeletDiskType = null, WorkloadRuntime? workloadRuntime = null, ResourceIdentifier vnetSubnetId = null, ResourceIdentifier podSubnetId = null, int? maxPods = null, ContainerServiceOSType? osType = null, ContainerServiceOSSku? osSku = null, int? maxCount = null, int? minCount = null, bool? enableAutoScaling = null, ScaleDownMode? scaleDownMode = null, AgentPoolType? agentPoolType = null, AgentPoolMode? mode = null, string orchestratorVersion = null, string currentOrchestratorVersion = null, string nodeImageVersion = null, AgentPoolUpgradeSettings upgradeSettings = null, string provisioningState = null, ContainerServiceStateCode? powerStateCode = null, IEnumerable<string> availabilityZones = null, bool? enableNodePublicIP = null, ResourceIdentifier nodePublicIPPrefixId = null, ScaleSetPriority? scaleSetPriority = null, ScaleSetEvictionPolicy? scaleSetEvictionPolicy = null, float? spotMaxPrice = null, IDictionary<string, string> tags = null, IDictionary<string, string> nodeLabels = null, IEnumerable<string> nodeTaints = null, ResourceIdentifier proximityPlacementGroupId = null, KubeletConfig kubeletConfig = null, LinuxOSConfig linuxOSConfig = null, bool? enableEncryptionAtHost = null, bool? enableUltraSsd = null, bool? enableFips = null, GpuInstanceProfile? gpuInstanceProfile = null, ResourceIdentifier creationDataSourceResourceId = null, ResourceIdentifier capacityReservationGroupId = null, ResourceIdentifier hostGroupId = null, AgentPoolNetworkProfile networkProfile = null, string name = null)
{
availabilityZones ??= new List<string>();
tags ??= new Dictionary<string, string>();
nodeLabels ??= new Dictionary<string, string>();
nodeTaints ??= new List<string>();
return new ManagedClusterAgentPoolProfile(
count,
vmSize,
osDiskSizeInGB,
osDiskType,
kubeletDiskType,
workloadRuntime,
vnetSubnetId,
podSubnetId,
maxPods,
osType,
osSku,
maxCount,
minCount,
enableAutoScaling,
scaleDownMode,
agentPoolType,
mode,
orchestratorVersion,
currentOrchestratorVersion,
nodeImageVersion,
upgradeSettings,
provisioningState,
powerStateCode != null ? new ContainerServicePowerState(powerStateCode, serializedAdditionalRawData: null) : null,
availabilityZones?.ToList(),
enableNodePublicIP,
nodePublicIPPrefixId,
scaleSetPriority,
scaleSetEvictionPolicy,
spotMaxPrice,
tags,
nodeLabels,
nodeTaints?.ToList(),
proximityPlacementGroupId,
kubeletConfig,
linuxOSConfig,
enableEncryptionAtHost,
enableUltraSsd,
enableFips,
gpuInstanceProfile,
creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null,
capacityReservationGroupId,
hostGroupId,
networkProfile,
serializedAdditionalRawData: null,
name);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterAgentPoolProfileProperties"/>. </summary>
/// <param name="count"> Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. </param>
/// <param name="vmSize"> VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. </param>
/// <param name="osDiskSizeInGB"> OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. </param>
/// <param name="osDiskType"> The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). </param>
/// <param name="kubeletDiskType"> Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. </param>
/// <param name="workloadRuntime"> Determines the type of workload a node can run. </param>
/// <param name="vnetSubnetId"> If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. </param>
/// <param name="podSubnetId"> If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. </param>
/// <param name="maxPods"> The maximum number of pods that can run on a node. </param>
/// <param name="osType"> The operating system type. The default is Linux. </param>
/// <param name="osSku"> Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. </param>
/// <param name="maxCount"> The maximum number of nodes for auto-scaling. </param>
/// <param name="minCount"> The minimum number of nodes for auto-scaling. </param>
/// <param name="enableAutoScaling"> Whether to enable auto-scaler. </param>
/// <param name="scaleDownMode"> This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. </param>
/// <param name="agentPoolType"> The type of Agent Pool. </param>
/// <param name="mode"> A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. </param>
/// <param name="orchestratorVersion"> Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). </param>
/// <param name="currentOrchestratorVersion"> If orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> version being used. </param>
/// <param name="nodeImageVersion"> The version of node image. </param>
/// <param name="upgradeSettings"> Settings for upgrading the agentpool. </param>
/// <param name="provisioningState"> The current deployment or provisioning state. </param>
/// <param name="powerStateCode"> When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. </param>
/// <param name="availabilityZones"> The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. </param>
/// <param name="enableNodePublicIP"> Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false. </param>
/// <param name="nodePublicIPPrefixId"> This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. </param>
/// <param name="scaleSetPriority"> The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. </param>
/// <param name="scaleSetEvictionPolicy"> This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. </param>
/// <param name="spotMaxPrice"> Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). </param>
/// <param name="tags"> The tags to be persisted on the agent pool virtual machine scale set. </param>
/// <param name="nodeLabels"> The node labels to be persisted across all nodes in agent pool. </param>
/// <param name="nodeTaints"> The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. </param>
/// <param name="proximityPlacementGroupId"> The ID for Proximity Placement Group. </param>
/// <param name="kubeletConfig"> The Kubelet configuration on the agent pool nodes. </param>
/// <param name="linuxOSConfig"> The OS configuration of Linux agent nodes. </param>
/// <param name="enableEncryptionAtHost"> This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption. </param>
/// <param name="enableUltraSsd"> Whether to enable UltraSSD. </param>
/// <param name="enableFips"> See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details. </param>
/// <param name="gpuInstanceProfile"> GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. </param>
/// <param name="creationDataSourceResourceId"> CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. </param>
/// <param name="capacityReservationGroupId"> AKS will associate the specified agent pool with the Capacity Reservation Group. </param>
/// <param name="hostGroupId"> This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). </param>
/// <param name="networkProfile"> Network-related settings of an agent pool. </param>
/// <returns> A new <see cref="Models.ManagedClusterAgentPoolProfileProperties"/> instance for mocking. </returns>
public static ManagedClusterAgentPoolProfileProperties ManagedClusterAgentPoolProfileProperties(int? count = null, string vmSize = null, int? osDiskSizeInGB = null, ContainerServiceOSDiskType? osDiskType = null, KubeletDiskType? kubeletDiskType = null, WorkloadRuntime? workloadRuntime = null, ResourceIdentifier vnetSubnetId = null, ResourceIdentifier podSubnetId = null, int? maxPods = null, ContainerServiceOSType? osType = null, ContainerServiceOSSku? osSku = null, int? maxCount = null, int? minCount = null, bool? enableAutoScaling = null, ScaleDownMode? scaleDownMode = null, AgentPoolType? agentPoolType = null, AgentPoolMode? mode = null, string orchestratorVersion = null, string currentOrchestratorVersion = null, string nodeImageVersion = null, AgentPoolUpgradeSettings upgradeSettings = null, string provisioningState = null, ContainerServiceStateCode? powerStateCode = null, IEnumerable<string> availabilityZones = null, bool? enableNodePublicIP = null, ResourceIdentifier nodePublicIPPrefixId = null, ScaleSetPriority? scaleSetPriority = null, ScaleSetEvictionPolicy? scaleSetEvictionPolicy = null, float? spotMaxPrice = null, IDictionary<string, string> tags = null, IDictionary<string, string> nodeLabels = null, IEnumerable<string> nodeTaints = null, ResourceIdentifier proximityPlacementGroupId = null, KubeletConfig kubeletConfig = null, LinuxOSConfig linuxOSConfig = null, bool? enableEncryptionAtHost = null, bool? enableUltraSsd = null, bool? enableFips = null, GpuInstanceProfile? gpuInstanceProfile = null, ResourceIdentifier creationDataSourceResourceId = null, ResourceIdentifier capacityReservationGroupId = null, ResourceIdentifier hostGroupId = null, AgentPoolNetworkProfile networkProfile = null)
{
availabilityZones ??= new List<string>();
tags ??= new Dictionary<string, string>();
nodeLabels ??= new Dictionary<string, string>();
nodeTaints ??= new List<string>();
return new ManagedClusterAgentPoolProfileProperties(
count,
vmSize,
osDiskSizeInGB,
osDiskType,
kubeletDiskType,
workloadRuntime,
vnetSubnetId,
podSubnetId,
maxPods,
osType,
osSku,
maxCount,
minCount,
enableAutoScaling,
scaleDownMode,
agentPoolType,
mode,
orchestratorVersion,
currentOrchestratorVersion,
nodeImageVersion,
upgradeSettings,
provisioningState,
powerStateCode != null ? new ContainerServicePowerState(powerStateCode, serializedAdditionalRawData: null) : null,
availabilityZones?.ToList(),
enableNodePublicIP,
nodePublicIPPrefixId,
scaleSetPriority,
scaleSetEvictionPolicy,
spotMaxPrice,
tags,
nodeLabels,
nodeTaints?.ToList(),
proximityPlacementGroupId,
kubeletConfig,
linuxOSConfig,
enableEncryptionAtHost,
enableUltraSsd,
enableFips,
gpuInstanceProfile,
creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null,
capacityReservationGroupId,
hostGroupId,
networkProfile,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterAddonProfile"/>. </summary>
/// <param name="isEnabled"> Whether the add-on is enabled or not. </param>
/// <param name="config"> Key-value pairs for configuring an add-on. </param>
/// <param name="identity"> Information of user assigned identity used by this add-on. </param>
/// <returns> A new <see cref="Models.ManagedClusterAddonProfile"/> instance for mocking. </returns>
public static ManagedClusterAddonProfile ManagedClusterAddonProfile(bool isEnabled = default, IDictionary<string, string> config = null, ManagedClusterAddonProfileIdentity identity = null)
{
config ??= new Dictionary<string, string>();
return new ManagedClusterAddonProfile(isEnabled, config, identity, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterPodIdentity"/>. </summary>
/// <param name="name"> The name of the pod identity. </param>
/// <param name="namespace"> The namespace of the pod identity. </param>
/// <param name="bindingSelector"> The binding selector to use for the AzureIdentityBinding resource. </param>
/// <param name="identity"> The user assigned identity details. </param>
/// <param name="provisioningState"> The current provisioning state of the pod identity. </param>
/// <param name="errorDetail"></param>
/// <returns> A new <see cref="Models.ManagedClusterPodIdentity"/> instance for mocking. </returns>
public static ManagedClusterPodIdentity ManagedClusterPodIdentity(string name = null, string @namespace = null, string bindingSelector = null, ContainerServiceUserAssignedIdentity identity = null, ManagedClusterPodIdentityProvisioningState? provisioningState = null, ResponseError errorDetail = null)
{
return new ManagedClusterPodIdentity(
name,
@namespace,
bindingSelector,
identity,
provisioningState,
errorDetail != null ? new ManagedClusterPodIdentityProvisioningInfo(new ManagedClusterPodIdentityProvisioningError(errorDetail, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterOidcIssuerProfile"/>. </summary>
/// <param name="issuerUriInfo"> The OIDC issuer url of the Managed Cluster. </param>
/// <param name="isEnabled"> Whether the OIDC issuer is enabled. </param>
/// <returns> A new <see cref="Models.ManagedClusterOidcIssuerProfile"/> instance for mocking. </returns>
public static ManagedClusterOidcIssuerProfile ManagedClusterOidcIssuerProfile(string issuerUriInfo = null, bool? isEnabled = null)
{
return new ManagedClusterOidcIssuerProfile(issuerUriInfo, isEnabled, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ContainerServicePrivateLinkResourceData"/>. </summary>
/// <param name="id"> The ID of the private link resource. </param>
/// <param name="name"> The name of the private link resource. </param>
/// <param name="resourceType"> The resource type. </param>
/// <param name="groupId"> The group ID of the resource. </param>
/// <param name="requiredMembers"> The RequiredMembers of the resource. </param>
/// <param name="privateLinkServiceId"> The private link service ID of the resource, this field is exposed only to NRP internally. </param>
/// <returns> A new <see cref="Models.ContainerServicePrivateLinkResourceData"/> instance for mocking. </returns>
public static ContainerServicePrivateLinkResourceData ContainerServicePrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string groupId = null, IEnumerable<string> requiredMembers = null, ResourceIdentifier privateLinkServiceId = null)
{
requiredMembers ??= new List<string>();
return new ContainerServicePrivateLinkResourceData(
id,
name,
resourceType,
groupId,
requiredMembers?.ToList(),
privateLinkServiceId,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="ContainerService.ManagedClusterUpgradeProfileData"/>. </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="controlPlaneProfile"> The list of available upgrade versions for the control plane. </param>
/// <param name="agentPoolProfiles"> The list of available upgrade versions for agent pools. </param>
/// <returns> A new <see cref="ContainerService.ManagedClusterUpgradeProfileData"/> instance for mocking. </returns>
public static ManagedClusterUpgradeProfileData ManagedClusterUpgradeProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedClusterPoolUpgradeProfile controlPlaneProfile = null, IEnumerable<ManagedClusterPoolUpgradeProfile> agentPoolProfiles = null)
{
agentPoolProfiles ??= new List<ManagedClusterPoolUpgradeProfile>();
return new ManagedClusterUpgradeProfileData(
id,
name,
resourceType,
systemData,
controlPlaneProfile,
agentPoolProfiles?.ToList(),
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterPoolUpgradeProfile"/>. </summary>
/// <param name="kubernetesVersion"> The Kubernetes version (major.minor.patch). </param>
/// <param name="name"> The Agent Pool name. </param>
/// <param name="osType"> The operating system type. The default is Linux. </param>
/// <param name="upgrades"> List of orchestrator types and versions available for upgrade. </param>
/// <returns> A new <see cref="Models.ManagedClusterPoolUpgradeProfile"/> instance for mocking. </returns>
public static ManagedClusterPoolUpgradeProfile ManagedClusterPoolUpgradeProfile(string kubernetesVersion = null, string name = null, ContainerServiceOSType osType = default, IEnumerable<ManagedClusterPoolUpgradeProfileUpgradesItem> upgrades = null)
{
upgrades ??= new List<ManagedClusterPoolUpgradeProfileUpgradesItem>();
return new ManagedClusterPoolUpgradeProfile(kubernetesVersion, name, osType, upgrades?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterPoolUpgradeProfileUpgradesItem"/>. </summary>
/// <param name="kubernetesVersion"> The Kubernetes version (major.minor.patch). </param>
/// <param name="isPreview"> Whether the Kubernetes version is currently in preview. </param>
/// <returns> A new <see cref="Models.ManagedClusterPoolUpgradeProfileUpgradesItem"/> instance for mocking. </returns>
public static ManagedClusterPoolUpgradeProfileUpgradesItem ManagedClusterPoolUpgradeProfileUpgradesItem(string kubernetesVersion = null, bool? isPreview = null)
{
return new ManagedClusterPoolUpgradeProfileUpgradesItem(kubernetesVersion, isPreview, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterAccessProfile"/>. </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="kubeConfig"> Base64-encoded Kubernetes configuration file. </param>
/// <returns> A new <see cref="Models.ManagedClusterAccessProfile"/> instance for mocking. </returns>
public static ManagedClusterAccessProfile ManagedClusterAccessProfile(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary<string, string> tags = null, AzureLocation location = default, byte[] kubeConfig = null)
{
tags ??= new Dictionary<string, string>();
return new ManagedClusterAccessProfile(
id,
name,
resourceType,
systemData,
tags,
location,
kubeConfig,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterCredentials"/>. </summary>
/// <param name="kubeconfigs"> Base64-encoded Kubernetes configuration file. </param>
/// <returns> A new <see cref="Models.ManagedClusterCredentials"/> instance for mocking. </returns>
public static ManagedClusterCredentials ManagedClusterCredentials(IEnumerable<ManagedClusterCredential> kubeconfigs = null)
{
kubeconfigs ??= new List<ManagedClusterCredential>();
return new ManagedClusterCredentials(kubeconfigs?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterCredential"/>. </summary>
/// <param name="name"> The name of the credential. </param>
/// <param name="value"> Base64-encoded Kubernetes configuration file. </param>
/// <returns> A new <see cref="Models.ManagedClusterCredential"/> instance for mocking. </returns>
public static ManagedClusterCredential ManagedClusterCredential(string name = null, byte[] value = null)
{
return new ManagedClusterCredential(name, value, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="ContainerService.ContainerServiceMaintenanceConfigurationData"/>. </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="timesInWeek"> If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. </param>
/// <param name="notAllowedTimes"> Time slots on which upgrade is not allowed. </param>
/// <param name="maintenanceWindow"> Maintenance window for the maintenance configuration. </param>
/// <returns> A new <see cref="ContainerService.ContainerServiceMaintenanceConfigurationData"/> instance for mocking. </returns>
public static ContainerServiceMaintenanceConfigurationData ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable<ContainerServiceTimeInWeek> timesInWeek = null, IEnumerable<ContainerServiceTimeSpan> notAllowedTimes = null, ContainerServiceMaintenanceWindow maintenanceWindow = null)
{
timesInWeek ??= new List<ContainerServiceTimeInWeek>();
notAllowedTimes ??= new List<ContainerServiceTimeSpan>();
return new ContainerServiceMaintenanceConfigurationData(
id,
name,
resourceType,
systemData,
timesInWeek?.ToList(),
notAllowedTimes?.ToList(),
maintenanceWindow,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="ContainerService.ContainerServiceAgentPoolData"/>. </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="count"> Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. </param>
/// <param name="vmSize"> VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. </param>
/// <param name="osDiskSizeInGB"> OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified. </param>
/// <param name="osDiskType"> The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more information see [Ephemeral OS](https://docs.microsoft.com/azure/aks/cluster-configuration#ephemeral-os). </param>
/// <param name="kubeletDiskType"> Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. </param>
/// <param name="workloadRuntime"> Determines the type of workload a node can run. </param>
/// <param name="vnetSubnetId"> If this is not specified, a VNET and subnet will be generated and used. If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just nodes. This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. </param>
/// <param name="podSubnetId"> If omitted, pod IPs are statically assigned on the node subnet (see vnetSubnetID for more details). This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. </param>
/// <param name="maxPods"> The maximum number of pods that can run on a node. </param>
/// <param name="osType"> The operating system type. The default is Linux. </param>
/// <param name="osSku"> Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. </param>
/// <param name="maxCount"> The maximum number of nodes for auto-scaling. </param>
/// <param name="minCount"> The minimum number of nodes for auto-scaling. </param>
/// <param name="enableAutoScaling"> Whether to enable auto-scaler. </param>
/// <param name="scaleDownMode"> This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. </param>
/// <param name="typePropertiesType"> The type of Agent Pool. </param>
/// <param name="mode"> A cluster must have at least one 'System' Agent Pool at all times. For additional information on agent pool restrictions and best practices, see: https://docs.microsoft.com/azure/aks/use-system-pools. </param>
/// <param name="orchestratorVersion"> Both patch version <major.minor.patch> (e.g. 1.20.13) and <major.minor> (e.g. 1.20) are supported. When <major.minor> is specified, the latest supported GA patch version is chosen automatically. Updating the cluster with the same <major.minor> once it has been created (e.g. 1.14.x -> 1.14) will not trigger an upgrade, even if a newer patch version is available. As a best practice, you should upgrade all node pools in an AKS cluster to the same Kubernetes version. The node pool version must have the same major version as the control plane. The node pool minor version must be within two minor versions of the control plane version. The node pool version cannot be greater than the control plane version. For more information see [upgrading a node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#upgrade-a-node-pool). </param>
/// <param name="currentOrchestratorVersion"> If orchestratorVersion is a fully specified version <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion is <major.minor>, this field will contain the full <major.minor.patch> version being used. </param>
/// <param name="nodeImageVersion"> The version of node image. </param>
/// <param name="upgradeSettings"> Settings for upgrading the agentpool. </param>
/// <param name="provisioningState"> The current deployment or provisioning state. </param>
/// <param name="powerStateCode"> When an Agent Pool is first created it is initially Running. The Agent Pool can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and does not accrue billing charges. An Agent Pool can only be stopped if it is Running and provisioning state is Succeeded. </param>
/// <param name="availabilityZones"> The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. </param>
/// <param name="enableNodePublicIP"> Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see [assigning a public IP per node](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools). The default is false. </param>
/// <param name="nodePublicIPPrefixId"> This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. </param>
/// <param name="scaleSetPriority"> The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. </param>
/// <param name="scaleSetEvictionPolicy"> This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. </param>
/// <param name="spotMaxPrice"> Possible values are any decimal value greater than zero or -1 which indicates the willingness to pay any on-demand price. For more details on spot pricing, see [spot VMs pricing](https://docs.microsoft.com/azure/virtual-machines/spot-vms#pricing). </param>
/// <param name="tags"> The tags to be persisted on the agent pool virtual machine scale set. </param>
/// <param name="nodeLabels"> The node labels to be persisted across all nodes in agent pool. </param>
/// <param name="nodeTaints"> The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. </param>
/// <param name="proximityPlacementGroupId"> The ID for Proximity Placement Group. </param>
/// <param name="kubeletConfig"> The Kubelet configuration on the agent pool nodes. </param>
/// <param name="linuxOSConfig"> The OS configuration of Linux agent nodes. </param>
/// <param name="enableEncryptionAtHost"> This is only supported on certain VM sizes and in certain Azure regions. For more information, see: https://docs.microsoft.com/azure/aks/enable-host-encryption. </param>
/// <param name="enableUltraSsd"> Whether to enable UltraSSD. </param>
/// <param name="enableFips"> See [Add a FIPS-enabled node pool](https://docs.microsoft.com/azure/aks/use-multiple-node-pools#add-a-fips-enabled-node-pool-preview) for more details. </param>
/// <param name="gpuInstanceProfile"> GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. </param>
/// <param name="creationDataSourceResourceId"> CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. </param>
/// <param name="capacityReservationGroupId"> AKS will associate the specified agent pool with the Capacity Reservation Group. </param>
/// <param name="hostGroupId"> This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). </param>
/// <param name="networkProfile"> Network-related settings of an agent pool. </param>
/// <returns> A new <see cref="ContainerService.ContainerServiceAgentPoolData"/> instance for mocking. </returns>
public static ContainerServiceAgentPoolData ContainerServiceAgentPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, int? count = null, string vmSize = null, int? osDiskSizeInGB = null, ContainerServiceOSDiskType? osDiskType = null, KubeletDiskType? kubeletDiskType = null, WorkloadRuntime? workloadRuntime = null, ResourceIdentifier vnetSubnetId = null, ResourceIdentifier podSubnetId = null, int? maxPods = null, ContainerServiceOSType? osType = null, ContainerServiceOSSku? osSku = null, int? maxCount = null, int? minCount = null, bool? enableAutoScaling = null, ScaleDownMode? scaleDownMode = null, AgentPoolType? typePropertiesType = null, AgentPoolMode? mode = null, string orchestratorVersion = null, string currentOrchestratorVersion = null, string nodeImageVersion = null, AgentPoolUpgradeSettings upgradeSettings = null, string provisioningState = null, ContainerServiceStateCode? powerStateCode = null, IEnumerable<string> availabilityZones = null, bool? enableNodePublicIP = null, ResourceIdentifier nodePublicIPPrefixId = null, ScaleSetPriority? scaleSetPriority = null, ScaleSetEvictionPolicy? scaleSetEvictionPolicy = null, float? spotMaxPrice = null, IDictionary<string, string> tags = null, IDictionary<string, string> nodeLabels = null, IEnumerable<string> nodeTaints = null, ResourceIdentifier proximityPlacementGroupId = null, KubeletConfig kubeletConfig = null, LinuxOSConfig linuxOSConfig = null, bool? enableEncryptionAtHost = null, bool? enableUltraSsd = null, bool? enableFips = null, GpuInstanceProfile? gpuInstanceProfile = null, ResourceIdentifier creationDataSourceResourceId = null, ResourceIdentifier capacityReservationGroupId = null, ResourceIdentifier hostGroupId = null, AgentPoolNetworkProfile networkProfile = null)
{
availabilityZones ??= new List<string>();
tags ??= new Dictionary<string, string>();
nodeLabels ??= new Dictionary<string, string>();
nodeTaints ??= new List<string>();
return new ContainerServiceAgentPoolData(
id,
name,
resourceType,
systemData,
count,
vmSize,
osDiskSizeInGB,
osDiskType,
kubeletDiskType,
workloadRuntime,
vnetSubnetId,
podSubnetId,
maxPods,
osType,
osSku,
maxCount,
minCount,
enableAutoScaling,
scaleDownMode,
typePropertiesType,
mode,
orchestratorVersion,
currentOrchestratorVersion,
nodeImageVersion,
upgradeSettings,
provisioningState,
powerStateCode != null ? new ContainerServicePowerState(powerStateCode, serializedAdditionalRawData: null) : null,
availabilityZones?.ToList(),
enableNodePublicIP,
nodePublicIPPrefixId,
scaleSetPriority,
scaleSetEvictionPolicy,
spotMaxPrice,
tags,
nodeLabels,
nodeTaints?.ToList(),
proximityPlacementGroupId,
kubeletConfig,
linuxOSConfig,
enableEncryptionAtHost,
enableUltraSsd,
enableFips,
gpuInstanceProfile,
creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null,
capacityReservationGroupId,
hostGroupId,
networkProfile,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="ContainerService.AgentPoolUpgradeProfileData"/>. </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="kubernetesVersion"> The Kubernetes version (major.minor.patch). </param>
/// <param name="osType"> The operating system type. The default is Linux. </param>
/// <param name="upgrades"> List of orchestrator types and versions available for upgrade. </param>
/// <param name="latestNodeImageVersion"> The latest AKS supported node image version. </param>
/// <returns> A new <see cref="ContainerService.AgentPoolUpgradeProfileData"/> instance for mocking. </returns>
public static AgentPoolUpgradeProfileData AgentPoolUpgradeProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kubernetesVersion = null, ContainerServiceOSType osType = default, IEnumerable<AgentPoolUpgradeProfilePropertiesUpgradesItem> upgrades = null, string latestNodeImageVersion = null)
{
upgrades ??= new List<AgentPoolUpgradeProfilePropertiesUpgradesItem>();
return new AgentPoolUpgradeProfileData(
id,
name,
resourceType,
systemData,
kubernetesVersion,
osType,
upgrades?.ToList(),
latestNodeImageVersion,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.AgentPoolUpgradeProfilePropertiesUpgradesItem"/>. </summary>
/// <param name="kubernetesVersion"> The Kubernetes version (major.minor.patch). </param>
/// <param name="isPreview"> Whether the Kubernetes version is currently in preview. </param>
/// <returns> A new <see cref="Models.AgentPoolUpgradeProfilePropertiesUpgradesItem"/> instance for mocking. </returns>
public static AgentPoolUpgradeProfilePropertiesUpgradesItem AgentPoolUpgradeProfilePropertiesUpgradesItem(string kubernetesVersion = null, bool? isPreview = null)
{
return new AgentPoolUpgradeProfilePropertiesUpgradesItem(kubernetesVersion, isPreview, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.AgentPoolAvailableVersions"/>. </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="agentPoolVersions"> List of versions available for agent pool. </param>
/// <returns> A new <see cref="Models.AgentPoolAvailableVersions"/> instance for mocking. </returns>
public static AgentPoolAvailableVersions AgentPoolAvailableVersions(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable<AgentPoolAvailableVersion> agentPoolVersions = null)
{
agentPoolVersions ??= new List<AgentPoolAvailableVersion>();
return new AgentPoolAvailableVersions(
id,
name,
resourceType,
systemData,
agentPoolVersions?.ToList(),
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.AgentPoolAvailableVersion"/>. </summary>
/// <param name="isDefault"> Whether this version is the default agent pool version. </param>
/// <param name="kubernetesVersion"> The Kubernetes version (major.minor.patch). </param>
/// <param name="isPreview"> Whether Kubernetes version is currently in preview. </param>
/// <returns> A new <see cref="Models.AgentPoolAvailableVersion"/> instance for mocking. </returns>
public static AgentPoolAvailableVersion AgentPoolAvailableVersion(bool? isDefault = null, string kubernetesVersion = null, bool? isPreview = null)
{
return new AgentPoolAvailableVersion(isDefault, kubernetesVersion, isPreview, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="ContainerService.ContainerServicePrivateEndpointConnectionData"/>. </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="provisioningState"> The current provisioning state. </param>
/// <param name="privateEndpointId"> The resource of private endpoint. </param>
/// <param name="connectionState"> A collection of information about the state of the connection between service consumer and provider. </param>
/// <returns> A new <see cref="ContainerService.ContainerServicePrivateEndpointConnectionData"/> instance for mocking. </returns>
public static ContainerServicePrivateEndpointConnectionData ContainerServicePrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContainerServicePrivateEndpointConnectionProvisioningState? provisioningState = null, ResourceIdentifier privateEndpointId = null, ContainerServicePrivateLinkServiceConnectionState connectionState = null)
{
return new ContainerServicePrivateEndpointConnectionData(
id,
name,
resourceType,
systemData,
provisioningState,
privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null,
connectionState,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterRunCommandContent"/>. </summary>
/// <param name="command"> The command to run. </param>
/// <param name="context"> A base64 encoded zip file containing the files required by the command. </param>
/// <param name="clusterToken"> AuthToken issued for AKS AAD Server App. </param>
/// <returns> A new <see cref="Models.ManagedClusterRunCommandContent"/> instance for mocking. </returns>
public static ManagedClusterRunCommandContent ManagedClusterRunCommandContent(string command = null, string context = null, string clusterToken = null)
{
return new ManagedClusterRunCommandContent(command, context, clusterToken, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ManagedClusterRunCommandResult"/>. </summary>
/// <param name="id"> The command id. </param>
/// <param name="provisioningState"> provisioning State. </param>
/// <param name="exitCode"> The exit code of the command. </param>
/// <param name="startedOn"> The time when the command started. </param>
/// <param name="finishedOn"> The time when the command finished. </param>
/// <param name="logs"> The command output. </param>
/// <param name="reason"> An explanation of why provisioningState is set to failed (if so). </param>
/// <returns> A new <see cref="Models.ManagedClusterRunCommandResult"/> instance for mocking. </returns>
public static ManagedClusterRunCommandResult ManagedClusterRunCommandResult(string id = null, string provisioningState = null, int? exitCode = null, DateTimeOffset? startedOn = null, DateTimeOffset? finishedOn = null, string logs = null, string reason = null)
{
return new ManagedClusterRunCommandResult(
id,
provisioningState,
exitCode,
startedOn,
finishedOn,
logs,
reason,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ContainerServiceOutboundEnvironmentEndpoint"/>. </summary>
/// <param name="category"> The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. </param>
/// <param name="endpoints"> The endpoints that AKS agent nodes connect to. </param>
/// <returns> A new <see cref="Models.ContainerServiceOutboundEnvironmentEndpoint"/> instance for mocking. </returns>
public static ContainerServiceOutboundEnvironmentEndpoint ContainerServiceOutboundEnvironmentEndpoint(string category = null, IEnumerable<ContainerServiceEndpointDependency> endpoints = null)
{
endpoints ??= new List<ContainerServiceEndpointDependency>();
return new ContainerServiceOutboundEnvironmentEndpoint(category, endpoints?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ContainerServiceEndpointDependency"/>. </summary>
/// <param name="domainName"> The domain name of the dependency. </param>
/// <param name="endpointDetails"> The Ports and Protocols used when connecting to domainName. </param>
/// <returns> A new <see cref="Models.ContainerServiceEndpointDependency"/> instance for mocking. </returns>
public static ContainerServiceEndpointDependency ContainerServiceEndpointDependency(string domainName = null, IEnumerable<ContainerServiceEndpointDetail> endpointDetails = null)
{
endpointDetails ??= new List<ContainerServiceEndpointDetail>();
return new ContainerServiceEndpointDependency(domainName, endpointDetails?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ContainerServiceEndpointDetail"/>. </summary>
/// <param name="ipAddress"> An IP Address that Domain Name currently resolves to. </param>
/// <param name="port"> The port an endpoint is connected to. </param>
/// <param name="protocol"> The protocol used for connection. </param>
/// <param name="description"> Description of the detail. </param>
/// <returns> A new <see cref="Models.ContainerServiceEndpointDetail"/> instance for mocking. </returns>
public static ContainerServiceEndpointDetail ContainerServiceEndpointDetail(IPAddress ipAddress = null, int? port = null, string protocol = null, string description = null)
{
return new ContainerServiceEndpointDetail(ipAddress, port, protocol, description, serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="ContainerService.AgentPoolSnapshotData"/>. </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="creationDataSourceResourceId"> CreationData to be used to specify the source agent pool resource ID to create this snapshot. </param>
/// <param name="snapshotType"> The type of a snapshot. The default is NodePool. </param>
/// <param name="kubernetesVersion"> The version of Kubernetes. </param>
/// <param name="nodeImageVersion"> The version of node image. </param>
/// <param name="osType"> The operating system type. The default is Linux. </param>
/// <param name="osSku"> Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. </param>
/// <param name="vmSize"> The size of the VM. </param>
/// <param name="enableFips"> Whether to use a FIPS-enabled OS. </param>
/// <returns> A new <see cref="ContainerService.AgentPoolSnapshotData"/> instance for mocking. </returns>
public static AgentPoolSnapshotData AgentPoolSnapshotData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary<string, string> tags = null, AzureLocation location = default, ResourceIdentifier creationDataSourceResourceId = null, SnapshotType? snapshotType = null, string kubernetesVersion = null, string nodeImageVersion = null, ContainerServiceOSType? osType = null, ContainerServiceOSSku? osSku = null, string vmSize = null, bool? enableFips = null)
{
tags ??= new Dictionary<string, string>();
return new AgentPoolSnapshotData(
id,
name,
resourceType,
systemData,
tags,
location,
creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null,
snapshotType,
kubernetesVersion,
nodeImageVersion,
osType,
osSku,
vmSize,
enableFips,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="ContainerService.MeshRevisionProfileData"/>. </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="meshRevisions"> Mesh revision profile properties for a mesh. </param>
/// <returns> A new <see cref="ContainerService.MeshRevisionProfileData"/> instance for mocking. </returns>
public static MeshRevisionProfileData MeshRevisionProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable<MeshRevision> meshRevisions = null)
{
meshRevisions ??= new List<MeshRevision>();
return new MeshRevisionProfileData(
id,
name,
resourceType,
systemData,
meshRevisions != null ? new MeshRevisionProfileProperties(meshRevisions?.ToList(), serializedAdditionalRawData: null) : null,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="ContainerService.MeshUpgradeProfileData"/>. </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="properties"> Mesh upgrade profile properties for a major.minor release. </param>
/// <returns> A new <see cref="ContainerService.MeshUpgradeProfileData"/> instance for mocking. </returns>
public static MeshUpgradeProfileData MeshUpgradeProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MeshUpgradeProfileProperties properties = null)
{
return new MeshUpgradeProfileData(
id,
name,
resourceType,
systemData,
properties,
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="ContainerService.ContainerServiceTrustedAccessRoleBindingData"/>. </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="provisioningState"> The current provisioning state of trusted access role binding. </param>
/// <param name="sourceResourceId"> The ARM resource ID of source resource that trusted access is configured for. </param>
/// <param name="roles"> A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'. </param>
/// <returns> A new <see cref="ContainerService.ContainerServiceTrustedAccessRoleBindingData"/> instance for mocking. </returns>
public static ContainerServiceTrustedAccessRoleBindingData ContainerServiceTrustedAccessRoleBindingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContainerServiceTrustedAccessRoleBindingProvisioningState? provisioningState = null, ResourceIdentifier sourceResourceId = null, IEnumerable<string> roles = null)
{
roles ??= new List<string>();
return new ContainerServiceTrustedAccessRoleBindingData(
id,
name,
resourceType,
systemData,
provisioningState,
sourceResourceId,
roles?.ToList(),
serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ContainerServiceTrustedAccessRole"/>. </summary>
/// <param name="sourceResourceType"> Resource type of Azure resource. </param>
/// <param name="name"> Name of role, name is unique under a source resource type. </param>
/// <param name="rules"> List of rules for the role. This maps to 'rules' property of [Kubernetes Cluster Role](https://kubernetes.io/docs/reference/kubernetes-api/authorization-resources/cluster-role-v1/#ClusterRole). </param>
/// <returns> A new <see cref="Models.ContainerServiceTrustedAccessRole"/> instance for mocking. </returns>
public static ContainerServiceTrustedAccessRole ContainerServiceTrustedAccessRole(string sourceResourceType = null, string name = null, IEnumerable<ContainerServiceTrustedAccessRoleRule> rules = null)
{
rules ??= new List<ContainerServiceTrustedAccessRoleRule>();
return new ContainerServiceTrustedAccessRole(sourceResourceType, name, rules?.ToList(), serializedAdditionalRawData: null);
}
/// <summary> Initializes a new instance of <see cref="Models.ContainerServiceTrustedAccessRoleRule"/>. </summary>
/// <param name="verbs"> List of allowed verbs. </param>
/// <param name="apiGroups"> List of allowed apiGroups. </param>
/// <param name="resources"> List of allowed resources. </param>
/// <param name="resourceNames"> List of allowed names. </param>
/// <param name="nonResourceUrls"> List of allowed nonResourceURLs. </param>
/// <returns> A new <see cref="Models.ContainerServiceTrustedAccessRoleRule"/> instance for mocking. </returns>
public static ContainerServiceTrustedAccessRoleRule ContainerServiceTrustedAccessRoleRule(IEnumerable<string> verbs = null, IEnumerable<string> apiGroups = null, IEnumerable<string> resources = null, IEnumerable<string> resourceNames = null, IEnumerable<string> nonResourceUrls = null)
{
verbs ??= new List<string>();
apiGroups ??= new List<string>();
resources ??= new List<string>();
resourceNames ??= new List<string>();
nonResourceUrls ??= new List<string>();
return new ContainerServiceTrustedAccessRoleRule(
verbs?.ToList(),
apiGroups?.ToList(),
resources?.ToList(),
resourceNames?.ToList(),
nonResourceUrls?.ToList(),
serializedAdditionalRawData: null);
}
}
}