diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotCollection.cs
index 327b8b63ae23..fef9ec48e2d1 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotCollection.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdat
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string r
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -257,7 +257,7 @@ public virtual Response Get(string resourceName, Canc
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken canc
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string resourceName, Cance
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -403,7 +403,7 @@ public virtual Response Exists(string resourceName, CancellationToken canc
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -448,7 +448,7 @@ public virtual async Task> GetIfExis
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs
index 1bbf5325758a..95dd228fc3b1 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs
@@ -69,7 +69,7 @@ public AgentPoolSnapshotData(AzureLocation location) : base(location)
/// The version of Kubernetes.
/// The version of node image.
/// The operating system type. The default is Linux.
- /// 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.
+ /// Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated.
/// The size of the VM.
/// Whether to use a FIPS-enabled OS.
/// Keeps track of any properties unknown to the library.
@@ -113,7 +113,7 @@ public ResourceIdentifier CreationDataSourceResourceId
public string NodeImageVersion { get; }
/// The operating system type. The default is Linux.
public ContainerServiceOSType? OSType { get; }
- /// 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.
+ /// Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated.
public ContainerServiceOSSku? OSSku { get; }
/// The size of the VM.
public string VmSize { get; }
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotResource.cs
index 6045d3413e5b..9d10ca41a9cc 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotResource.cs
@@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -143,7 +143,7 @@ public virtual async Task> GetAsync(Cancella
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancell
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(Conta
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -355,7 +355,7 @@ public virtual Response Update(ContainerServiceTagsOb
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -417,7 +417,7 @@ public virtual async Task> AddTagAsync(strin
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -479,7 +479,7 @@ public virtual Response AddTag(string key, string val
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -536,7 +536,7 @@ public virtual async Task> SetTagsAsync(IDic
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -593,7 +593,7 @@ public virtual Response SetTags(IDictionary
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -653,7 +653,7 @@ public virtual async Task> RemoveTagAsync(st
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs
index 419d90b11e1d..36490fd52886 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs
@@ -64,6 +64,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelR
}
writer.WriteEndArray();
}
+ if (Optional.IsDefined(ComponentsByReleases))
+ {
+ writer.WritePropertyName("componentsByReleases"u8);
+ writer.WriteObjectValue(ComponentsByReleases, options);
+ }
if (Optional.IsDefined(LatestNodeImageVersion))
{
writer.WritePropertyName("latestNodeImageVersion"u8);
@@ -115,6 +120,7 @@ internal static AgentPoolUpgradeProfileData DeserializeAgentPoolUpgradeProfileDa
string kubernetesVersion = default;
ContainerServiceOSType osType = default;
IReadOnlyList upgrades = default;
+ ComponentsByReleases componentsByReleases = default;
string latestNodeImageVersion = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
@@ -177,6 +183,15 @@ internal static AgentPoolUpgradeProfileData DeserializeAgentPoolUpgradeProfileDa
upgrades = array;
continue;
}
+ if (property0.NameEquals("componentsByReleases"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ componentsByReleases = ComponentsByReleases.DeserializeComponentsByReleases(property0.Value, options);
+ continue;
+ }
if (property0.NameEquals("latestNodeImageVersion"u8))
{
latestNodeImageVersion = property0.Value.GetString();
@@ -199,6 +214,7 @@ internal static AgentPoolUpgradeProfileData DeserializeAgentPoolUpgradeProfileDa
kubernetesVersion,
osType,
upgrades ?? new ChangeTrackingList(),
+ componentsByReleases,
latestNodeImageVersion,
serializedAdditionalRawData);
}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs
index 1269f3b9a22f..c4557081cedf 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs
@@ -72,13 +72,15 @@ internal AgentPoolUpgradeProfileData(string kubernetesVersion, ContainerServiceO
/// The Kubernetes version (major.minor.patch).
/// The operating system type. The default is Linux.
/// List of orchestrator types and versions available for upgrade.
+ /// components of given Kubernetes version.
/// The latest AKS supported node image version.
/// Keeps track of any properties unknown to the library.
- internal AgentPoolUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kubernetesVersion, ContainerServiceOSType osType, IReadOnlyList upgrades, string latestNodeImageVersion, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ internal AgentPoolUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kubernetesVersion, ContainerServiceOSType osType, IReadOnlyList upgrades, ComponentsByReleases componentsByReleases, string latestNodeImageVersion, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
{
KubernetesVersion = kubernetesVersion;
OSType = osType;
Upgrades = upgrades;
+ ComponentsByReleases = componentsByReleases;
LatestNodeImageVersion = latestNodeImageVersion;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
@@ -94,6 +96,8 @@ internal AgentPoolUpgradeProfileData()
public ContainerServiceOSType OSType { get; }
/// List of orchestrator types and versions available for upgrade.
public IReadOnlyList Upgrades { get; }
+ /// components of given Kubernetes version.
+ public ComponentsByReleases ComponentsByReleases { get; }
/// The latest AKS supported node image version.
public string LatestNodeImageVersion { get; }
}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileResource.cs
index 9c357b37cb3d..3842a9403d93 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileResource.cs
@@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Ca
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs
index d8ce03a6d98a..8114a506ff9f 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using System.Net;
using Azure.Core;
@@ -60,15 +61,22 @@ public static KubernetesVersionListResult KubernetesVersionListResult(IEnumerabl
/// Initializes a new instance of .
/// major.minor version of Kubernetes release.
/// Capabilities on this Kubernetes version.
+ /// Whether this version is default.
/// Whether this version is in preview mode.
/// Patch versions of Kubernetes release.
/// A new instance for mocking.
- public static KubernetesVersion KubernetesVersion(string version = null, IEnumerable capabilitiesSupportPlan = null, bool? isPreview = null, IReadOnlyDictionary patchVersions = null)
+ public static KubernetesVersion KubernetesVersion(string version = null, IEnumerable capabilitiesSupportPlan = null, bool? isDefault = null, bool? isPreview = null, IReadOnlyDictionary patchVersions = null)
{
capabilitiesSupportPlan ??= new List();
patchVersions ??= new Dictionary();
- return new KubernetesVersion(version, capabilitiesSupportPlan != null ? new KubernetesVersionCapabilities(capabilitiesSupportPlan?.ToList(), serializedAdditionalRawData: null) : null, isPreview, patchVersions, serializedAdditionalRawData: null);
+ return new KubernetesVersion(
+ version,
+ capabilitiesSupportPlan != null ? new KubernetesVersionCapabilities(capabilitiesSupportPlan?.ToList(), serializedAdditionalRawData: null) : null,
+ isDefault,
+ isPreview,
+ patchVersions,
+ serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
@@ -88,14 +96,17 @@ public static KubernetesPatchVersion KubernetesPatchVersion(IEnumerable
/// The systemData.
/// The tags.
/// The location.
+ /// Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention.
/// The managed cluster SKU.
/// The extended location of the Virtual Machine.
/// The identity of the managed cluster, if configured.
+ /// This is primarily used to expose different UI experiences in the portal for different kinds.
/// The current provisioning state.
/// The Power State of the cluster.
+ /// CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot.
/// The max number of agent pools for the managed cluster.
- /// 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.
- /// 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.
+ /// 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.
+ /// The version of Kubernetes the Managed Cluster is running.
/// This cannot be updated once the Managed Cluster has been created.
/// This cannot be updated once the Managed Cluster has been created.
/// The FQDN of the master pool.
@@ -109,9 +120,11 @@ public static KubernetesPatchVersion KubernetesPatchVersion(IEnumerable
/// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity integration.
/// The OIDC issuer profile of the Managed Cluster.
/// The name of the resource group containing agent pool nodes.
+ /// The node resource group configuration profile.
/// Whether to enable Kubernetes Role-Based Access Control.
/// The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'.
/// (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.
+ /// 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.
/// The network configuration profile.
/// The Azure Active Directory configuration.
/// The auto upgrade configuration.
@@ -125,13 +138,19 @@ public static KubernetesPatchVersion KubernetesPatchVersion(IEnumerable
/// Configurations for provisioning the cluster with HTTP proxy servers.
/// Security profile for the managed cluster.
/// Storage profile for the managed cluster.
+ /// Ingress profile for the managed cluster.
/// Allow or deny public network access for AKS.
/// Workload Auto-scaler profile for the managed cluster.
- /// Azure Monitor addon profiles for monitoring the managed cluster.
+ /// Prometheus addon profile for the container service cluster.
+ /// The Safeguards profile holds all the safeguards information for a given cluster.
/// Service mesh profile for a managed cluster.
/// The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence).
+ /// Optional cluster metrics configuration.
+ /// AI toolchain operator settings that apply to the whole cluster.
+ /// Node provisioning settings that apply to the whole cluster.
+ /// Profile of the cluster bootstrap configuration.
/// A new instance for mocking.
- public static ContainerServiceManagedClusterData ContainerServiceManagedClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary 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 agentPoolProfiles = null, ContainerServiceLinuxProfile linuxProfile = null, ManagedClusterWindowsProfile windowsProfile = null, ManagedClusterServicePrincipalProfile servicePrincipalProfile = null, IDictionary 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 identityProfile = null, IEnumerable 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)
+ public static ContainerServiceManagedClusterData ContainerServiceManagedClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? eTag = null, ManagedClusterSku sku = null, ExtendedLocation extendedLocation = null, ManagedClusterIdentity clusterIdentity = null, string kind = null, string provisioningState = null, ContainerServiceStateCode? powerStateCode = null, ResourceIdentifier creationDataSourceResourceId = 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 agentPoolProfiles = null, ContainerServiceLinuxProfile linuxProfile = null, ManagedClusterWindowsProfile windowsProfile = null, ManagedClusterServicePrincipalProfile servicePrincipalProfile = null, IDictionary addonProfiles = null, ManagedClusterPodIdentityProfile podIdentityProfile = null, ManagedClusterOidcIssuerProfile oidcIssuerProfile = null, string nodeResourceGroup = null, RestrictionLevel? nodeResourceGroupRestrictionLevel = null, bool? enableRbac = null, KubernetesSupportPlan? supportPlan = null, bool? enablePodSecurityPolicy = null, bool? enableNamespaceResources = null, ContainerServiceNetworkProfile networkProfile = null, ManagedClusterAadProfile aadProfile = null, ManagedClusterAutoUpgradeProfile autoUpgradeProfile = null, UpgradeOverrideSettings upgradeOverrideSettings = null, ManagedClusterAutoScalerProfile autoScalerProfile = null, ManagedClusterApiServerAccessProfile apiServerAccessProfile = null, ResourceIdentifier diskEncryptionSetId = null, IDictionary identityProfile = null, IEnumerable privateLinkResources = null, bool? disableLocalAccounts = null, ManagedClusterHttpProxyConfig httpProxyConfig = null, ManagedClusterSecurityProfile securityProfile = null, ManagedClusterStorageProfile storageProfile = null, ManagedClusterIngressProfileWebAppRouting ingressWebAppRouting = null, ContainerServicePublicNetworkAccess? publicNetworkAccess = null, ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile = null, ManagedClusterAzureMonitorProfile azureMonitorProfile = null, SafeguardsProfile safeguardsProfile = null, ServiceMeshProfile serviceMeshProfile = null, ResourceIdentifier resourceId = null, bool? costAnalysisEnabled = null, bool? aiToolchainOperatorProfileEnabled = null, NodeProvisioningMode? nodeProvisioningMode = null, ManagedClusterBootstrapProfile bootstrapProfile = null)
{
tags ??= new Dictionary();
agentPoolProfiles ??= new List();
@@ -146,11 +165,14 @@ public static ContainerServiceManagedClusterData ContainerServiceManagedClusterD
systemData,
tags,
location,
+ eTag,
sku,
extendedLocation,
clusterIdentity,
+ kind,
provisioningState,
powerStateCode != null ? new ContainerServicePowerState(powerStateCode, serializedAdditionalRawData: null) : null,
+ creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null,
maxAgentPools,
kubernetesVersion,
currentKubernetesVersion,
@@ -167,9 +189,11 @@ public static ContainerServiceManagedClusterData ContainerServiceManagedClusterD
podIdentityProfile,
oidcIssuerProfile,
nodeResourceGroup,
+ nodeResourceGroupRestrictionLevel != null ? new ManagedClusterNodeResourceGroupProfile(nodeResourceGroupRestrictionLevel, serializedAdditionalRawData: null) : null,
enableRbac,
supportPlan,
enablePodSecurityPolicy,
+ enableNamespaceResources,
networkProfile,
aadProfile,
autoUpgradeProfile,
@@ -183,40 +207,50 @@ public static ContainerServiceManagedClusterData ContainerServiceManagedClusterD
httpProxyConfig,
securityProfile,
storageProfile,
+ ingressWebAppRouting != null ? new ManagedClusterIngressProfile(ingressWebAppRouting, serializedAdditionalRawData: null) : null,
publicNetworkAccess,
workloadAutoScalerProfile,
- azureMonitorMetrics != null ? new ManagedClusterAzureMonitorProfile(azureMonitorMetrics, serializedAdditionalRawData: null) : null,
+ azureMonitorProfile,
+ safeguardsProfile,
serviceMeshProfile,
resourceId,
+ costAnalysisEnabled != null ? new ManagedClusterMetricsProfile(new ManagedClusterCostAnalysis(costAnalysisEnabled, serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null,
+ aiToolchainOperatorProfileEnabled != null ? new ManagedClusterAIToolchainOperatorProfile(aiToolchainOperatorProfileEnabled, serializedAdditionalRawData: null) : null,
+ nodeProvisioningMode != null ? new ManagedClusterNodeProvisioningProfile(nodeProvisioningMode, serializedAdditionalRawData: null) : null,
+ bootstrapProfile,
serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
+ /// Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention.
/// 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.
/// 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.
/// 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.
/// 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).
/// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
/// Determines the type of workload a node can run.
+ /// A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script).
/// 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}.
/// 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}.
+ /// The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'.
/// The maximum number of pods that can run on a node.
/// The operating system type. The default is Linux.
- /// 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.
+ /// Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated.
/// The maximum number of nodes for auto-scaling.
/// The minimum number of nodes for auto-scaling.
/// Whether to enable auto-scaler.
/// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
/// The type of Agent Pool.
/// 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.
- /// 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).
- /// 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.
+ /// Both patch version <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> once it has been created 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).
+ /// If orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> version being used.
/// The version of node image.
/// Settings for upgrading the agentpool.
/// The current deployment or provisioning state.
/// 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.
/// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
/// 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.
+ /// When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded certificates into node trust stores. Defaults to false.
/// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.
/// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
/// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.
@@ -224,6 +258,7 @@ public static ContainerServiceManagedClusterData ContainerServiceManagedClusterD
/// The tags to be persisted on the agent pool virtual machine scale set.
/// The node labels to be persisted across all nodes in agent pool.
/// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ /// These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`.
/// The ID for Proximity Placement Group.
/// The Kubelet configuration on the agent pool nodes.
/// The OS configuration of Linux agent nodes.
@@ -234,25 +269,38 @@ public static ContainerServiceManagedClusterData ContainerServiceManagedClusterD
/// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
/// AKS will associate the specified agent pool with the Capacity Reservation Group.
/// 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).
+ /// The Windows agent pool's specific profile.
/// Network-related settings of an agent pool.
+ /// The security settings of an agent pool.
+ /// The GPU settings of an agent pool.
+ /// Configuration for using artifact streaming on AKS.
+ /// Specifications on VirtualMachines agent pool.
+ /// The status of nodes in a VirtualMachines agent pool.
+ /// Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway.
/// Windows agent pool names must be 6 characters or less.
/// A new instance for mocking.
- 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 availabilityZones = null, bool? enableNodePublicIP = null, ResourceIdentifier nodePublicIPPrefixId = null, ScaleSetPriority? scaleSetPriority = null, ScaleSetEvictionPolicy? scaleSetEvictionPolicy = null, float? spotMaxPrice = null, IDictionary tags = null, IDictionary nodeLabels = null, IEnumerable 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)
+ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(ETag? eTag = null, int? count = null, string vmSize = null, int? osDiskSizeInGB = null, ContainerServiceOSDiskType? osDiskType = null, KubeletDiskType? kubeletDiskType = null, WorkloadRuntime? workloadRuntime = null, string messageOfTheDay = null, ResourceIdentifier vnetSubnetId = null, ResourceIdentifier podSubnetId = null, PodIPAllocationMode? podIPAllocationMode = 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 availabilityZones = null, bool? enableNodePublicIP = null, bool? enableCustomCATrust = null, ResourceIdentifier nodePublicIPPrefixId = null, ScaleSetPriority? scaleSetPriority = null, ScaleSetEvictionPolicy? scaleSetEvictionPolicy = null, float? spotMaxPrice = null, IDictionary tags = null, IDictionary nodeLabels = null, IEnumerable nodeTaints = null, IEnumerable nodeInitializationTaints = 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, bool? disableOutboundNat = null, AgentPoolNetworkProfile networkProfile = null, AgentPoolSecurityProfile securityProfile = null, bool? installGpuDriver = null, bool? artifactStreamingProfileEnabled = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, int? gatewayPublicIPPrefixSize = null, string name = null)
{
availabilityZones ??= new List();
tags ??= new Dictionary();
nodeLabels ??= new Dictionary();
nodeTaints ??= new List();
+ nodeInitializationTaints ??= new List();
+ scaleManual ??= new List();
+ virtualMachineNodesStatus ??= new List();
return new ManagedClusterAgentPoolProfile(
+ eTag,
count,
vmSize,
osDiskSizeInGB,
osDiskType,
kubeletDiskType,
workloadRuntime,
+ messageOfTheDay,
vnetSubnetId,
podSubnetId,
+ podIPAllocationMode,
maxPods,
osType,
osSku,
@@ -270,6 +318,7 @@ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(int?
powerStateCode != null ? new ContainerServicePowerState(powerStateCode, serializedAdditionalRawData: null) : null,
availabilityZones?.ToList(),
enableNodePublicIP,
+ enableCustomCATrust,
nodePublicIPPrefixId,
scaleSetPriority,
scaleSetEvictionPolicy,
@@ -277,6 +326,7 @@ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(int?
tags,
nodeLabels,
nodeTaints?.ToList(),
+ nodeInitializationTaints?.ToList(),
proximityPlacementGroupId,
kubeletConfig,
linuxOSConfig,
@@ -287,37 +337,48 @@ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(int?
creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null,
capacityReservationGroupId,
hostGroupId,
+ disableOutboundNat != null ? new AgentPoolWindowsProfile(disableOutboundNat, serializedAdditionalRawData: null) : null,
networkProfile,
+ securityProfile,
+ installGpuDriver != null ? new AgentPoolGpuProfile(installGpuDriver, serializedAdditionalRawData: null) : null,
+ artifactStreamingProfileEnabled != null ? new AgentPoolArtifactStreamingProfile(artifactStreamingProfileEnabled, serializedAdditionalRawData: null) : null,
+ scaleManual != null ? new VirtualMachinesProfile(new ScaleProfile(scaleManual?.ToList(), serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null,
+ virtualMachineNodesStatus?.ToList(),
+ gatewayPublicIPPrefixSize != null ? new AgentPoolGatewayProfile(gatewayPublicIPPrefixSize, serializedAdditionalRawData: null) : null,
serializedAdditionalRawData: null,
name);
}
/// Initializes a new instance of .
+ /// Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention.
/// 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.
/// 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.
/// 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.
/// 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).
/// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
/// Determines the type of workload a node can run.
+ /// A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script).
/// 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}.
/// 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}.
+ /// The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'.
/// The maximum number of pods that can run on a node.
/// The operating system type. The default is Linux.
- /// 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.
+ /// Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated.
/// The maximum number of nodes for auto-scaling.
/// The minimum number of nodes for auto-scaling.
/// Whether to enable auto-scaler.
/// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
/// The type of Agent Pool.
/// 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.
- /// 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).
- /// 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.
+ /// Both patch version <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> once it has been created 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).
+ /// If orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> version being used.
/// The version of node image.
/// Settings for upgrading the agentpool.
/// The current deployment or provisioning state.
/// 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.
/// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
/// 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.
+ /// When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded certificates into node trust stores. Defaults to false.
/// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.
/// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
/// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.
@@ -325,6 +386,7 @@ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(int?
/// The tags to be persisted on the agent pool virtual machine scale set.
/// The node labels to be persisted across all nodes in agent pool.
/// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ /// These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`.
/// The ID for Proximity Placement Group.
/// The Kubelet configuration on the agent pool nodes.
/// The OS configuration of Linux agent nodes.
@@ -335,24 +397,37 @@ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(int?
/// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
/// AKS will associate the specified agent pool with the Capacity Reservation Group.
/// 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).
+ /// The Windows agent pool's specific profile.
/// Network-related settings of an agent pool.
+ /// The security settings of an agent pool.
+ /// The GPU settings of an agent pool.
+ /// Configuration for using artifact streaming on AKS.
+ /// Specifications on VirtualMachines agent pool.
+ /// The status of nodes in a VirtualMachines agent pool.
+ /// Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway.
/// A new instance for mocking.
- 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 availabilityZones = null, bool? enableNodePublicIP = null, ResourceIdentifier nodePublicIPPrefixId = null, ScaleSetPriority? scaleSetPriority = null, ScaleSetEvictionPolicy? scaleSetEvictionPolicy = null, float? spotMaxPrice = null, IDictionary tags = null, IDictionary nodeLabels = null, IEnumerable 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)
+ public static ManagedClusterAgentPoolProfileProperties ManagedClusterAgentPoolProfileProperties(ETag? eTag = null, int? count = null, string vmSize = null, int? osDiskSizeInGB = null, ContainerServiceOSDiskType? osDiskType = null, KubeletDiskType? kubeletDiskType = null, WorkloadRuntime? workloadRuntime = null, string messageOfTheDay = null, ResourceIdentifier vnetSubnetId = null, ResourceIdentifier podSubnetId = null, PodIPAllocationMode? podIPAllocationMode = 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 availabilityZones = null, bool? enableNodePublicIP = null, bool? enableCustomCATrust = null, ResourceIdentifier nodePublicIPPrefixId = null, ScaleSetPriority? scaleSetPriority = null, ScaleSetEvictionPolicy? scaleSetEvictionPolicy = null, float? spotMaxPrice = null, IDictionary tags = null, IDictionary nodeLabels = null, IEnumerable nodeTaints = null, IEnumerable nodeInitializationTaints = 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, bool? disableOutboundNat = null, AgentPoolNetworkProfile networkProfile = null, AgentPoolSecurityProfile securityProfile = null, bool? installGpuDriver = null, bool? artifactStreamingProfileEnabled = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, int? gatewayPublicIPPrefixSize = null)
{
availabilityZones ??= new List();
tags ??= new Dictionary();
nodeLabels ??= new Dictionary();
nodeTaints ??= new List();
+ nodeInitializationTaints ??= new List();
+ scaleManual ??= new List();
+ virtualMachineNodesStatus ??= new List();
return new ManagedClusterAgentPoolProfileProperties(
+ eTag,
count,
vmSize,
osDiskSizeInGB,
osDiskType,
kubeletDiskType,
workloadRuntime,
+ messageOfTheDay,
vnetSubnetId,
podSubnetId,
+ podIPAllocationMode,
maxPods,
osType,
osSku,
@@ -370,6 +445,7 @@ public static ManagedClusterAgentPoolProfileProperties ManagedClusterAgentPoolPr
powerStateCode != null ? new ContainerServicePowerState(powerStateCode, serializedAdditionalRawData: null) : null,
availabilityZones?.ToList(),
enableNodePublicIP,
+ enableCustomCATrust,
nodePublicIPPrefixId,
scaleSetPriority,
scaleSetEvictionPolicy,
@@ -377,6 +453,7 @@ public static ManagedClusterAgentPoolProfileProperties ManagedClusterAgentPoolPr
tags,
nodeLabels,
nodeTaints?.ToList(),
+ nodeInitializationTaints?.ToList(),
proximityPlacementGroupId,
kubeletConfig,
linuxOSConfig,
@@ -387,7 +464,14 @@ public static ManagedClusterAgentPoolProfileProperties ManagedClusterAgentPoolPr
creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null,
capacityReservationGroupId,
hostGroupId,
+ disableOutboundNat != null ? new AgentPoolWindowsProfile(disableOutboundNat, serializedAdditionalRawData: null) : null,
networkProfile,
+ securityProfile,
+ installGpuDriver != null ? new AgentPoolGpuProfile(installGpuDriver, serializedAdditionalRawData: null) : null,
+ artifactStreamingProfileEnabled != null ? new AgentPoolArtifactStreamingProfile(artifactStreamingProfileEnabled, serializedAdditionalRawData: null) : null,
+ scaleManual != null ? new VirtualMachinesProfile(new ScaleProfile(scaleManual?.ToList(), serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null,
+ virtualMachineNodesStatus?.ToList(),
+ gatewayPublicIPPrefixSize != null ? new AgentPoolGatewayProfile(gatewayPublicIPPrefixSize, serializedAdditionalRawData: null) : null,
serializedAdditionalRawData: null);
}
@@ -454,6 +538,53 @@ public static ContainerServicePrivateLinkResourceData ContainerServicePrivateLin
serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// The HTTP proxy server endpoint to use.
+ /// The HTTPS proxy server endpoint to use.
+ /// The endpoints that should not go through proxy.
+ /// A read-only list of all endpoints for which traffic should not be sent to the proxy. This list is a superset of noProxy and values injected by AKS.
+ /// Alternative CA cert to use for connecting to proxy servers.
+ /// A new instance for mocking.
+ public static ManagedClusterHttpProxyConfig ManagedClusterHttpProxyConfig(string httpProxy = null, string httpsProxy = null, IEnumerable noProxy = null, IEnumerable effectiveNoProxy = null, string trustedCA = null)
+ {
+ noProxy ??= new List();
+ effectiveNoProxy ??= new List();
+
+ return new ManagedClusterHttpProxyConfig(
+ httpProxy,
+ httpsProxy,
+ noProxy?.ToList(),
+ effectiveNoProxy?.ToList(),
+ trustedCA,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Whether to enable Web App Routing.
+ /// Resource IDs of the DNS zones to be associated with the Web App Routing add-on. Used only when Web App Routing is enabled. Public and private DNS zones can be in different resource groups, but all public DNS zones must be in the same resource group and all private DNS zones must be in the same resource group.
+ /// Managed identity of the Web Application Routing add-on. This is the identity that should be granted permissions, for example, to manage the associated Azure DNS resource and get certificates from Azure Key Vault. See [this overview of the add-on](https://learn.microsoft.com/en-us/azure/aks/web-app-routing?tabs=with-osm) for more instructions.
+ /// A new instance for mocking.
+ public static ManagedClusterIngressProfileWebAppRouting ManagedClusterIngressProfileWebAppRouting(bool? enabled = null, IEnumerable dnsZoneResourceIds = null, ContainerServiceUserAssignedIdentity identity = null)
+ {
+ dnsZoneResourceIds ??= new List();
+
+ return new ManagedClusterIngressProfileWebAppRouting(enabled, dnsZoneResourceIds?.ToList(), identity, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// List of namespaces specified by AKS to be excluded from Safeguards.
+ /// The version of constraints to use.
+ /// The Safeguards level to be used. By default, Safeguards is enabled for all namespaces except those that AKS excludes via systemExcludedNamespaces.
+ /// List of namespaces excluded from Safeguards checks.
+ /// A new instance for mocking.
+ public static SafeguardsProfile SafeguardsProfile(IEnumerable systemExcludedNamespaces = null, string version = null, Level level = default, IEnumerable excludedNamespaces = null)
+ {
+ systemExcludedNamespaces ??= new List();
+ excludedNamespaces ??= new List();
+
+ return new SafeguardsProfile(systemExcludedNamespaces?.ToList(), version, level, excludedNamespaces?.ToList(), serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -481,12 +612,19 @@ public static ManagedClusterUpgradeProfileData ManagedClusterUpgradeProfileData(
/// The Agent Pool name.
/// The operating system type. The default is Linux.
/// List of orchestrator types and versions available for upgrade.
+ /// components of given Kubernetes version.
/// A new instance for mocking.
- public static ManagedClusterPoolUpgradeProfile ManagedClusterPoolUpgradeProfile(string kubernetesVersion = null, string name = null, ContainerServiceOSType osType = default, IEnumerable upgrades = null)
+ public static ManagedClusterPoolUpgradeProfile ManagedClusterPoolUpgradeProfile(string kubernetesVersion = null, string name = null, ContainerServiceOSType osType = default, IEnumerable upgrades = null, ComponentsByReleases componentsByReleases = null)
{
upgrades ??= new List();
- return new ManagedClusterPoolUpgradeProfile(kubernetesVersion, name, osType, upgrades?.ToList(), serializedAdditionalRawData: null);
+ return new ManagedClusterPoolUpgradeProfile(
+ kubernetesVersion,
+ name,
+ osType,
+ upgrades?.ToList(),
+ componentsByReleases,
+ serializedAdditionalRawData: null);
}
/// Initializes a new instance of .
@@ -498,6 +636,27 @@ public static ManagedClusterPoolUpgradeProfileUpgradesItem ManagedClusterPoolUpg
return new ManagedClusterPoolUpgradeProfileUpgradesItem(kubernetesVersion, isPreview, serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// The Kubernetes version (major.minor).
+ /// components of current or upgraded Kubernetes version in the cluster.
+ /// A new instance for mocking.
+ public static ComponentsByReleases ComponentsByReleases(string kubernetesVersion = null, IEnumerable components = null)
+ {
+ components ??= new List();
+
+ return new ComponentsByReleases(kubernetesVersion, components?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Component name.
+ /// Component version.
+ /// If upgraded component version contains breaking changes from the current version. To see a detailed description of what the breaking changes are, visit https://learn.microsoft.com/azure/aks/supported-kubernetes-versions?tabs=azure-cli#aks-components-breaking-changes-by-version.
+ /// A new instance for mocking.
+ public static Component Component(string name = null, string version = null, bool? hasBreakingChanges = null)
+ {
+ return new Component(name, version, hasBreakingChanges, serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -571,31 +730,35 @@ public static ContainerServiceMaintenanceConfigurationData ContainerServiceMaint
/// The name.
/// The resourceType.
/// The systemData.
+ /// Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention.
/// 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.
/// 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.
/// 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.
/// 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).
/// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
/// Determines the type of workload a node can run.
+ /// A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script).
/// 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}.
/// 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}.
+ /// The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'.
/// The maximum number of pods that can run on a node.
/// The operating system type. The default is Linux.
- /// 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.
+ /// Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated.
/// The maximum number of nodes for auto-scaling.
/// The minimum number of nodes for auto-scaling.
/// Whether to enable auto-scaler.
/// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
/// The type of Agent Pool.
/// 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.
- /// 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).
- /// 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.
+ /// Both patch version <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> once it has been created 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).
+ /// If orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> version being used.
/// The version of node image.
/// Settings for upgrading the agentpool.
/// The current deployment or provisioning state.
/// 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.
/// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
/// 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.
+ /// When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded certificates into node trust stores. Defaults to false.
/// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.
/// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
/// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.
@@ -603,6 +766,7 @@ public static ContainerServiceMaintenanceConfigurationData ContainerServiceMaint
/// The tags to be persisted on the agent pool virtual machine scale set.
/// The node labels to be persisted across all nodes in agent pool.
/// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ /// These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`.
/// The ID for Proximity Placement Group.
/// The Kubelet configuration on the agent pool nodes.
/// The OS configuration of Linux agent nodes.
@@ -613,28 +777,41 @@ public static ContainerServiceMaintenanceConfigurationData ContainerServiceMaint
/// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
/// AKS will associate the specified agent pool with the Capacity Reservation Group.
/// 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).
+ /// The Windows agent pool's specific profile.
/// Network-related settings of an agent pool.
+ /// The security settings of an agent pool.
+ /// The GPU settings of an agent pool.
+ /// Configuration for using artifact streaming on AKS.
+ /// Specifications on VirtualMachines agent pool.
+ /// The status of nodes in a VirtualMachines agent pool.
+ /// Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway.
/// A new instance for mocking.
- 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 availabilityZones = null, bool? enableNodePublicIP = null, ResourceIdentifier nodePublicIPPrefixId = null, ScaleSetPriority? scaleSetPriority = null, ScaleSetEvictionPolicy? scaleSetEvictionPolicy = null, float? spotMaxPrice = null, IDictionary tags = null, IDictionary nodeLabels = null, IEnumerable 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)
+ public static ContainerServiceAgentPoolData ContainerServiceAgentPoolData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ETag? eTag = null, int? count = null, string vmSize = null, int? osDiskSizeInGB = null, ContainerServiceOSDiskType? osDiskType = null, KubeletDiskType? kubeletDiskType = null, WorkloadRuntime? workloadRuntime = null, string messageOfTheDay = null, ResourceIdentifier vnetSubnetId = null, ResourceIdentifier podSubnetId = null, PodIPAllocationMode? podIPAllocationMode = 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 availabilityZones = null, bool? enableNodePublicIP = null, bool? enableCustomCATrust = null, ResourceIdentifier nodePublicIPPrefixId = null, ScaleSetPriority? scaleSetPriority = null, ScaleSetEvictionPolicy? scaleSetEvictionPolicy = null, float? spotMaxPrice = null, IDictionary tags = null, IDictionary nodeLabels = null, IEnumerable nodeTaints = null, IEnumerable nodeInitializationTaints = 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, bool? disableOutboundNat = null, AgentPoolNetworkProfile networkProfile = null, AgentPoolSecurityProfile securityProfile = null, bool? installGpuDriver = null, bool? artifactStreamingProfileEnabled = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, int? gatewayPublicIPPrefixSize = null)
{
availabilityZones ??= new List();
tags ??= new Dictionary();
nodeLabels ??= new Dictionary();
nodeTaints ??= new List();
+ nodeInitializationTaints ??= new List();
+ scaleManual ??= new List();
+ virtualMachineNodesStatus ??= new List();
return new ContainerServiceAgentPoolData(
id,
name,
resourceType,
systemData,
+ eTag,
count,
vmSize,
osDiskSizeInGB,
osDiskType,
kubeletDiskType,
workloadRuntime,
+ messageOfTheDay,
vnetSubnetId,
podSubnetId,
+ podIPAllocationMode,
maxPods,
osType,
osSku,
@@ -652,6 +829,7 @@ public static ContainerServiceAgentPoolData ContainerServiceAgentPoolData(Resour
powerStateCode != null ? new ContainerServicePowerState(powerStateCode, serializedAdditionalRawData: null) : null,
availabilityZones?.ToList(),
enableNodePublicIP,
+ enableCustomCATrust,
nodePublicIPPrefixId,
scaleSetPriority,
scaleSetEvictionPolicy,
@@ -659,6 +837,7 @@ public static ContainerServiceAgentPoolData ContainerServiceAgentPoolData(Resour
tags,
nodeLabels,
nodeTaints?.ToList(),
+ nodeInitializationTaints?.ToList(),
proximityPlacementGroupId,
kubeletConfig,
linuxOSConfig,
@@ -669,7 +848,14 @@ public static ContainerServiceAgentPoolData ContainerServiceAgentPoolData(Resour
creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null,
capacityReservationGroupId,
hostGroupId,
+ disableOutboundNat != null ? new AgentPoolWindowsProfile(disableOutboundNat, serializedAdditionalRawData: null) : null,
networkProfile,
+ securityProfile,
+ installGpuDriver != null ? new AgentPoolGpuProfile(installGpuDriver, serializedAdditionalRawData: null) : null,
+ artifactStreamingProfileEnabled != null ? new AgentPoolArtifactStreamingProfile(artifactStreamingProfileEnabled, serializedAdditionalRawData: null) : null,
+ scaleManual != null ? new VirtualMachinesProfile(new ScaleProfile(scaleManual?.ToList(), serializedAdditionalRawData: null), serializedAdditionalRawData: null) : null,
+ virtualMachineNodesStatus?.ToList(),
+ gatewayPublicIPPrefixSize != null ? new AgentPoolGatewayProfile(gatewayPublicIPPrefixSize, serializedAdditionalRawData: null) : null,
serializedAdditionalRawData: null);
}
@@ -681,9 +867,10 @@ public static ContainerServiceAgentPoolData ContainerServiceAgentPoolData(Resour
/// The Kubernetes version (major.minor.patch).
/// The operating system type. The default is Linux.
/// List of orchestrator types and versions available for upgrade.
+ /// components of given Kubernetes version.
/// The latest AKS supported node image version.
/// A new instance for mocking.
- public static AgentPoolUpgradeProfileData AgentPoolUpgradeProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kubernetesVersion = null, ContainerServiceOSType osType = default, IEnumerable upgrades = null, string latestNodeImageVersion = null)
+ public static AgentPoolUpgradeProfileData AgentPoolUpgradeProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string kubernetesVersion = null, ContainerServiceOSType osType = default, IEnumerable upgrades = null, ComponentsByReleases componentsByReleases = null, string latestNodeImageVersion = null)
{
upgrades ??= new List();
@@ -695,6 +882,7 @@ public static AgentPoolUpgradeProfileData AgentPoolUpgradeProfileData(ResourceId
kubernetesVersion,
osType,
upgrades?.ToList(),
+ componentsByReleases,
latestNodeImageVersion,
serializedAdditionalRawData: null);
}
@@ -708,6 +896,44 @@ public static AgentPoolUpgradeProfilePropertiesUpgradesItem AgentPoolUpgradeProf
return new AgentPoolUpgradeProfilePropertiesUpgradesItem(kubernetesVersion, isPreview, serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The properties of the machine.
+ /// A new instance for mocking.
+ public static MachineData MachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, MachineProperties properties = null)
+ {
+ return new MachineData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// network properties of the machine.
+ /// Arm resource id of the machine. It can be used to GET underlying VM Instance.
+ /// A new instance for mocking.
+ public static MachineProperties MachineProperties(IEnumerable networkIPAddresses = null, ResourceIdentifier resourceId = null)
+ {
+ networkIPAddresses ??= new List();
+
+ return new MachineProperties(networkIPAddresses != null ? new MachineNetworkProperties(networkIPAddresses?.ToList(), serializedAdditionalRawData: null) : null, resourceId, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// IPv4 or IPv6 address of the machine.
+ /// To determine if address belongs IPv4 or IPv6 family.
+ /// A new instance for mocking.
+ public static MachineIPAddress MachineIPAddress(string ip = null, IPFamily? family = null)
+ {
+ return new MachineIPAddress(ip, family, serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -825,6 +1051,34 @@ public static ContainerServiceEndpointDetail ContainerServiceEndpointDetail(IPAd
return new ContainerServiceEndpointDetail(ipAddress, port, protocol, description, serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// Fully qualified ID for the async operation.
+ /// Fully qualified ID of the resource against which the original async operation was started.
+ /// Name of the async operation.
+ /// Operation status.
+ /// Percent of the operation that is complete.
+ /// The start time of the operation.
+ /// The end time of the operation.
+ /// The operations list.
+ /// If present, details of the operation error.
+ /// A new instance for mocking.
+ public static OperationStatusResult OperationStatusResult(ResourceIdentifier id = null, ResourceIdentifier resourceId = null, string name = null, string status = null, float? percentComplete = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, IEnumerable operations = null, ResponseError error = null)
+ {
+ operations ??= new List();
+
+ return new OperationStatusResult(
+ id,
+ resourceId,
+ name,
+ status,
+ percentComplete,
+ startOn,
+ endOn,
+ operations?.ToList(),
+ error,
+ serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -837,7 +1091,7 @@ public static ContainerServiceEndpointDetail ContainerServiceEndpointDetail(IPAd
/// The version of Kubernetes.
/// The version of node image.
/// The operating system type. The default is Linux.
- /// 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.
+ /// Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated.
/// The size of the VM.
/// Whether to use a FIPS-enabled OS.
/// A new instance for mocking.
@@ -863,6 +1117,177 @@ public static AgentPoolSnapshotData AgentPoolSnapshotData(ResourceIdentifier id
serializedAdditionalRawData: null);
}
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// CreationData to be used to specify the source resource ID to create this snapshot.
+ /// The type of a snapshot. The default is NodePool.
+ /// What the properties will be showed when getting managed cluster snapshot. Those properties are read-only.
+ /// A new instance for mocking.
+ public static ManagedClusterSnapshotData ManagedClusterSnapshotData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier creationDataSourceResourceId = null, SnapshotType? snapshotType = null, ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly = null)
+ {
+ tags ??= new Dictionary();
+
+ return new ManagedClusterSnapshotData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ tags,
+ location,
+ creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null,
+ snapshotType,
+ managedClusterPropertiesReadOnly,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The current kubernetes version.
+ /// The current managed cluster sku.
+ /// Whether the cluster has enabled Kubernetes Role-Based Access Control or not.
+ /// The current network profile.
+ /// A new instance for mocking.
+ public static ManagedClusterPropertiesForSnapshot ManagedClusterPropertiesForSnapshot(string kubernetesVersion = null, ManagedClusterSku sku = null, bool? enableRbac = null, NetworkProfileForSnapshot networkProfile = null)
+ {
+ return new ManagedClusterPropertiesForSnapshot(kubernetesVersion, sku, enableRbac, networkProfile, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// networkPlugin for managed cluster snapshot.
+ /// NetworkPluginMode for managed cluster snapshot.
+ /// networkPolicy for managed cluster snapshot.
+ /// networkMode for managed cluster snapshot.
+ /// loadBalancerSku for managed cluster snapshot.
+ /// A new instance for mocking.
+ public static NetworkProfileForSnapshot NetworkProfileForSnapshot(ContainerServiceNetworkPlugin? networkPlugin = null, ContainerServiceNetworkPluginMode? networkPluginMode = null, ContainerServiceNetworkPolicy? networkPolicy = null, ContainerServiceNetworkMode? networkMode = null, ContainerServiceLoadBalancerSku? loadBalancerSku = null)
+ {
+ return new NetworkProfileForSnapshot(
+ networkPlugin,
+ networkPluginMode,
+ networkPolicy,
+ networkMode,
+ loadBalancerSku,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Resource type of Azure resource.
+ /// Name of role, name is unique under a source resource type.
+ /// 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).
+ /// A new instance for mocking.
+ public static ContainerServiceTrustedAccessRole ContainerServiceTrustedAccessRole(string sourceResourceType = null, string name = null, IEnumerable rules = null)
+ {
+ rules ??= new List();
+
+ return new ContainerServiceTrustedAccessRole(sourceResourceType, name, rules?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// List of allowed verbs.
+ /// List of allowed apiGroups.
+ /// List of allowed resources.
+ /// List of allowed names.
+ /// List of allowed nonResourceURLs.
+ /// A new instance for mocking.
+ public static ContainerServiceTrustedAccessRoleRule ContainerServiceTrustedAccessRoleRule(IEnumerable verbs = null, IEnumerable apiGroups = null, IEnumerable resources = null, IEnumerable resourceNames = null, IEnumerable nonResourceUrls = null)
+ {
+ verbs ??= new List();
+ apiGroups ??= new List();
+ resources ??= new List();
+ resourceNames ??= new List();
+ nonResourceUrls ??= new List();
+
+ return new ContainerServiceTrustedAccessRoleRule(
+ verbs?.ToList(),
+ apiGroups?.ToList(),
+ resources?.ToList(),
+ resourceNames?.ToList(),
+ nonResourceUrls?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The current provisioning state of trusted access role binding.
+ /// The ARM resource ID of source resource that trusted access is configured for.
+ /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'.
+ /// A new instance for mocking.
+ public static ContainerServiceTrustedAccessRoleBindingData ContainerServiceTrustedAccessRoleBindingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContainerServiceTrustedAccessRoleBindingProvisioningState? provisioningState = null, ResourceIdentifier sourceResourceId = null, IEnumerable roles = null)
+ {
+ roles ??= new List();
+
+ return new ContainerServiceTrustedAccessRoleBindingData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ provisioningState,
+ sourceResourceId,
+ roles?.ToList(),
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Whether the version is default or not and support info.
+ /// A new instance for mocking.
+ public static GuardrailsAvailableVersionData GuardrailsAvailableVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GuardrailsAvailableVersionsProperties properties = null)
+ {
+ return new GuardrailsAvailableVersionData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// Whether the version is preview or stable.
+ /// A new instance for mocking.
+ public static GuardrailsAvailableVersionsProperties GuardrailsAvailableVersionsProperties(bool? isDefaultVersion = null, GuardrailsSupport? support = null)
+ {
+ return new GuardrailsAvailableVersionsProperties(isDefaultVersion, support, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Whether the version is default or not and support info.
+ /// A new instance for mocking.
+ public static SafeguardsAvailableVersionData SafeguardsAvailableVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, SafeguardsAvailableVersionsProperties properties = null)
+ {
+ return new SafeguardsAvailableVersionData(
+ id,
+ name,
+ resourceType,
+ systemData,
+ properties,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// Whether the version is preview or stable.
+ /// A new instance for mocking.
+ public static SafeguardsAvailableVersionsProperties SafeguardsAvailableVersionsProperties(bool? isDefaultVersion = null, SafeguardsSupport? support = null)
+ {
+ return new SafeguardsAvailableVersionsProperties(isDefaultVersion, support, serializedAdditionalRawData: null);
+ }
+
/// Initializes a new instance of .
/// The id.
/// The name.
@@ -901,64 +1326,232 @@ public static MeshUpgradeProfileData MeshUpgradeProfileData(ResourceIdentifier i
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
+ /// Initializes a new instance of .
/// The id.
/// The name.
/// The resourceType.
/// The systemData.
- /// The current provisioning state of trusted access role binding.
- /// The ARM resource ID of source resource that trusted access is configured for.
- /// A list of roles to bind, each item is a resource type qualified role name. For example: 'Microsoft.MachineLearningServices/workspaces/reader'.
- /// A new instance for mocking.
- public static ContainerServiceTrustedAccessRoleBindingData ContainerServiceTrustedAccessRoleBindingData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContainerServiceTrustedAccessRoleBindingProvisioningState? provisioningState = null, ResourceIdentifier sourceResourceId = null, IEnumerable roles = null)
+ /// Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list.
+ /// Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer.
+ /// Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it.
+ /// Only services that must match this selector can be placed on this load balancer.
+ /// Services created in namespaces that match the selector can be placed on this load balancer.
+ /// Nodes that match this selector will be possible members of this load balancer.
+ /// The current provisioning state.
+ /// A new instance for mocking.
+ public static LoadBalancerData LoadBalancerData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string namePropertiesName = null, string primaryAgentPoolName = null, bool? allowServicePlacement = null, LabelSelector serviceLabelSelector = null, LabelSelector serviceNamespaceSelector = null, LabelSelector nodeSelector = null, string provisioningState = null)
{
- roles ??= new List();
-
- return new ContainerServiceTrustedAccessRoleBindingData(
+ return new LoadBalancerData(
id,
name,
resourceType,
systemData,
+ namePropertiesName,
+ primaryAgentPoolName,
+ allowServicePlacement,
+ serviceLabelSelector,
+ serviceNamespaceSelector,
+ nodeSelector,
provisioningState,
- sourceResourceId,
- roles?.ToList(),
serializedAdditionalRawData: null);
}
- /// Initializes a new instance of .
- /// Resource type of Azure resource.
- /// Name of role, name is unique under a source resource type.
- /// 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).
- /// A new instance for mocking.
- public static ContainerServiceTrustedAccessRole ContainerServiceTrustedAccessRole(string sourceResourceType = null, string name = null, IEnumerable rules = null)
+ /// Initializes a new instance of .
+ /// major.minor version of Kubernetes release.
+ /// Capabilities on this Kubernetes version.
+ /// Whether this version is in preview mode.
+ /// Patch versions of Kubernetes release.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static KubernetesVersion KubernetesVersion(string version, IEnumerable capabilitiesSupportPlan, bool? isPreview, IReadOnlyDictionary patchVersions)
{
- rules ??= new List();
+ return KubernetesVersion(version: version, capabilitiesSupportPlan: capabilitiesSupportPlan, isDefault: default, isPreview: isPreview, patchVersions: patchVersions);
+ }
- return new ContainerServiceTrustedAccessRole(sourceResourceType, name, rules?.ToList(), serializedAdditionalRawData: null);
+ /// Initializes a new instance of .
+ /// 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.
+ /// 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.
+ /// 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.
+ /// 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).
+ /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
+ /// Determines the type of workload a node can run.
+ /// 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}.
+ /// 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}.
+ /// The maximum number of pods that can run on a node.
+ /// The operating system type. The default is Linux.
+ /// 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.
+ /// The maximum number of nodes for auto-scaling.
+ /// The minimum number of nodes for auto-scaling.
+ /// Whether to enable auto-scaler.
+ /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
+ /// The type of Agent Pool.
+ /// 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.
+ /// 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).
+ /// 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.
+ /// The version of node image.
+ /// Settings for upgrading the agentpool.
+ /// The current deployment or provisioning state.
+ /// 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.
+ /// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
+ /// 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.
+ /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.
+ /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
+ /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.
+ /// 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).
+ /// The tags to be persisted on the agent pool virtual machine scale set.
+ /// The node labels to be persisted across all nodes in agent pool.
+ /// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ /// The ID for Proximity Placement Group.
+ /// The Kubelet configuration on the agent pool nodes.
+ /// The OS configuration of Linux agent nodes.
+ /// 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.
+ /// Whether to enable UltraSSD.
+ /// 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.
+ /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
+ /// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
+ /// AKS will associate the specified agent pool with the Capacity Reservation Group.
+ /// 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).
+ /// Network-related settings of an agent pool.
+ /// Windows agent pool names must be 6 characters or less.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(int? count, string vmSize, int? osDiskSizeInGB, ContainerServiceOSDiskType? osDiskType, KubeletDiskType? kubeletDiskType, WorkloadRuntime? workloadRuntime, ResourceIdentifier vnetSubnetId, ResourceIdentifier podSubnetId, int? maxPods, ContainerServiceOSType? osType, ContainerServiceOSSku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, ScaleDownMode? scaleDownMode, AgentPoolType? agentPoolType, AgentPoolMode? mode, string orchestratorVersion, string currentOrchestratorVersion, string nodeImageVersion, AgentPoolUpgradeSettings upgradeSettings, string provisioningState, ContainerServiceStateCode? powerStateCode, IEnumerable availabilityZones, bool? enableNodePublicIP, ResourceIdentifier nodePublicIPPrefixId, ScaleSetPriority? scaleSetPriority, ScaleSetEvictionPolicy? scaleSetEvictionPolicy, float? spotMaxPrice, IDictionary tags, IDictionary nodeLabels, IEnumerable nodeTaints, ResourceIdentifier proximityPlacementGroupId, KubeletConfig kubeletConfig, LinuxOSConfig linuxOSConfig, bool? enableEncryptionAtHost, bool? enableUltraSsd, bool? enableFips, GpuInstanceProfile? gpuInstanceProfile, ResourceIdentifier creationDataSourceResourceId, ResourceIdentifier capacityReservationGroupId, ResourceIdentifier hostGroupId, AgentPoolNetworkProfile networkProfile, string name)
+ {
+ return ManagedClusterAgentPoolProfile(eTag: default, count: count, vmSize: vmSize, osDiskSizeInGB: osDiskSizeInGB, osDiskType: osDiskType, kubeletDiskType: kubeletDiskType, workloadRuntime: workloadRuntime, messageOfTheDay: default, vnetSubnetId: vnetSubnetId, podSubnetId: podSubnetId, podIPAllocationMode: default, maxPods: maxPods, osType: osType, osSku: osSku, maxCount: maxCount, minCount: minCount, enableAutoScaling: enableAutoScaling, scaleDownMode: scaleDownMode, agentPoolType: agentPoolType, mode: mode, orchestratorVersion: orchestratorVersion, currentOrchestratorVersion: currentOrchestratorVersion, nodeImageVersion: nodeImageVersion, upgradeSettings: upgradeSettings, provisioningState: provisioningState, powerStateCode: powerStateCode, availabilityZones: availabilityZones, enableNodePublicIP: enableNodePublicIP, enableCustomCATrust: default, nodePublicIPPrefixId: nodePublicIPPrefixId, scaleSetPriority: scaleSetPriority, scaleSetEvictionPolicy: scaleSetEvictionPolicy, spotMaxPrice: spotMaxPrice, tags: tags, nodeLabels: nodeLabels, nodeTaints: nodeTaints, nodeInitializationTaints: default, proximityPlacementGroupId: proximityPlacementGroupId, kubeletConfig: kubeletConfig, linuxOSConfig: linuxOSConfig, enableEncryptionAtHost: enableEncryptionAtHost, enableUltraSsd: enableUltraSsd, enableFips: enableFips, gpuInstanceProfile: gpuInstanceProfile, creationDataSourceResourceId: creationDataSourceResourceId, capacityReservationGroupId: capacityReservationGroupId, hostGroupId: hostGroupId, disableOutboundNat: default, networkProfile: networkProfile, securityProfile: default, installGpuDriver: default, artifactStreamingProfileEnabled: default, scaleManual: default, virtualMachineNodesStatus: default, gatewayPublicIPPrefixSize: default, name: name);
}
- /// Initializes a new instance of .
- /// List of allowed verbs.
- /// List of allowed apiGroups.
- /// List of allowed resources.
- /// List of allowed names.
- /// List of allowed nonResourceURLs.
- /// A new instance for mocking.
- public static ContainerServiceTrustedAccessRoleRule ContainerServiceTrustedAccessRoleRule(IEnumerable verbs = null, IEnumerable apiGroups = null, IEnumerable resources = null, IEnumerable resourceNames = null, IEnumerable nonResourceUrls = null)
+ /// Initializes a new instance of .
+ /// 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.
+ /// 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.
+ /// 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.
+ /// 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).
+ /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
+ /// Determines the type of workload a node can run.
+ /// 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}.
+ /// 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}.
+ /// The maximum number of pods that can run on a node.
+ /// The operating system type. The default is Linux.
+ /// 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.
+ /// The maximum number of nodes for auto-scaling.
+ /// The minimum number of nodes for auto-scaling.
+ /// Whether to enable auto-scaler.
+ /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
+ /// The type of Agent Pool.
+ /// 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.
+ /// 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).
+ /// 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.
+ /// The version of node image.
+ /// Settings for upgrading the agentpool.
+ /// The current deployment or provisioning state.
+ /// 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.
+ /// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
+ /// 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.
+ /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.
+ /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
+ /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.
+ /// 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).
+ /// The tags to be persisted on the agent pool virtual machine scale set.
+ /// The node labels to be persisted across all nodes in agent pool.
+ /// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ /// The ID for Proximity Placement Group.
+ /// The Kubelet configuration on the agent pool nodes.
+ /// The OS configuration of Linux agent nodes.
+ /// 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.
+ /// Whether to enable UltraSSD.
+ /// 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.
+ /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
+ /// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
+ /// AKS will associate the specified agent pool with the Capacity Reservation Group.
+ /// 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).
+ /// Network-related settings of an agent pool.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static ManagedClusterAgentPoolProfileProperties ManagedClusterAgentPoolProfileProperties(int? count, string vmSize, int? osDiskSizeInGB, ContainerServiceOSDiskType? osDiskType, KubeletDiskType? kubeletDiskType, WorkloadRuntime? workloadRuntime, ResourceIdentifier vnetSubnetId, ResourceIdentifier podSubnetId, int? maxPods, ContainerServiceOSType? osType, ContainerServiceOSSku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, ScaleDownMode? scaleDownMode, AgentPoolType? agentPoolType, AgentPoolMode? mode, string orchestratorVersion, string currentOrchestratorVersion, string nodeImageVersion, AgentPoolUpgradeSettings upgradeSettings, string provisioningState, ContainerServiceStateCode? powerStateCode, IEnumerable availabilityZones, bool? enableNodePublicIP, ResourceIdentifier nodePublicIPPrefixId, ScaleSetPriority? scaleSetPriority, ScaleSetEvictionPolicy? scaleSetEvictionPolicy, float? spotMaxPrice, IDictionary tags, IDictionary nodeLabels, IEnumerable nodeTaints, ResourceIdentifier proximityPlacementGroupId, KubeletConfig kubeletConfig, LinuxOSConfig linuxOSConfig, bool? enableEncryptionAtHost, bool? enableUltraSsd, bool? enableFips, GpuInstanceProfile? gpuInstanceProfile, ResourceIdentifier creationDataSourceResourceId, ResourceIdentifier capacityReservationGroupId, ResourceIdentifier hostGroupId, AgentPoolNetworkProfile networkProfile)
{
- verbs ??= new List();
- apiGroups ??= new List();
- resources ??= new List();
- resourceNames ??= new List();
- nonResourceUrls ??= new List();
+ return ManagedClusterAgentPoolProfileProperties(eTag: default, count: count, vmSize: vmSize, osDiskSizeInGB: osDiskSizeInGB, osDiskType: osDiskType, kubeletDiskType: kubeletDiskType, workloadRuntime: workloadRuntime, messageOfTheDay: default, vnetSubnetId: vnetSubnetId, podSubnetId: podSubnetId, podIPAllocationMode: default, maxPods: maxPods, osType: osType, osSku: osSku, maxCount: maxCount, minCount: minCount, enableAutoScaling: enableAutoScaling, scaleDownMode: scaleDownMode, agentPoolType: agentPoolType, mode: mode, orchestratorVersion: orchestratorVersion, currentOrchestratorVersion: currentOrchestratorVersion, nodeImageVersion: nodeImageVersion, upgradeSettings: upgradeSettings, provisioningState: provisioningState, powerStateCode: powerStateCode, availabilityZones: availabilityZones, enableNodePublicIP: enableNodePublicIP, enableCustomCATrust: default, nodePublicIPPrefixId: nodePublicIPPrefixId, scaleSetPriority: scaleSetPriority, scaleSetEvictionPolicy: scaleSetEvictionPolicy, spotMaxPrice: spotMaxPrice, tags: tags, nodeLabels: nodeLabels, nodeTaints: nodeTaints, nodeInitializationTaints: default, proximityPlacementGroupId: proximityPlacementGroupId, kubeletConfig: kubeletConfig, linuxOSConfig: linuxOSConfig, enableEncryptionAtHost: enableEncryptionAtHost, enableUltraSsd: enableUltraSsd, enableFips: enableFips, gpuInstanceProfile: gpuInstanceProfile, creationDataSourceResourceId: creationDataSourceResourceId, capacityReservationGroupId: capacityReservationGroupId, hostGroupId: hostGroupId, disableOutboundNat: default, networkProfile: networkProfile, securityProfile: default, installGpuDriver: default, artifactStreamingProfileEnabled: default, scaleManual: default, virtualMachineNodesStatus: default, gatewayPublicIPPrefixSize: default);
+ }
- return new ContainerServiceTrustedAccessRoleRule(
- verbs?.ToList(),
- apiGroups?.ToList(),
- resources?.ToList(),
- resourceNames?.ToList(),
- nonResourceUrls?.ToList(),
- serializedAdditionalRawData: null);
+ /// Initializes a new instance of .
+ /// The Kubernetes version (major.minor.patch).
+ /// The Agent Pool name.
+ /// The operating system type. The default is Linux.
+ /// List of orchestrator types and versions available for upgrade.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static ManagedClusterPoolUpgradeProfile ManagedClusterPoolUpgradeProfile(string kubernetesVersion, string name, ContainerServiceOSType osType, IEnumerable upgrades)
+ {
+ return ManagedClusterPoolUpgradeProfile(kubernetesVersion: kubernetesVersion, name: name, osType: osType, upgrades: upgrades, componentsByReleases: default);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// 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.
+ /// 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.
+ /// 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.
+ /// 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).
+ /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
+ /// Determines the type of workload a node can run.
+ /// 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}.
+ /// 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}.
+ /// The maximum number of pods that can run on a node.
+ /// The operating system type. The default is Linux.
+ /// 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.
+ /// The maximum number of nodes for auto-scaling.
+ /// The minimum number of nodes for auto-scaling.
+ /// Whether to enable auto-scaler.
+ /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
+ /// The type of Agent Pool.
+ /// 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.
+ /// 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).
+ /// 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.
+ /// The version of node image.
+ /// Settings for upgrading the agentpool.
+ /// The current deployment or provisioning state.
+ /// 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.
+ /// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
+ /// 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.
+ /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.
+ /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
+ /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.
+ /// 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).
+ /// The tags to be persisted on the agent pool virtual machine scale set.
+ /// The node labels to be persisted across all nodes in agent pool.
+ /// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ /// The ID for Proximity Placement Group.
+ /// The Kubelet configuration on the agent pool nodes.
+ /// The OS configuration of Linux agent nodes.
+ /// 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.
+ /// Whether to enable UltraSSD.
+ /// 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.
+ /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.
+ /// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
+ /// AKS will associate the specified agent pool with the Capacity Reservation Group.
+ /// 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).
+ /// Network-related settings of an agent pool.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static ContainerServiceAgentPoolData ContainerServiceAgentPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, int? count, string vmSize, int? osDiskSizeInGB, ContainerServiceOSDiskType? osDiskType, KubeletDiskType? kubeletDiskType, WorkloadRuntime? workloadRuntime, ResourceIdentifier vnetSubnetId, ResourceIdentifier podSubnetId, int? maxPods, ContainerServiceOSType? osType, ContainerServiceOSSku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, ScaleDownMode? scaleDownMode, AgentPoolType? typePropertiesType, AgentPoolMode? mode, string orchestratorVersion, string currentOrchestratorVersion, string nodeImageVersion, AgentPoolUpgradeSettings upgradeSettings, string provisioningState, ContainerServiceStateCode? powerStateCode, IEnumerable availabilityZones, bool? enableNodePublicIP, ResourceIdentifier nodePublicIPPrefixId, ScaleSetPriority? scaleSetPriority, ScaleSetEvictionPolicy? scaleSetEvictionPolicy, float? spotMaxPrice, IDictionary tags, IDictionary nodeLabels, IEnumerable nodeTaints, ResourceIdentifier proximityPlacementGroupId, KubeletConfig kubeletConfig, LinuxOSConfig linuxOSConfig, bool? enableEncryptionAtHost, bool? enableUltraSsd, bool? enableFips, GpuInstanceProfile? gpuInstanceProfile, ResourceIdentifier creationDataSourceResourceId, ResourceIdentifier capacityReservationGroupId, ResourceIdentifier hostGroupId, AgentPoolNetworkProfile networkProfile)
+ {
+ return ContainerServiceAgentPoolData(id: id, name: name, resourceType: resourceType, systemData: systemData, eTag: default, count: count, vmSize: vmSize, osDiskSizeInGB: osDiskSizeInGB, osDiskType: osDiskType, kubeletDiskType: kubeletDiskType, workloadRuntime: workloadRuntime, messageOfTheDay: default, vnetSubnetId: vnetSubnetId, podSubnetId: podSubnetId, podIPAllocationMode: default, maxPods: maxPods, osType: osType, osSku: osSku, maxCount: maxCount, minCount: minCount, enableAutoScaling: enableAutoScaling, scaleDownMode: scaleDownMode, typePropertiesType: typePropertiesType, mode: mode, orchestratorVersion: orchestratorVersion, currentOrchestratorVersion: currentOrchestratorVersion, nodeImageVersion: nodeImageVersion, upgradeSettings: upgradeSettings, provisioningState: provisioningState, powerStateCode: powerStateCode, availabilityZones: availabilityZones, enableNodePublicIP: enableNodePublicIP, enableCustomCATrust: default, nodePublicIPPrefixId: nodePublicIPPrefixId, scaleSetPriority: scaleSetPriority, scaleSetEvictionPolicy: scaleSetEvictionPolicy, spotMaxPrice: spotMaxPrice, tags: tags, nodeLabels: nodeLabels, nodeTaints: nodeTaints, nodeInitializationTaints: default, proximityPlacementGroupId: proximityPlacementGroupId, kubeletConfig: kubeletConfig, linuxOSConfig: linuxOSConfig, enableEncryptionAtHost: enableEncryptionAtHost, enableUltraSsd: enableUltraSsd, enableFips: enableFips, gpuInstanceProfile: gpuInstanceProfile, creationDataSourceResourceId: creationDataSourceResourceId, capacityReservationGroupId: capacityReservationGroupId, hostGroupId: hostGroupId, disableOutboundNat: default, networkProfile: networkProfile, securityProfile: default, installGpuDriver: default, artifactStreamingProfileEnabled: default, scaleManual: default, virtualMachineNodesStatus: default, gatewayPublicIPPrefixSize: default);
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The Kubernetes version (major.minor.patch).
+ /// The operating system type. The default is Linux.
+ /// List of orchestrator types and versions available for upgrade.
+ /// The latest AKS supported node image version.
+ /// A new instance for mocking.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static AgentPoolUpgradeProfileData AgentPoolUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kubernetesVersion, ContainerServiceOSType osType, IEnumerable upgrades, string latestNodeImageVersion)
+ {
+ return AgentPoolUpgradeProfileData(id: id, name: name, resourceType: resourceType, systemData: systemData, kubernetesVersion: kubernetesVersion, osType: osType, upgrades: upgrades, componentsByReleases: default, latestNodeImageVersion: latestNodeImageVersion);
}
}
}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolCollection.cs
index 2303c347caf1..07008316bde7 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolCollection.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolCollection.cs
@@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -75,10 +75,12 @@ internal static void ValidateResourceId(ResourceIdentifier id)
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The name of the agent pool.
/// The agent pool to create or update.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// or is null.
- public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string agentPoolName, ContainerServiceAgentPoolData data, CancellationToken cancellationToken = default)
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string agentPoolName, ContainerServiceAgentPoolData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName));
Argument.AssertNotNull(data, nameof(data));
@@ -87,8 +89,8 @@ public virtual async Task> Creat
scope.Start();
try
{
- var response = await _containerServiceAgentPoolAgentPoolsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data, cancellationToken).ConfigureAwait(false);
- var operation = new ContainerServiceArmOperation(new ContainerServiceAgentPoolOperationSource(Client), _containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ var response = await _containerServiceAgentPoolAgentPoolsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(new ContainerServiceAgentPoolOperationSource(Client), _containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -113,7 +115,7 @@ public virtual async Task> Creat
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -124,10 +126,12 @@ public virtual async Task> Creat
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The name of the agent pool.
/// The agent pool to create or update.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// or is null.
- public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string agentPoolName, ContainerServiceAgentPoolData data, CancellationToken cancellationToken = default)
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string agentPoolName, ContainerServiceAgentPoolData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName));
Argument.AssertNotNull(data, nameof(data));
@@ -136,8 +140,8 @@ public virtual ArmOperation CreateOrUpdate(Wa
scope.Start();
try
{
- var response = _containerServiceAgentPoolAgentPoolsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data, cancellationToken);
- var operation = new ContainerServiceArmOperation(new ContainerServiceAgentPoolOperationSource(Client), _containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ var response = _containerServiceAgentPoolAgentPoolsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data, ifMatch, ifNoneMatch, cancellationToken);
+ var operation = new ContainerServiceArmOperation(new ContainerServiceAgentPoolOperationSource(Client), _containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, agentPoolName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -162,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(Wa
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -207,7 +211,7 @@ public virtual async Task> GetAsync(
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -252,7 +256,7 @@ public virtual Response Get(string agentPoolN
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -282,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Canc
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -312,7 +316,7 @@ public virtual Pageable GetAll(CancellationTo
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -355,7 +359,7 @@ public virtual async Task> ExistsAsync(string agentPoolName, Canc
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -398,7 +402,7 @@ public virtual Response Exists(string agentPoolName, CancellationToken can
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -443,7 +447,7 @@ public virtual async Task> G
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs
index 61ffda08ee23..1f89fc4c1b82 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs
@@ -50,6 +50,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
}
writer.WritePropertyName("properties"u8);
writer.WriteStartObject();
+ if (options.Format != "W" && Optional.IsDefined(ETag))
+ {
+ writer.WritePropertyName("eTag"u8);
+ writer.WriteStringValue(ETag.Value.ToString());
+ }
if (Optional.IsDefined(Count))
{
writer.WritePropertyName("count"u8);
@@ -80,6 +85,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
writer.WritePropertyName("workloadRuntime"u8);
writer.WriteStringValue(WorkloadRuntime.Value.ToString());
}
+ if (Optional.IsDefined(MessageOfTheDay))
+ {
+ writer.WritePropertyName("messageOfTheDay"u8);
+ writer.WriteStringValue(MessageOfTheDay);
+ }
if (Optional.IsDefined(VnetSubnetId))
{
writer.WritePropertyName("vnetSubnetID"u8);
@@ -90,6 +100,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
writer.WritePropertyName("podSubnetID"u8);
writer.WriteStringValue(PodSubnetId);
}
+ if (Optional.IsDefined(PodIPAllocationMode))
+ {
+ writer.WritePropertyName("podIPAllocationMode"u8);
+ writer.WriteStringValue(PodIPAllocationMode.Value.ToString());
+ }
if (Optional.IsDefined(MaxPods))
{
writer.WritePropertyName("maxPods"u8);
@@ -180,6 +195,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
writer.WritePropertyName("enableNodePublicIP"u8);
writer.WriteBooleanValue(EnableNodePublicIP.Value);
}
+ if (Optional.IsDefined(EnableCustomCATrust))
+ {
+ writer.WritePropertyName("enableCustomCATrust"u8);
+ writer.WriteBooleanValue(EnableCustomCATrust.Value);
+ }
if (Optional.IsDefined(NodePublicIPPrefixId))
{
writer.WritePropertyName("nodePublicIPPrefixID"u8);
@@ -232,6 +252,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
}
writer.WriteEndArray();
}
+ if (Optional.IsCollectionDefined(NodeInitializationTaints))
+ {
+ writer.WritePropertyName("nodeInitializationTaints"u8);
+ writer.WriteStartArray();
+ foreach (var item in NodeInitializationTaints)
+ {
+ writer.WriteStringValue(item);
+ }
+ writer.WriteEndArray();
+ }
if (Optional.IsDefined(ProximityPlacementGroupId))
{
writer.WritePropertyName("proximityPlacementGroupID"u8);
@@ -282,11 +312,51 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode
writer.WritePropertyName("hostGroupID"u8);
writer.WriteStringValue(HostGroupId);
}
+ if (Optional.IsDefined(WindowsProfile))
+ {
+ writer.WritePropertyName("windowsProfile"u8);
+ writer.WriteObjectValue(WindowsProfile, options);
+ }
if (Optional.IsDefined(NetworkProfile))
{
writer.WritePropertyName("networkProfile"u8);
writer.WriteObjectValue(NetworkProfile, options);
}
+ if (Optional.IsDefined(SecurityProfile))
+ {
+ writer.WritePropertyName("securityProfile"u8);
+ writer.WriteObjectValue(SecurityProfile, options);
+ }
+ if (Optional.IsDefined(GpuProfile))
+ {
+ writer.WritePropertyName("gpuProfile"u8);
+ writer.WriteObjectValue(GpuProfile, options);
+ }
+ if (Optional.IsDefined(ArtifactStreamingProfile))
+ {
+ writer.WritePropertyName("artifactStreamingProfile"u8);
+ writer.WriteObjectValue(ArtifactStreamingProfile, options);
+ }
+ if (Optional.IsDefined(VirtualMachinesProfile))
+ {
+ writer.WritePropertyName("virtualMachinesProfile"u8);
+ writer.WriteObjectValue(VirtualMachinesProfile, options);
+ }
+ if (Optional.IsCollectionDefined(VirtualMachineNodesStatus))
+ {
+ writer.WritePropertyName("virtualMachineNodesStatus"u8);
+ writer.WriteStartArray();
+ foreach (var item in VirtualMachineNodesStatus)
+ {
+ writer.WriteObjectValue(item, options);
+ }
+ writer.WriteEndArray();
+ }
+ if (Optional.IsDefined(GatewayProfile))
+ {
+ writer.WritePropertyName("gatewayProfile"u8);
+ writer.WriteObjectValue(GatewayProfile, options);
+ }
writer.WriteEndObject();
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -330,14 +400,17 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
string name = default;
ResourceType type = default;
SystemData systemData = default;
+ ETag? eTag = default;
int? count = default;
string vmSize = default;
int? osDiskSizeGB = default;
ContainerServiceOSDiskType? osDiskType = default;
KubeletDiskType? kubeletDiskType = default;
WorkloadRuntime? workloadRuntime = default;
+ string messageOfTheDay = default;
ResourceIdentifier vnetSubnetId = default;
ResourceIdentifier podSubnetId = default;
+ PodIPAllocationMode? podIPAllocationMode = default;
int? maxPods = default;
ContainerServiceOSType? osType = default;
ContainerServiceOSSku? osSku = default;
@@ -355,6 +428,7 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
ContainerServicePowerState powerState = default;
IList availabilityZones = default;
bool? enableNodePublicIP = default;
+ bool? enableCustomCATrust = default;
ResourceIdentifier nodePublicIPPrefixId = default;
ScaleSetPriority? scaleSetPriority = default;
ScaleSetEvictionPolicy? scaleSetEvictionPolicy = default;
@@ -362,6 +436,7 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
IDictionary tags = default;
IDictionary nodeLabels = default;
IList nodeTaints = default;
+ IList nodeInitializationTaints = default;
ResourceIdentifier proximityPlacementGroupId = default;
KubeletConfig kubeletConfig = default;
LinuxOSConfig linuxOSConfig = default;
@@ -372,7 +447,14 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
ContainerServiceCreationData creationData = default;
ResourceIdentifier capacityReservationGroupId = default;
ResourceIdentifier hostGroupId = default;
+ AgentPoolWindowsProfile windowsProfile = default;
AgentPoolNetworkProfile networkProfile = default;
+ AgentPoolSecurityProfile securityProfile = default;
+ AgentPoolGpuProfile gpuProfile = default;
+ AgentPoolArtifactStreamingProfile artifactStreamingProfile = default;
+ VirtualMachinesProfile virtualMachinesProfile = default;
+ IList virtualMachineNodesStatus = default;
+ AgentPoolGatewayProfile gatewayProfile = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
@@ -410,6 +492,15 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
}
foreach (var property0 in property.Value.EnumerateObject())
{
+ if (property0.NameEquals("eTag"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ eTag = new ETag(property0.Value.GetString());
+ continue;
+ }
if (property0.NameEquals("count"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -460,6 +551,11 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
workloadRuntime = new WorkloadRuntime(property0.Value.GetString());
continue;
}
+ if (property0.NameEquals("messageOfTheDay"u8))
+ {
+ messageOfTheDay = property0.Value.GetString();
+ continue;
+ }
if (property0.NameEquals("vnetSubnetID"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -478,6 +574,15 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
podSubnetId = new ResourceIdentifier(property0.Value.GetString());
continue;
}
+ if (property0.NameEquals("podIPAllocationMode"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ podIPAllocationMode = new PodIPAllocationMode(property0.Value.GetString());
+ continue;
+ }
if (property0.NameEquals("maxPods"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -620,6 +725,15 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
enableNodePublicIP = property0.Value.GetBoolean();
continue;
}
+ if (property0.NameEquals("enableCustomCATrust"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ enableCustomCATrust = property0.Value.GetBoolean();
+ continue;
+ }
if (property0.NameEquals("nodePublicIPPrefixID"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -698,6 +812,20 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
nodeTaints = array;
continue;
}
+ if (property0.NameEquals("nodeInitializationTaints"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property0.Value.EnumerateArray())
+ {
+ array.Add(item.GetString());
+ }
+ nodeInitializationTaints = array;
+ continue;
+ }
if (property0.NameEquals("proximityPlacementGroupID"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -788,6 +916,15 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
hostGroupId = new ResourceIdentifier(property0.Value.GetString());
continue;
}
+ if (property0.NameEquals("windowsProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ windowsProfile = AgentPoolWindowsProfile.DeserializeAgentPoolWindowsProfile(property0.Value, options);
+ continue;
+ }
if (property0.NameEquals("networkProfile"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -797,6 +934,65 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
networkProfile = AgentPoolNetworkProfile.DeserializeAgentPoolNetworkProfile(property0.Value, options);
continue;
}
+ if (property0.NameEquals("securityProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ securityProfile = AgentPoolSecurityProfile.DeserializeAgentPoolSecurityProfile(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("gpuProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ gpuProfile = AgentPoolGpuProfile.DeserializeAgentPoolGpuProfile(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("artifactStreamingProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ artifactStreamingProfile = AgentPoolArtifactStreamingProfile.DeserializeAgentPoolArtifactStreamingProfile(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("virtualMachinesProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ virtualMachinesProfile = VirtualMachinesProfile.DeserializeVirtualMachinesProfile(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("virtualMachineNodesStatus"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ List array = new List();
+ foreach (var item in property0.Value.EnumerateArray())
+ {
+ array.Add(VirtualMachineNodes.DeserializeVirtualMachineNodes(item, options));
+ }
+ virtualMachineNodesStatus = array;
+ continue;
+ }
+ if (property0.NameEquals("gatewayProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ gatewayProfile = AgentPoolGatewayProfile.DeserializeAgentPoolGatewayProfile(property0.Value, options);
+ continue;
+ }
}
continue;
}
@@ -811,14 +1007,17 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
name,
type,
systemData,
+ eTag,
count,
vmSize,
osDiskSizeGB,
osDiskType,
kubeletDiskType,
workloadRuntime,
+ messageOfTheDay,
vnetSubnetId,
podSubnetId,
+ podIPAllocationMode,
maxPods,
osType,
osSku,
@@ -836,6 +1035,7 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
powerState,
availabilityZones ?? new ChangeTrackingList(),
enableNodePublicIP,
+ enableCustomCATrust,
nodePublicIPPrefixId,
scaleSetPriority,
scaleSetEvictionPolicy,
@@ -843,6 +1043,7 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
tags ?? new ChangeTrackingDictionary(),
nodeLabels ?? new ChangeTrackingDictionary(),
nodeTaints ?? new ChangeTrackingList(),
+ nodeInitializationTaints ?? new ChangeTrackingList(),
proximityPlacementGroupId,
kubeletConfig,
linuxOSConfig,
@@ -853,7 +1054,14 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo
creationData,
capacityReservationGroupId,
hostGroupId,
+ windowsProfile,
networkProfile,
+ securityProfile,
+ gpuProfile,
+ artifactStreamingProfile,
+ virtualMachinesProfile,
+ virtualMachineNodesStatus ?? new ChangeTrackingList(),
+ gatewayProfile,
serializedAdditionalRawData);
}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs
index 0cba3bcad288..e4b0add8bf00 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs
@@ -58,6 +58,8 @@ public ContainerServiceAgentPoolData()
Tags = new ChangeTrackingDictionary();
NodeLabels = new ChangeTrackingDictionary();
NodeTaints = new ChangeTrackingList();
+ NodeInitializationTaints = new ChangeTrackingList();
+ VirtualMachineNodesStatus = new ChangeTrackingList();
}
/// Initializes a new instance of .
@@ -65,31 +67,35 @@ public ContainerServiceAgentPoolData()
/// The name.
/// The resourceType.
/// The systemData.
+ /// Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention.
/// 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.
/// 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.
/// 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.
/// 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).
/// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.
/// Determines the type of workload a node can run.
+ /// A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script).
/// 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}.
/// 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}.
+ /// The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'.
/// The maximum number of pods that can run on a node.
/// The operating system type. The default is Linux.
- /// 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.
+ /// Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated.
/// The maximum number of nodes for auto-scaling.
/// The minimum number of nodes for auto-scaling.
/// Whether to enable auto-scaler.
/// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.
/// The type of Agent Pool.
/// 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.
- /// 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).
- /// 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.
+ /// Both patch version <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> once it has been created 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).
+ /// If orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> version being used.
/// The version of node image.
/// Settings for upgrading the agentpool.
/// The current deployment or provisioning state.
/// 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.
/// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.
/// 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.
+ /// When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded certificates into node trust stores. Defaults to false.
/// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.
/// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
/// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.
@@ -97,6 +103,7 @@ public ContainerServiceAgentPoolData()
/// The tags to be persisted on the agent pool virtual machine scale set.
/// The node labels to be persisted across all nodes in agent pool.
/// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
+ /// These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`.
/// The ID for Proximity Placement Group.
/// The Kubelet configuration on the agent pool nodes.
/// The OS configuration of Linux agent nodes.
@@ -107,18 +114,28 @@ public ContainerServiceAgentPoolData()
/// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot.
/// AKS will associate the specified agent pool with the Capacity Reservation Group.
/// 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).
+ /// The Windows agent pool's specific profile.
/// Network-related settings of an agent pool.
+ /// The security settings of an agent pool.
+ /// The GPU settings of an agent pool.
+ /// Configuration for using artifact streaming on AKS.
+ /// Specifications on VirtualMachines agent pool.
+ /// The status of nodes in a VirtualMachines agent pool.
+ /// Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway.
/// Keeps track of any properties unknown to the library.
- internal ContainerServiceAgentPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, int? count, string vmSize, int? osDiskSizeInGB, ContainerServiceOSDiskType? osDiskType, KubeletDiskType? kubeletDiskType, WorkloadRuntime? workloadRuntime, ResourceIdentifier vnetSubnetId, ResourceIdentifier podSubnetId, int? maxPods, ContainerServiceOSType? osType, ContainerServiceOSSku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, ScaleDownMode? scaleDownMode, AgentPoolType? typePropertiesType, AgentPoolMode? mode, string orchestratorVersion, string currentOrchestratorVersion, string nodeImageVersion, AgentPoolUpgradeSettings upgradeSettings, string provisioningState, ContainerServicePowerState powerState, IList availabilityZones, bool? enableNodePublicIP, ResourceIdentifier nodePublicIPPrefixId, ScaleSetPriority? scaleSetPriority, ScaleSetEvictionPolicy? scaleSetEvictionPolicy, float? spotMaxPrice, IDictionary tags, IDictionary nodeLabels, IList nodeTaints, ResourceIdentifier proximityPlacementGroupId, KubeletConfig kubeletConfig, LinuxOSConfig linuxOSConfig, bool? enableEncryptionAtHost, bool? enableUltraSsd, bool? enableFips, GpuInstanceProfile? gpuInstanceProfile, ContainerServiceCreationData creationData, ResourceIdentifier capacityReservationGroupId, ResourceIdentifier hostGroupId, AgentPoolNetworkProfile networkProfile, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ internal ContainerServiceAgentPoolData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ETag? eTag, int? count, string vmSize, int? osDiskSizeInGB, ContainerServiceOSDiskType? osDiskType, KubeletDiskType? kubeletDiskType, WorkloadRuntime? workloadRuntime, string messageOfTheDay, ResourceIdentifier vnetSubnetId, ResourceIdentifier podSubnetId, PodIPAllocationMode? podIPAllocationMode, int? maxPods, ContainerServiceOSType? osType, ContainerServiceOSSku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, ScaleDownMode? scaleDownMode, AgentPoolType? typePropertiesType, AgentPoolMode? mode, string orchestratorVersion, string currentOrchestratorVersion, string nodeImageVersion, AgentPoolUpgradeSettings upgradeSettings, string provisioningState, ContainerServicePowerState powerState, IList availabilityZones, bool? enableNodePublicIP, bool? enableCustomCATrust, ResourceIdentifier nodePublicIPPrefixId, ScaleSetPriority? scaleSetPriority, ScaleSetEvictionPolicy? scaleSetEvictionPolicy, float? spotMaxPrice, IDictionary tags, IDictionary nodeLabels, IList nodeTaints, IList nodeInitializationTaints, ResourceIdentifier proximityPlacementGroupId, KubeletConfig kubeletConfig, LinuxOSConfig linuxOSConfig, bool? enableEncryptionAtHost, bool? enableUltraSsd, bool? enableFips, GpuInstanceProfile? gpuInstanceProfile, ContainerServiceCreationData creationData, ResourceIdentifier capacityReservationGroupId, ResourceIdentifier hostGroupId, AgentPoolWindowsProfile windowsProfile, AgentPoolNetworkProfile networkProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolArtifactStreamingProfile artifactStreamingProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolGatewayProfile gatewayProfile, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
{
+ ETag = eTag;
Count = count;
VmSize = vmSize;
OSDiskSizeInGB = osDiskSizeInGB;
OSDiskType = osDiskType;
KubeletDiskType = kubeletDiskType;
WorkloadRuntime = workloadRuntime;
+ MessageOfTheDay = messageOfTheDay;
VnetSubnetId = vnetSubnetId;
PodSubnetId = podSubnetId;
+ PodIPAllocationMode = podIPAllocationMode;
MaxPods = maxPods;
OSType = osType;
OSSku = osSku;
@@ -136,6 +153,7 @@ internal ContainerServiceAgentPoolData(ResourceIdentifier id, string name, Resou
PowerState = powerState;
AvailabilityZones = availabilityZones;
EnableNodePublicIP = enableNodePublicIP;
+ EnableCustomCATrust = enableCustomCATrust;
NodePublicIPPrefixId = nodePublicIPPrefixId;
ScaleSetPriority = scaleSetPriority;
ScaleSetEvictionPolicy = scaleSetEvictionPolicy;
@@ -143,6 +161,7 @@ internal ContainerServiceAgentPoolData(ResourceIdentifier id, string name, Resou
Tags = tags;
NodeLabels = nodeLabels;
NodeTaints = nodeTaints;
+ NodeInitializationTaints = nodeInitializationTaints;
ProximityPlacementGroupId = proximityPlacementGroupId;
KubeletConfig = kubeletConfig;
LinuxOSConfig = linuxOSConfig;
@@ -153,10 +172,19 @@ internal ContainerServiceAgentPoolData(ResourceIdentifier id, string name, Resou
CreationData = creationData;
CapacityReservationGroupId = capacityReservationGroupId;
HostGroupId = hostGroupId;
+ WindowsProfile = windowsProfile;
NetworkProfile = networkProfile;
+ SecurityProfile = securityProfile;
+ GpuProfile = gpuProfile;
+ ArtifactStreamingProfile = artifactStreamingProfile;
+ VirtualMachinesProfile = virtualMachinesProfile;
+ VirtualMachineNodesStatus = virtualMachineNodesStatus;
+ GatewayProfile = gatewayProfile;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
+ /// Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention.
+ public ETag? ETag { get; }
/// 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.
public int? Count { get; set; }
/// 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.
@@ -169,15 +197,19 @@ internal ContainerServiceAgentPoolData(ResourceIdentifier id, string name, Resou
public KubeletDiskType? KubeletDiskType { get; set; }
/// Determines the type of workload a node can run.
public WorkloadRuntime? WorkloadRuntime { get; set; }
+ /// A base64-encoded string which will be written to /etc/motd after decoding. This allows customization of the message of the day for Linux nodes. It must not be specified for Windows nodes. It must be a static string (i.e., will be printed raw and not be executed as a script).
+ public string MessageOfTheDay { get; set; }
/// 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}.
public ResourceIdentifier VnetSubnetId { get; set; }
/// 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}.
public ResourceIdentifier PodSubnetId { get; set; }
+ /// The IP allocation mode for pods in the agent pool. Must be used with podSubnetId. The default is 'DynamicIndividual'.
+ public PodIPAllocationMode? PodIPAllocationMode { get; set; }
/// The maximum number of pods that can run on a node.
public int? MaxPods { get; set; }
/// The operating system type. The default is Linux.
public ContainerServiceOSType? OSType { get; set; }
- /// 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.
+ /// Specifies the OS SKU used by the agent pool. If not specified, the default is Ubuntu if OSType=Linux or Windows2019 if OSType=Windows. And the default Windows OSSKU will be changed to Windows2022 after Windows2019 is deprecated.
public ContainerServiceOSSku? OSSku { get; set; }
/// The maximum number of nodes for auto-scaling.
public int? MaxCount { get; set; }
@@ -191,9 +223,9 @@ internal ContainerServiceAgentPoolData(ResourceIdentifier id, string name, Resou
public AgentPoolType? TypePropertiesType { get; set; }
/// 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.
public AgentPoolMode? Mode { get; set; }
- /// 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).
+ /// Both patch version <major.minor.patch> and <major.minor> are supported. When <major.minor> is specified, the latest supported patch version is chosen automatically. Updating the agent pool with the same <major.minor> once it has been created 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).
public string OrchestratorVersion { get; set; }
- /// 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.
+ /// If orchestratorVersion was a fully specified version <major.minor.patch>, this field will be exactly equal to it. If orchestratorVersion was <major.minor>, this field will contain the full <major.minor.patch> version being used.
public string CurrentOrchestratorVersion { get; }
/// The version of node image.
public string NodeImageVersion { get; }
@@ -219,6 +251,8 @@ public ContainerServiceStateCode? PowerStateCode
public IList AvailabilityZones { get; }
/// 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.
public bool? EnableNodePublicIP { get; set; }
+ /// When set to true, AKS adds a label to the node indicating that the feature is enabled and deploys a daemonset along with host services to sync custom certificate authorities from user-provided list of base64 encoded certificates into node trust stores. Defaults to false.
+ public bool? EnableCustomCATrust { get; set; }
/// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}.
public ResourceIdentifier NodePublicIPPrefixId { get; set; }
/// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.
@@ -233,6 +267,8 @@ public ContainerServiceStateCode? PowerStateCode
public IDictionary NodeLabels { get; }
/// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.
public IList NodeTaints { get; }
+ /// These taints will not be reconciled by AKS and can be removed with a kubectl call. This field can be modified after node pool is created, but nodes will not be recreated with new taints until another operation that requires recreation (e.g. node image upgrade) happens. These taints allow for required configuration to run before the node is ready to accept workloads, for example 'key1=value1:NoSchedule' that then can be removed with `kubectl taint nodes node1 key1=value1:NoSchedule-`.
+ public IList NodeInitializationTaints { get; }
/// The ID for Proximity Placement Group.
public ResourceIdentifier ProximityPlacementGroupId { get; set; }
/// The Kubelet configuration on the agent pool nodes.
@@ -265,7 +301,79 @@ public ResourceIdentifier CreationDataSourceResourceId
public ResourceIdentifier CapacityReservationGroupId { get; set; }
/// 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).
public ResourceIdentifier HostGroupId { get; set; }
+ /// The Windows agent pool's specific profile.
+ internal AgentPoolWindowsProfile WindowsProfile { get; set; }
+ /// The default value is false. Outbound NAT can only be disabled if the cluster outboundType is NAT Gateway and the Windows agent pool does not have node public IP enabled.
+ public bool? DisableOutboundNat
+ {
+ get => WindowsProfile is null ? default : WindowsProfile.DisableOutboundNat;
+ set
+ {
+ if (WindowsProfile is null)
+ WindowsProfile = new AgentPoolWindowsProfile();
+ WindowsProfile.DisableOutboundNat = value;
+ }
+ }
+
/// Network-related settings of an agent pool.
public AgentPoolNetworkProfile NetworkProfile { get; set; }
+ /// The security settings of an agent pool.
+ public AgentPoolSecurityProfile SecurityProfile { get; set; }
+ /// The GPU settings of an agent pool.
+ internal AgentPoolGpuProfile GpuProfile { get; set; }
+ /// The default value is true when the vmSize of the agent pool contains a GPU, false otherwise. GPU Driver Installation can only be set true when VM has an associated GPU resource. Setting this field to false prevents automatic GPU driver installation. In that case, in order for the GPU to be usable, the user must perform GPU driver installation themselves.
+ public bool? InstallGpuDriver
+ {
+ get => GpuProfile is null ? default : GpuProfile.InstallGpuDriver;
+ set
+ {
+ if (GpuProfile is null)
+ GpuProfile = new AgentPoolGpuProfile();
+ GpuProfile.InstallGpuDriver = value;
+ }
+ }
+
+ /// Configuration for using artifact streaming on AKS.
+ internal AgentPoolArtifactStreamingProfile ArtifactStreamingProfile { get; set; }
+ /// Artifact streaming speeds up the cold-start of containers on a node through on-demand image loading. To use this feature, container images must also enable artifact streaming on ACR. If not specified, the default is false.
+ public bool? ArtifactStreamingProfileEnabled
+ {
+ get => ArtifactStreamingProfile is null ? default : ArtifactStreamingProfile.Enabled;
+ set
+ {
+ if (ArtifactStreamingProfile is null)
+ ArtifactStreamingProfile = new AgentPoolArtifactStreamingProfile();
+ ArtifactStreamingProfile.Enabled = value;
+ }
+ }
+
+ /// Specifications on VirtualMachines agent pool.
+ internal VirtualMachinesProfile VirtualMachinesProfile { get; set; }
+ /// Specifications on how to scale the VirtualMachines agent pool to a fixed size.
+ public IList ScaleManual
+ {
+ get
+ {
+ if (VirtualMachinesProfile is null)
+ VirtualMachinesProfile = new VirtualMachinesProfile();
+ return VirtualMachinesProfile.ScaleManual;
+ }
+ }
+
+ /// The status of nodes in a VirtualMachines agent pool.
+ public IList VirtualMachineNodesStatus { get; }
+ /// Profile specific to a managed agent pool in Gateway mode. This field cannot be set if agent pool mode is not Gateway.
+ internal AgentPoolGatewayProfile GatewayProfile { get; set; }
+ /// The Gateway agent pool associates one public IPPrefix for each static egress gateway to provide public egress. The size of Public IPPrefix should be selected by the user. Each node in the agent pool is assigned with one IP from the IPPrefix. The IPPrefix size thus serves as a cap on the size of the Gateway agent pool. Due to Azure public IPPrefix size limitation, the valid value range is [28, 31] (/31 = 2 nodes/IPs, /30 = 4 nodes/IPs, /29 = 8 nodes/IPs, /28 = 16 nodes/IPs). The default value is 31.
+ public int? GatewayPublicIPPrefixSize
+ {
+ get => GatewayProfile is null ? default : GatewayProfile.PublicIPPrefixSize;
+ set
+ {
+ if (GatewayProfile is null)
+ GatewayProfile = new AgentPoolGatewayProfile();
+ GatewayProfile.PublicIPPrefixSize = value;
+ }
+ }
}
}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.cs
index 5bd85e86a58a..526b88df1648 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.cs
@@ -12,6 +12,7 @@
using System.Threading.Tasks;
using Azure.Core;
using Azure.Core.Pipeline;
+using Azure.ResourceManager.ContainerService.Models;
namespace Azure.ResourceManager.ContainerService
{
@@ -36,6 +37,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId,
private readonly ClientDiagnostics _containerServiceAgentPoolAgentPoolsClientDiagnostics;
private readonly AgentPoolsRestOperations _containerServiceAgentPoolAgentPoolsRestClient;
+ private readonly ClientDiagnostics _operationStatusResultClientDiagnostics;
+ private readonly OperationStatusResultRestOperations _operationStatusResultRestClient;
private readonly ContainerServiceAgentPoolData _data;
/// Gets the resource type for the operations.
@@ -63,6 +66,8 @@ internal ContainerServiceAgentPoolResource(ArmClient client, ResourceIdentifier
_containerServiceAgentPoolAgentPoolsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", ResourceType.Namespace, Diagnostics);
TryGetApiVersion(ResourceType, out string containerServiceAgentPoolAgentPoolsApiVersion);
_containerServiceAgentPoolAgentPoolsRestClient = new AgentPoolsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, containerServiceAgentPoolAgentPoolsApiVersion);
+ _operationStatusResultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ _operationStatusResultRestClient = new OperationStatusResultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
#if DEBUG
ValidateResourceId(Id);
#endif
@@ -96,6 +101,75 @@ public virtual AgentPoolUpgradeProfileResource GetAgentPoolUpgradeProfile()
return new AgentPoolUpgradeProfileResource(Client, Id.AppendChildResource("upgradeProfiles", "default"));
}
+ /// Gets a collection of MachineResources in the ContainerServiceAgentPool.
+ /// An object representing collection of MachineResources and their operations over a MachineResource.
+ public virtual MachineCollection GetMachines()
+ {
+ return GetCachedClient(client => new MachineCollection(client, Id));
+ }
+
+ ///
+ /// Get a specific machine in the specified agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// host name of the machine.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetMachineAsync(string machineName, CancellationToken cancellationToken = default)
+ {
+ return await GetMachines().GetAsync(machineName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Get a specific machine in the specified agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// host name of the machine.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetMachine(string machineName, CancellationToken cancellationToken = default)
+ {
+ return GetMachines().Get(machineName, cancellationToken);
+ }
+
///
/// Gets the specified managed cluster agent pool.
///
@@ -109,7 +183,7 @@ public virtual AgentPoolUpgradeProfileResource GetAgentPoolUpgradeProfile()
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -149,7 +223,7 @@ public virtual async Task> GetAsync(
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -176,6 +250,94 @@ public virtual Response Get(CancellationToken
}
}
+ ///
+ /// Deletes an agent pool in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
+ ///
+ /// -
+ /// Operation Id
+ /// AgentPools_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? ignorePodDisruptionBudget = null, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _containerServiceAgentPoolAgentPoolsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ignorePodDisruptionBudget, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(_containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ignorePodDisruptionBudget, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Deletes an agent pool in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}
+ ///
+ /// -
+ /// Operation Id
+ /// AgentPools_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? ignorePodDisruptionBudget = null, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _containerServiceAgentPoolAgentPoolsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ignorePodDisruptionBudget, ifMatch, cancellationToken);
+ var operation = new ContainerServiceArmOperation(_containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, ignorePodDisruptionBudget, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
///
/// Creates or updates an agent pool in the specified managed cluster.
///
@@ -189,7 +351,7 @@ public virtual Response Get(CancellationToken
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -199,9 +361,11 @@ public virtual Response Get(CancellationToken
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The agent pool to create or update.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
/// The cancellation token to use.
/// is null.
- public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerServiceAgentPoolData data, CancellationToken cancellationToken = default)
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerServiceAgentPoolData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(data, nameof(data));
@@ -209,8 +373,8 @@ public virtual async Task> Updat
scope.Start();
try
{
- var response = await _containerServiceAgentPoolAgentPoolsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false);
- var operation = new ContainerServiceArmOperation(new ContainerServiceAgentPoolOperationSource(Client), _containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ var response = await _containerServiceAgentPoolAgentPoolsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(new ContainerServiceAgentPoolOperationSource(Client), _containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -235,7 +399,7 @@ public virtual async Task> Updat
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -245,9 +409,11 @@ public virtual async Task> Updat
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The agent pool to create or update.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
/// The cancellation token to use.
/// is null.
- public virtual ArmOperation Update(WaitUntil waitUntil, ContainerServiceAgentPoolData data, CancellationToken cancellationToken = default)
+ public virtual ArmOperation Update(WaitUntil waitUntil, ContainerServiceAgentPoolData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(data, nameof(data));
@@ -255,8 +421,8 @@ public virtual ArmOperation Update(WaitUntil
scope.Start();
try
{
- var response = _containerServiceAgentPoolAgentPoolsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken);
- var operation = new ContainerServiceArmOperation(new ContainerServiceAgentPoolOperationSource(Client), _containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ var response = _containerServiceAgentPoolAgentPoolsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch, cancellationToken);
+ var operation = new ContainerServiceArmOperation(new ContainerServiceAgentPoolOperationSource(Client), _containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -269,7 +435,7 @@ public virtual ArmOperation Update(WaitUntil
}
///
- /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned.
+ /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned.
///
/// -
/// Request Path
@@ -281,7 +447,7 @@ public virtual ArmOperation Update(WaitUntil
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -311,7 +477,7 @@ public virtual async Task AbortLatestOperationAsync(WaitUntil wait
}
///
- /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned.
+ /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned.
///
/// -
/// Request Path
@@ -323,7 +489,7 @@ public virtual async Task AbortLatestOperationAsync(WaitUntil wait
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -352,6 +518,98 @@ public virtual ArmOperation AbortLatestOperation(WaitUntil waitUntil, Cancellati
}
}
+ ///
+ /// Deletes specific machines in an agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines
+ ///
+ /// -
+ /// Operation Id
+ /// AgentPools_DeleteMachines
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// A list of machines from the agent pool to be deleted.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task DeleteMachinesAsync(WaitUntil waitUntil, AgentPoolDeleteMachinesParameter machines, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(machines, nameof(machines));
+
+ using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolResource.DeleteMachines");
+ scope.Start();
+ try
+ {
+ var response = await _containerServiceAgentPoolAgentPoolsRestClient.DeleteMachinesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, machines, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(_containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateDeleteMachinesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, machines).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Deletes specific machines in an agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/deleteMachines
+ ///
+ /// -
+ /// Operation Id
+ /// AgentPools_DeleteMachines
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// A list of machines from the agent pool to be deleted.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation DeleteMachines(WaitUntil waitUntil, AgentPoolDeleteMachinesParameter machines, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(machines, nameof(machines));
+
+ using var scope = _containerServiceAgentPoolAgentPoolsClientDiagnostics.CreateScope("ContainerServiceAgentPoolResource.DeleteMachines");
+ scope.Start();
+ try
+ {
+ var response = _containerServiceAgentPoolAgentPoolsRestClient.DeleteMachines(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, machines, cancellationToken);
+ var operation = new ContainerServiceArmOperation(_containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateDeleteMachinesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, machines).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
///
/// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade
///
@@ -365,7 +623,7 @@ public virtual ArmOperation AbortLatestOperation(WaitUntil waitUntil, Cancellati
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -407,7 +665,7 @@ public virtual async Task UpgradeNodeImageVersionAsync(WaitUntil w
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -436,6 +694,84 @@ public virtual ArmOperation UpgradeNodeImageVersion(WaitUntil waitUntil, Cancell
}
}
+ ///
+ /// Get the status of a specific operation in the specified agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}
+ ///
+ /// -
+ /// Operation Id
+ /// OperationStatusResult_GetByAgentPool
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ ///
+ ///
+ /// The ID of an ongoing async operation.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetByAgentPoolOperationStatusResultAsync(string operationId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(operationId, nameof(operationId));
+
+ using var scope = _operationStatusResultClientDiagnostics.CreateScope("ContainerServiceAgentPoolResource.GetByAgentPoolOperationStatusResult");
+ scope.Start();
+ try
+ {
+ var response = await _operationStatusResultRestClient.GetByAgentPoolAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the status of a specific operation in the specified agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/operations/{operationId}
+ ///
+ /// -
+ /// Operation Id
+ /// OperationStatusResult_GetByAgentPool
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ ///
+ ///
+ /// The ID of an ongoing async operation.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response GetByAgentPoolOperationStatusResult(string operationId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(operationId, nameof(operationId));
+
+ using var scope = _operationStatusResultClientDiagnostics.CreateScope("ContainerServiceAgentPoolResource.GetByAgentPoolOperationStatusResult");
+ scope.Start();
+ try
+ {
+ var response = _operationStatusResultRestClient.GetByAgentPool(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, operationId, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
///
/// Add a tag to the current resource.
///
@@ -449,7 +785,7 @@ public virtual ArmOperation UpgradeNodeImageVersion(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -506,7 +842,7 @@ public virtual async Task> AddTagAsy
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -563,7 +899,7 @@ public virtual Response AddTag(string key, st
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -619,7 +955,7 @@ public virtual async Task> SetTagsAs
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -675,7 +1011,7 @@ public virtual Response SetTags(IDictionary
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -730,7 +1066,7 @@ public virtual async Task> RemoveTag
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationCollection.cs
index f608a529017b..ba6406aa7818 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationCollection.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationCollection.cs
@@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -115,7 +115,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -166,7 +166,7 @@ public virtual ArmOperation Cr
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -211,7 +211,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -256,7 +256,7 @@ public virtual Response Get(st
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -286,7 +286,7 @@ public virtual AsyncPageable G
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -316,7 +316,7 @@ public virtual Pageable GetAll
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string configName, Cancell
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -402,7 +402,7 @@ public virtual Response Exists(string configName, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -447,7 +447,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationResource.cs
index f1463e991c78..9e66f3187a1c 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationResource.cs
@@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -141,7 +141,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -181,7 +181,7 @@ public virtual Response Get(Ca
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -317,7 +317,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterCollection.cs
index 878e24ac046b..56efcbf84038 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterCollection.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterCollection.cs
@@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -76,10 +76,12 @@ internal static void ValidateResourceId(ResourceIdentifier id)
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The name of the managed cluster resource.
/// The managed cluster to create or update.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// or is null.
- public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceName, ContainerServiceManagedClusterData data, CancellationToken cancellationToken = default)
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceName, ContainerServiceManagedClusterData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
Argument.AssertNotNull(data, nameof(data));
@@ -88,8 +90,8 @@ public virtual async Task>
scope.Start();
try
{
- var response = await _containerServiceManagedClusterManagedClustersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data, cancellationToken).ConfigureAwait(false);
- var operation = new ContainerServiceArmOperation(new ContainerServiceManagedClusterOperationSource(Client), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ var response = await _containerServiceManagedClusterManagedClustersRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data, ifMatch, ifNoneMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(new ContainerServiceManagedClusterOperationSource(Client), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -114,7 +116,7 @@ public virtual async Task>
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -125,10 +127,12 @@ public virtual async Task>
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The name of the managed cluster resource.
/// The managed cluster to create or update.
+ /// The request should only proceed if an entity matches this string.
+ /// The request should only proceed if no entity matches this string.
/// The cancellation token to use.
/// is an empty string, and was expected to be non-empty.
/// or is null.
- public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string resourceName, ContainerServiceManagedClusterData data, CancellationToken cancellationToken = default)
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string resourceName, ContainerServiceManagedClusterData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
Argument.AssertNotNull(data, nameof(data));
@@ -137,8 +141,8 @@ public virtual ArmOperation CreateOrUpda
scope.Start();
try
{
- var response = _containerServiceManagedClusterManagedClustersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data, cancellationToken);
- var operation = new ContainerServiceArmOperation(new ContainerServiceManagedClusterOperationSource(Client), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ var response = _containerServiceManagedClusterManagedClustersRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data, ifMatch, ifNoneMatch, cancellationToken);
+ var operation = new ContainerServiceArmOperation(new ContainerServiceManagedClusterOperationSource(Client), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data, ifMatch, ifNoneMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -163,7 +167,7 @@ public virtual ArmOperation CreateOrUpda
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -208,7 +212,7 @@ public virtual async Task> GetA
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -253,7 +257,7 @@ public virtual Response Get(string resou
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -283,7 +287,7 @@ public virtual AsyncPageable GetAllAsync
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -313,7 +317,7 @@ public virtual Pageable GetAll(Cancellat
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -356,7 +360,7 @@ public virtual async Task> ExistsAsync(string resourceName, Cance
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -399,7 +403,7 @@ public virtual Response Exists(string resourceName, CancellationToken canc
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -444,7 +448,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.Serialization.cs
index b44313ff7c22..1223f49ff31d 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.Serialization.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.Serialization.cs
@@ -29,6 +29,11 @@ void IJsonModel.Write(Utf8JsonWriter writer,
}
writer.WriteStartObject();
+ if (options.Format != "W" && Optional.IsDefined(ETag))
+ {
+ writer.WritePropertyName("eTag"u8);
+ writer.WriteStringValue(ETag.Value.ToString());
+ }
if (Optional.IsDefined(Sku))
{
writer.WritePropertyName("sku"u8);
@@ -44,6 +49,11 @@ void IJsonModel.Write(Utf8JsonWriter writer,
writer.WritePropertyName("identity"u8);
writer.WriteObjectValue(ClusterIdentity, options);
}
+ if (Optional.IsDefined(Kind))
+ {
+ writer.WritePropertyName("kind"u8);
+ writer.WriteStringValue(Kind);
+ }
if (Optional.IsCollectionDefined(Tags))
{
writer.WritePropertyName("tags"u8);
@@ -89,6 +99,11 @@ void IJsonModel.Write(Utf8JsonWriter writer,
writer.WritePropertyName("powerState"u8);
writer.WriteObjectValue(PowerState, options);
}
+ if (Optional.IsDefined(CreationData))
+ {
+ writer.WritePropertyName("creationData"u8);
+ writer.WriteObjectValue(CreationData, options);
+ }
if (options.Format != "W" && Optional.IsDefined(MaxAgentPools))
{
writer.WritePropertyName("maxAgentPools"u8);
@@ -180,6 +195,11 @@ void IJsonModel.Write(Utf8JsonWriter writer,
writer.WritePropertyName("nodeResourceGroup"u8);
writer.WriteStringValue(NodeResourceGroup);
}
+ if (Optional.IsDefined(NodeResourceGroupProfile))
+ {
+ writer.WritePropertyName("nodeResourceGroupProfile"u8);
+ writer.WriteObjectValue(NodeResourceGroupProfile, options);
+ }
if (Optional.IsDefined(EnableRbac))
{
writer.WritePropertyName("enableRBAC"u8);
@@ -195,6 +215,11 @@ void IJsonModel.Write(Utf8JsonWriter writer,
writer.WritePropertyName("enablePodSecurityPolicy"u8);
writer.WriteBooleanValue(EnablePodSecurityPolicy.Value);
}
+ if (Optional.IsDefined(EnableNamespaceResources))
+ {
+ writer.WritePropertyName("enableNamespaceResources"u8);
+ writer.WriteBooleanValue(EnableNamespaceResources.Value);
+ }
if (Optional.IsDefined(NetworkProfile))
{
writer.WritePropertyName("networkProfile"u8);
@@ -271,6 +296,11 @@ void IJsonModel.Write(Utf8JsonWriter writer,
writer.WritePropertyName("storageProfile"u8);
writer.WriteObjectValue(StorageProfile, options);
}
+ if (Optional.IsDefined(IngressProfile))
+ {
+ writer.WritePropertyName("ingressProfile"u8);
+ writer.WriteObjectValue(IngressProfile, options);
+ }
if (Optional.IsDefined(PublicNetworkAccess))
{
writer.WritePropertyName("publicNetworkAccess"u8);
@@ -286,6 +316,11 @@ void IJsonModel.Write(Utf8JsonWriter writer,
writer.WritePropertyName("azureMonitorProfile"u8);
writer.WriteObjectValue(AzureMonitorProfile, options);
}
+ if (Optional.IsDefined(SafeguardsProfile))
+ {
+ writer.WritePropertyName("safeguardsProfile"u8);
+ writer.WriteObjectValue(SafeguardsProfile, options);
+ }
if (Optional.IsDefined(ServiceMeshProfile))
{
writer.WritePropertyName("serviceMeshProfile"u8);
@@ -296,6 +331,26 @@ void IJsonModel.Write(Utf8JsonWriter writer,
writer.WritePropertyName("resourceUID"u8);
writer.WriteStringValue(ResourceId);
}
+ if (Optional.IsDefined(MetricsProfile))
+ {
+ writer.WritePropertyName("metricsProfile"u8);
+ writer.WriteObjectValue(MetricsProfile, options);
+ }
+ if (Optional.IsDefined(AiToolchainOperatorProfile))
+ {
+ writer.WritePropertyName("aiToolchainOperatorProfile"u8);
+ writer.WriteObjectValue(AiToolchainOperatorProfile, options);
+ }
+ if (Optional.IsDefined(NodeProvisioningProfile))
+ {
+ writer.WritePropertyName("nodeProvisioningProfile"u8);
+ writer.WriteObjectValue(NodeProvisioningProfile, options);
+ }
+ if (Optional.IsDefined(BootstrapProfile))
+ {
+ writer.WritePropertyName("bootstrapProfile"u8);
+ writer.WriteObjectValue(BootstrapProfile, options);
+ }
writer.WriteEndObject();
if (options.Format != "W" && _serializedAdditionalRawData != null)
{
@@ -335,9 +390,11 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
{
return null;
}
+ ETag? eTag = default;
ManagedClusterSku sku = default;
ExtendedLocation extendedLocation = default;
ManagedClusterIdentity identity = default;
+ string kind = default;
IDictionary tags = default;
AzureLocation location = default;
ResourceIdentifier id = default;
@@ -346,6 +403,7 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
SystemData systemData = default;
string provisioningState = default;
ContainerServicePowerState powerState = default;
+ ContainerServiceCreationData creationData = default;
int? maxAgentPools = default;
string kubernetesVersion = default;
string currentKubernetesVersion = default;
@@ -362,9 +420,11 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
ManagedClusterPodIdentityProfile podIdentityProfile = default;
ManagedClusterOidcIssuerProfile oidcIssuerProfile = default;
string nodeResourceGroup = default;
+ ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile = default;
bool? enableRBAC = default;
KubernetesSupportPlan? supportPlan = default;
bool? enablePodSecurityPolicy = default;
+ bool? enableNamespaceResources = default;
ContainerServiceNetworkProfile networkProfile = default;
ManagedClusterAadProfile aadProfile = default;
ManagedClusterAutoUpgradeProfile autoUpgradeProfile = default;
@@ -378,15 +438,30 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
ManagedClusterHttpProxyConfig httpProxyConfig = default;
ManagedClusterSecurityProfile securityProfile = default;
ManagedClusterStorageProfile storageProfile = default;
+ ManagedClusterIngressProfile ingressProfile = default;
ContainerServicePublicNetworkAccess? publicNetworkAccess = default;
ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile = default;
ManagedClusterAzureMonitorProfile azureMonitorProfile = default;
+ SafeguardsProfile safeguardsProfile = default;
ServiceMeshProfile serviceMeshProfile = default;
ResourceIdentifier resourceUID = default;
+ ManagedClusterMetricsProfile metricsProfile = default;
+ ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile = default;
+ ManagedClusterNodeProvisioningProfile nodeProvisioningProfile = default;
+ ManagedClusterBootstrapProfile bootstrapProfile = default;
IDictionary serializedAdditionalRawData = default;
Dictionary rawDataDictionary = new Dictionary();
foreach (var property in element.EnumerateObject())
{
+ if (property.NameEquals("eTag"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ eTag = new ETag(property.Value.GetString());
+ continue;
+ }
if (property.NameEquals("sku"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -414,6 +489,11 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
identity = ManagedClusterIdentity.DeserializeManagedClusterIdentity(property.Value, options);
continue;
}
+ if (property.NameEquals("kind"u8))
+ {
+ kind = property.Value.GetString();
+ continue;
+ }
if (property.NameEquals("tags"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -480,6 +560,15 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
powerState = ContainerServicePowerState.DeserializeContainerServicePowerState(property0.Value, options);
continue;
}
+ if (property0.NameEquals("creationData"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ creationData = ContainerServiceCreationData.DeserializeContainerServiceCreationData(property0.Value, options);
+ continue;
+ }
if (property0.NameEquals("maxAgentPools"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -602,6 +691,15 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
nodeResourceGroup = property0.Value.GetString();
continue;
}
+ if (property0.NameEquals("nodeResourceGroupProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ nodeResourceGroupProfile = ManagedClusterNodeResourceGroupProfile.DeserializeManagedClusterNodeResourceGroupProfile(property0.Value, options);
+ continue;
+ }
if (property0.NameEquals("enableRBAC"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -629,6 +727,15 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
enablePodSecurityPolicy = property0.Value.GetBoolean();
continue;
}
+ if (property0.NameEquals("enableNamespaceResources"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ enableNamespaceResources = property0.Value.GetBoolean();
+ continue;
+ }
if (property0.NameEquals("networkProfile"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -756,6 +863,15 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
storageProfile = ManagedClusterStorageProfile.DeserializeManagedClusterStorageProfile(property0.Value, options);
continue;
}
+ if (property0.NameEquals("ingressProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ ingressProfile = ManagedClusterIngressProfile.DeserializeManagedClusterIngressProfile(property0.Value, options);
+ continue;
+ }
if (property0.NameEquals("publicNetworkAccess"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -783,6 +899,15 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
azureMonitorProfile = ManagedClusterAzureMonitorProfile.DeserializeManagedClusterAzureMonitorProfile(property0.Value, options);
continue;
}
+ if (property0.NameEquals("safeguardsProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ safeguardsProfile = SafeguardsProfile.DeserializeSafeguardsProfile(property0.Value, options);
+ continue;
+ }
if (property0.NameEquals("serviceMeshProfile"u8))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
@@ -801,6 +926,42 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
resourceUID = new ResourceIdentifier(property0.Value.GetString());
continue;
}
+ if (property0.NameEquals("metricsProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ metricsProfile = ManagedClusterMetricsProfile.DeserializeManagedClusterMetricsProfile(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("aiToolchainOperatorProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ aiToolchainOperatorProfile = ManagedClusterAIToolchainOperatorProfile.DeserializeManagedClusterAIToolchainOperatorProfile(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("nodeProvisioningProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ nodeProvisioningProfile = ManagedClusterNodeProvisioningProfile.DeserializeManagedClusterNodeProvisioningProfile(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("bootstrapProfile"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ bootstrapProfile = ManagedClusterBootstrapProfile.DeserializeManagedClusterBootstrapProfile(property0.Value, options);
+ continue;
+ }
}
continue;
}
@@ -817,11 +978,14 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
systemData,
tags ?? new ChangeTrackingDictionary(),
location,
+ eTag,
sku,
extendedLocation,
identity,
+ kind,
provisioningState,
powerState,
+ creationData,
maxAgentPools,
kubernetesVersion,
currentKubernetesVersion,
@@ -838,9 +1002,11 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
podIdentityProfile,
oidcIssuerProfile,
nodeResourceGroup,
+ nodeResourceGroupProfile,
enableRBAC,
supportPlan,
enablePodSecurityPolicy,
+ enableNamespaceResources,
networkProfile,
aadProfile,
autoUpgradeProfile,
@@ -854,11 +1020,17 @@ internal static ContainerServiceManagedClusterData DeserializeContainerServiceMa
httpProxyConfig,
securityProfile,
storageProfile,
+ ingressProfile,
publicNetworkAccess,
workloadAutoScalerProfile,
azureMonitorProfile,
+ safeguardsProfile,
serviceMeshProfile,
resourceUID,
+ metricsProfile,
+ aiToolchainOperatorProfile,
+ nodeProvisioningProfile,
+ bootstrapProfile,
serializedAdditionalRawData);
}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.cs
index 2d5de45be238..2e92f55c0351 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.cs
@@ -69,14 +69,17 @@ public ContainerServiceManagedClusterData(AzureLocation location) : base(locatio
/// The systemData.
/// The tags.
/// The location.
+ /// Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention.
/// The managed cluster SKU.
/// The extended location of the Virtual Machine.
/// The identity of the managed cluster, if configured.
+ /// This is primarily used to expose different UI experiences in the portal for different kinds.
/// The current provisioning state.
/// The Power State of the cluster.
+ /// CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot.
/// The max number of agent pools for the managed cluster.
- /// 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.
- /// 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.
+ /// 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.
+ /// The version of Kubernetes the Managed Cluster is running.
/// This cannot be updated once the Managed Cluster has been created.
/// This cannot be updated once the Managed Cluster has been created.
/// The FQDN of the master pool.
@@ -90,9 +93,11 @@ public ContainerServiceManagedClusterData(AzureLocation location) : base(locatio
/// See [use AAD pod identity](https://docs.microsoft.com/azure/aks/use-azure-ad-pod-identity) for more details on AAD pod identity integration.
/// The OIDC issuer profile of the Managed Cluster.
/// The name of the resource group containing agent pool nodes.
+ /// The node resource group configuration profile.
/// Whether to enable Kubernetes Role-Based Access Control.
/// The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'.
/// (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.
+ /// 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.
/// The network configuration profile.
/// The Azure Active Directory configuration.
/// The auto upgrade configuration.
@@ -106,19 +111,28 @@ public ContainerServiceManagedClusterData(AzureLocation location) : base(locatio
/// Configurations for provisioning the cluster with HTTP proxy servers.
/// Security profile for the managed cluster.
/// Storage profile for the managed cluster.
+ /// Ingress profile for the managed cluster.
/// Allow or deny public network access for AKS.
/// Workload Auto-scaler profile for the managed cluster.
- /// Azure Monitor addon profiles for monitoring the managed cluster.
+ /// Prometheus addon profile for the container service cluster.
+ /// The Safeguards profile holds all the safeguards information for a given cluster.
/// Service mesh profile for a managed cluster.
/// The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence).
+ /// Optional cluster metrics configuration.
+ /// AI toolchain operator settings that apply to the whole cluster.
+ /// Node provisioning settings that apply to the whole cluster.
+ /// Profile of the cluster bootstrap configuration.
/// Keeps track of any properties unknown to the library.
- internal ContainerServiceManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedClusterSku sku, ExtendedLocation extendedLocation, ManagedClusterIdentity clusterIdentity, string provisioningState, ContainerServicePowerState powerState, int? maxAgentPools, string kubernetesVersion, string currentKubernetesVersion, string dnsPrefix, string fqdnSubdomain, string fqdn, string privateFqdn, string azurePortalFqdn, IList agentPoolProfiles, ContainerServiceLinuxProfile linuxProfile, ManagedClusterWindowsProfile windowsProfile, ManagedClusterServicePrincipalProfile servicePrincipalProfile, IDictionary addonProfiles, ManagedClusterPodIdentityProfile podIdentityProfile, ManagedClusterOidcIssuerProfile oidcIssuerProfile, string nodeResourceGroup, bool? enableRbac, KubernetesSupportPlan? supportPlan, bool? enablePodSecurityPolicy, ContainerServiceNetworkProfile networkProfile, ManagedClusterAadProfile aadProfile, ManagedClusterAutoUpgradeProfile autoUpgradeProfile, ClusterUpgradeSettings upgradeSettings, ManagedClusterAutoScalerProfile autoScalerProfile, ManagedClusterApiServerAccessProfile apiServerAccessProfile, ResourceIdentifier diskEncryptionSetId, IDictionary identityProfile, IList privateLinkResources, bool? disableLocalAccounts, ManagedClusterHttpProxyConfig httpProxyConfig, ManagedClusterSecurityProfile securityProfile, ManagedClusterStorageProfile storageProfile, ContainerServicePublicNetworkAccess? publicNetworkAccess, ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile, ManagedClusterAzureMonitorProfile azureMonitorProfile, ServiceMeshProfile serviceMeshProfile, ResourceIdentifier resourceId, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
+ internal ContainerServiceManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? eTag, ManagedClusterSku sku, ExtendedLocation extendedLocation, ManagedClusterIdentity clusterIdentity, string kind, string provisioningState, ContainerServicePowerState powerState, ContainerServiceCreationData creationData, int? maxAgentPools, string kubernetesVersion, string currentKubernetesVersion, string dnsPrefix, string fqdnSubdomain, string fqdn, string privateFqdn, string azurePortalFqdn, IList agentPoolProfiles, ContainerServiceLinuxProfile linuxProfile, ManagedClusterWindowsProfile windowsProfile, ManagedClusterServicePrincipalProfile servicePrincipalProfile, IDictionary addonProfiles, ManagedClusterPodIdentityProfile podIdentityProfile, ManagedClusterOidcIssuerProfile oidcIssuerProfile, string nodeResourceGroup, ManagedClusterNodeResourceGroupProfile nodeResourceGroupProfile, bool? enableRbac, KubernetesSupportPlan? supportPlan, bool? enablePodSecurityPolicy, bool? enableNamespaceResources, ContainerServiceNetworkProfile networkProfile, ManagedClusterAadProfile aadProfile, ManagedClusterAutoUpgradeProfile autoUpgradeProfile, ClusterUpgradeSettings upgradeSettings, ManagedClusterAutoScalerProfile autoScalerProfile, ManagedClusterApiServerAccessProfile apiServerAccessProfile, ResourceIdentifier diskEncryptionSetId, IDictionary identityProfile, IList privateLinkResources, bool? disableLocalAccounts, ManagedClusterHttpProxyConfig httpProxyConfig, ManagedClusterSecurityProfile securityProfile, ManagedClusterStorageProfile storageProfile, ManagedClusterIngressProfile ingressProfile, ContainerServicePublicNetworkAccess? publicNetworkAccess, ManagedClusterWorkloadAutoScalerProfile workloadAutoScalerProfile, ManagedClusterAzureMonitorProfile azureMonitorProfile, SafeguardsProfile safeguardsProfile, ServiceMeshProfile serviceMeshProfile, ResourceIdentifier resourceId, ManagedClusterMetricsProfile metricsProfile, ManagedClusterAIToolchainOperatorProfile aiToolchainOperatorProfile, ManagedClusterNodeProvisioningProfile nodeProvisioningProfile, ManagedClusterBootstrapProfile bootstrapProfile, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
{
+ ETag = eTag;
Sku = sku;
ExtendedLocation = extendedLocation;
ClusterIdentity = clusterIdentity;
+ Kind = kind;
ProvisioningState = provisioningState;
PowerState = powerState;
+ CreationData = creationData;
MaxAgentPools = maxAgentPools;
KubernetesVersion = kubernetesVersion;
CurrentKubernetesVersion = currentKubernetesVersion;
@@ -135,9 +149,11 @@ internal ContainerServiceManagedClusterData(ResourceIdentifier id, string name,
PodIdentityProfile = podIdentityProfile;
OidcIssuerProfile = oidcIssuerProfile;
NodeResourceGroup = nodeResourceGroup;
+ NodeResourceGroupProfile = nodeResourceGroupProfile;
EnableRbac = enableRbac;
SupportPlan = supportPlan;
EnablePodSecurityPolicy = enablePodSecurityPolicy;
+ EnableNamespaceResources = enableNamespaceResources;
NetworkProfile = networkProfile;
AadProfile = aadProfile;
AutoUpgradeProfile = autoUpgradeProfile;
@@ -151,11 +167,17 @@ internal ContainerServiceManagedClusterData(ResourceIdentifier id, string name,
HttpProxyConfig = httpProxyConfig;
SecurityProfile = securityProfile;
StorageProfile = storageProfile;
+ IngressProfile = ingressProfile;
PublicNetworkAccess = publicNetworkAccess;
WorkloadAutoScalerProfile = workloadAutoScalerProfile;
AzureMonitorProfile = azureMonitorProfile;
+ SafeguardsProfile = safeguardsProfile;
ServiceMeshProfile = serviceMeshProfile;
ResourceId = resourceId;
+ MetricsProfile = metricsProfile;
+ AiToolchainOperatorProfile = aiToolchainOperatorProfile;
+ NodeProvisioningProfile = nodeProvisioningProfile;
+ BootstrapProfile = bootstrapProfile;
_serializedAdditionalRawData = serializedAdditionalRawData;
}
@@ -164,12 +186,16 @@ internal ContainerServiceManagedClusterData()
{
}
+ /// Unique read-only string used to implement optimistic concurrency. The eTag value will change when the resource is updated. Specify an if-match or if-none-match header with the eTag value for a subsequent request to enable optimistic concurrency per the normal etag convention.
+ public ETag? ETag { get; }
/// The managed cluster SKU.
public ManagedClusterSku Sku { get; set; }
/// The extended location of the Virtual Machine.
public ExtendedLocation ExtendedLocation { get; set; }
/// The identity of the managed cluster, if configured.
public ManagedClusterIdentity ClusterIdentity { get; set; }
+ /// This is primarily used to expose different UI experiences in the portal for different kinds.
+ public string Kind { get; set; }
/// The current provisioning state.
public string ProvisioningState { get; }
/// The Power State of the cluster.
@@ -180,11 +206,25 @@ public ContainerServiceStateCode? PowerStateCode
get => PowerState?.Code;
}
+ /// CreationData to be used to specify the source Snapshot ID if the cluster will be created/upgraded using a snapshot.
+ internal ContainerServiceCreationData CreationData { get; set; }
+ /// This is the ARM ID of the source object to be used to create the target object.
+ public ResourceIdentifier CreationDataSourceResourceId
+ {
+ get => CreationData is null ? default : CreationData.SourceResourceId;
+ set
+ {
+ if (CreationData is null)
+ CreationData = new ContainerServiceCreationData();
+ CreationData.SourceResourceId = value;
+ }
+ }
+
/// The max number of agent pools for the managed cluster.
public int? MaxAgentPools { get; }
- /// 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.
+ /// 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.
public string KubernetesVersion { get; set; }
- /// 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.
+ /// The version of Kubernetes the Managed Cluster is running.
public string CurrentKubernetesVersion { get; }
/// This cannot be updated once the Managed Cluster has been created.
public string DnsPrefix { get; set; }
@@ -212,12 +252,28 @@ public ContainerServiceStateCode? PowerStateCode
public ManagedClusterOidcIssuerProfile OidcIssuerProfile { get; set; }
/// The name of the resource group containing agent pool nodes.
public string NodeResourceGroup { get; set; }
+ /// The node resource group configuration profile.
+ internal ManagedClusterNodeResourceGroupProfile NodeResourceGroupProfile { get; set; }
+ /// The restriction level applied to the cluster's node resource group.
+ public RestrictionLevel? NodeResourceGroupRestrictionLevel
+ {
+ get => NodeResourceGroupProfile is null ? default : NodeResourceGroupProfile.RestrictionLevel;
+ set
+ {
+ if (NodeResourceGroupProfile is null)
+ NodeResourceGroupProfile = new ManagedClusterNodeResourceGroupProfile();
+ NodeResourceGroupProfile.RestrictionLevel = value;
+ }
+ }
+
/// Whether to enable Kubernetes Role-Based Access Control.
public bool? EnableRbac { get; set; }
/// The support plan for the Managed Cluster. If unspecified, the default is 'KubernetesOfficial'.
public KubernetesSupportPlan? SupportPlan { get; set; }
/// (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.
public bool? EnablePodSecurityPolicy { get; set; }
+ /// 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.
+ public bool? EnableNamespaceResources { get; set; }
/// The network configuration profile.
public ContainerServiceNetworkProfile NetworkProfile { get; set; }
/// The Azure Active Directory configuration.
@@ -256,27 +312,75 @@ public UpgradeOverrideSettings UpgradeOverrideSettings
public ManagedClusterSecurityProfile SecurityProfile { get; set; }
/// Storage profile for the managed cluster.
public ManagedClusterStorageProfile StorageProfile { get; set; }
- /// Allow or deny public network access for AKS.
- public ContainerServicePublicNetworkAccess? PublicNetworkAccess { get; set; }
- /// Workload Auto-scaler profile for the managed cluster.
- public ManagedClusterWorkloadAutoScalerProfile WorkloadAutoScalerProfile { get; set; }
- /// Azure Monitor addon profiles for monitoring the managed cluster.
- internal ManagedClusterAzureMonitorProfile AzureMonitorProfile { get; set; }
- /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus for an overview.
- public ManagedClusterMonitorProfileMetrics AzureMonitorMetrics
+ /// Ingress profile for the managed cluster.
+ internal ManagedClusterIngressProfile IngressProfile { get; set; }
+ /// Web App Routing settings for the ingress profile.
+ public ManagedClusterIngressProfileWebAppRouting IngressWebAppRouting
{
- get => AzureMonitorProfile is null ? default : AzureMonitorProfile.Metrics;
+ get => IngressProfile is null ? default : IngressProfile.WebAppRouting;
set
{
- if (AzureMonitorProfile is null)
- AzureMonitorProfile = new ManagedClusterAzureMonitorProfile();
- AzureMonitorProfile.Metrics = value;
+ if (IngressProfile is null)
+ IngressProfile = new ManagedClusterIngressProfile();
+ IngressProfile.WebAppRouting = value;
}
}
+ /// Allow or deny public network access for AKS.
+ public ContainerServicePublicNetworkAccess? PublicNetworkAccess { get; set; }
+ /// Workload Auto-scaler profile for the managed cluster.
+ public ManagedClusterWorkloadAutoScalerProfile WorkloadAutoScalerProfile { get; set; }
+ /// Prometheus addon profile for the container service cluster.
+ public ManagedClusterAzureMonitorProfile AzureMonitorProfile { get; set; }
+ /// The Safeguards profile holds all the safeguards information for a given cluster.
+ public SafeguardsProfile SafeguardsProfile { get; set; }
/// Service mesh profile for a managed cluster.
public ServiceMeshProfile ServiceMeshProfile { get; set; }
/// The resourceUID uniquely identifies ManagedClusters that reuse ARM ResourceIds (i.e: create, delete, create sequence).
public ResourceIdentifier ResourceId { get; }
+ /// Optional cluster metrics configuration.
+ internal ManagedClusterMetricsProfile MetricsProfile { get; set; }
+ /// The Managed Cluster sku.tier must be set to 'Standard' or 'Premium' to enable this feature. Enabling this will add Kubernetes Namespace and Deployment details to the Cost Analysis views in the Azure portal. If not specified, the default is false. For more information see aka.ms/aks/docs/cost-analysis.
+ public bool? CostAnalysisEnabled
+ {
+ get => MetricsProfile is null ? default : MetricsProfile.CostAnalysisEnabled;
+ set
+ {
+ if (MetricsProfile is null)
+ MetricsProfile = new ManagedClusterMetricsProfile();
+ MetricsProfile.CostAnalysisEnabled = value;
+ }
+ }
+
+ /// AI toolchain operator settings that apply to the whole cluster.
+ internal ManagedClusterAIToolchainOperatorProfile AiToolchainOperatorProfile { get; set; }
+ /// Indicates if AI toolchain operator enabled or not.
+ public bool? AiToolchainOperatorProfileEnabled
+ {
+ get => AiToolchainOperatorProfile is null ? default : AiToolchainOperatorProfile.Enabled;
+ set
+ {
+ if (AiToolchainOperatorProfile is null)
+ AiToolchainOperatorProfile = new ManagedClusterAIToolchainOperatorProfile();
+ AiToolchainOperatorProfile.Enabled = value;
+ }
+ }
+
+ /// Node provisioning settings that apply to the whole cluster.
+ internal ManagedClusterNodeProvisioningProfile NodeProvisioningProfile { get; set; }
+ /// Once the mode it set to Auto, it cannot be changed back to Manual.
+ public NodeProvisioningMode? NodeProvisioningMode
+ {
+ get => NodeProvisioningProfile is null ? default : NodeProvisioningProfile.Mode;
+ set
+ {
+ if (NodeProvisioningProfile is null)
+ NodeProvisioningProfile = new ManagedClusterNodeProvisioningProfile();
+ NodeProvisioningProfile.Mode = value;
+ }
+ }
+
+ /// Profile of the cluster bootstrap configuration.
+ public ManagedClusterBootstrapProfile BootstrapProfile { get; set; }
}
}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.cs
index 42275a18ba65..6dd7c51df176 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.cs
@@ -44,6 +44,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId,
private readonly PrivateLinkResourcesRestOperations _privateLinkResourcesRestClient;
private readonly ClientDiagnostics _resolvePrivateLinkServiceIdClientDiagnostics;
private readonly ResolvePrivateLinkServiceIdRestOperations _resolvePrivateLinkServiceIdRestClient;
+ private readonly ClientDiagnostics _operationStatusResultClientDiagnostics;
+ private readonly OperationStatusResultRestOperations _operationStatusResultRestClient;
private readonly ContainerServiceManagedClusterData _data;
/// Gets the resource type for the operations.
@@ -77,6 +79,8 @@ internal ContainerServiceManagedClusterResource(ArmClient client, ResourceIdenti
_privateLinkResourcesRestClient = new PrivateLinkResourcesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
_resolvePrivateLinkServiceIdClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", ProviderConstants.DefaultProviderNamespace, Diagnostics);
_resolvePrivateLinkServiceIdRestClient = new ResolvePrivateLinkServiceIdRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
+ _operationStatusResultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", ProviderConstants.DefaultProviderNamespace, Diagnostics);
+ _operationStatusResultRestClient = new OperationStatusResultRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
#if DEBUG
ValidateResourceId(Id);
#endif
@@ -130,7 +134,7 @@ public virtual MeshUpgradeProfileCollection GetMeshUpgradeProfiles()
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -161,7 +165,7 @@ public virtual async Task> GetMeshUpgradePr
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -199,7 +203,7 @@ public virtual ContainerServiceMaintenanceConfigurationCollection GetContainerSe
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -230,7 +234,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -268,7 +272,7 @@ public virtual ContainerServiceAgentPoolCollection GetContainerServiceAgentPools
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -299,7 +303,7 @@ public virtual async Task> GetContai
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -337,7 +341,7 @@ public virtual ContainerServicePrivateEndpointConnectionCollection GetContainerS
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -368,7 +372,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -406,7 +410,7 @@ public virtual ContainerServiceTrustedAccessRoleBindingCollection GetContainerSe
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -437,7 +441,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -455,6 +459,75 @@ public virtual Response GetCon
return GetContainerServiceTrustedAccessRoleBindings().Get(trustedAccessRoleBindingName, cancellationToken);
}
+ /// Gets a collection of LoadBalancerResources in the ContainerServiceManagedCluster.
+ /// An object representing collection of LoadBalancerResources and their operations over a LoadBalancerResource.
+ public virtual LoadBalancerCollection GetLoadBalancers()
+ {
+ return GetCachedClient(client => new LoadBalancerCollection(client, Id));
+ }
+
+ ///
+ /// Gets the specified load balancer.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the load balancer.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetLoadBalancerAsync(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ return await GetLoadBalancers().GetAsync(loadBalancerName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets the specified load balancer.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the load balancer.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetLoadBalancer(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ return GetLoadBalancers().Get(loadBalancerName, cancellationToken);
+ }
+
///
/// Gets a managed cluster.
///
@@ -468,7 +541,7 @@ public virtual Response GetCon
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -508,7 +581,7 @@ public virtual async Task> GetA
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -535,6 +608,94 @@ public virtual Response Get(Cancellation
}
}
+ ///
+ /// Deletes a managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, bool? ignorePodDisruptionBudget = null, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _containerServiceManagedClusterManagedClustersRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ignorePodDisruptionBudget, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ignorePodDisruptionBudget, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Deletes a managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// ignore-pod-disruption-budget=true to delete those pods on a node without considering Pod Disruption Budget.
+ /// The request should only proceed if an entity matches this string.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, bool? ignorePodDisruptionBudget = null, string ifMatch = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _containerServiceManagedClusterManagedClustersRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ignorePodDisruptionBudget, ifMatch, cancellationToken);
+ var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, ignorePodDisruptionBudget, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
///
/// Updates tags on a managed cluster.
///
@@ -548,7 +709,7 @@ public virtual Response Get(Cancellation
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -558,9 +719,10 @@ public virtual Response Get(Cancellation
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// Parameters supplied to the Update Managed Cluster Tags operation.
+ /// The request should only proceed if an entity matches this string.
/// The cancellation token to use.
/// is null.
- public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerServiceTagsObject containerServiceTagsObject, CancellationToken cancellationToken = default)
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, ContainerServiceTagsObject containerServiceTagsObject, string ifMatch = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject));
@@ -568,8 +730,8 @@ public virtual async Task>
scope.Start();
try
{
- var response = await _containerServiceManagedClusterManagedClustersRestClient.UpdateTagsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerServiceTagsObject, cancellationToken).ConfigureAwait(false);
- var operation = new ContainerServiceArmOperation(new ContainerServiceManagedClusterOperationSource(Client), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateUpdateTagsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerServiceTagsObject).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ var response = await _containerServiceManagedClusterManagedClustersRestClient.UpdateTagsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerServiceTagsObject, ifMatch, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(new ContainerServiceManagedClusterOperationSource(Client), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateUpdateTagsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerServiceTagsObject, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -594,7 +756,7 @@ public virtual async Task>
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -604,9 +766,10 @@ public virtual async Task>
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// Parameters supplied to the Update Managed Cluster Tags operation.
+ /// The request should only proceed if an entity matches this string.
/// The cancellation token to use.
/// is null.
- public virtual ArmOperation Update(WaitUntil waitUntil, ContainerServiceTagsObject containerServiceTagsObject, CancellationToken cancellationToken = default)
+ public virtual ArmOperation Update(WaitUntil waitUntil, ContainerServiceTagsObject containerServiceTagsObject, string ifMatch = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject));
@@ -614,8 +777,8 @@ public virtual ArmOperation Update(WaitU
scope.Start();
try
{
- var response = _containerServiceManagedClusterManagedClustersRestClient.UpdateTags(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerServiceTagsObject, cancellationToken);
- var operation = new ContainerServiceArmOperation(new ContainerServiceManagedClusterOperationSource(Client), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateUpdateTagsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerServiceTagsObject).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ var response = _containerServiceManagedClusterManagedClustersRestClient.UpdateTags(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerServiceTagsObject, ifMatch, cancellationToken);
+ var operation = new ContainerServiceArmOperation(new ContainerServiceManagedClusterOperationSource(Client), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateUpdateTagsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerServiceTagsObject, ifMatch).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletion(cancellationToken);
return operation;
@@ -640,7 +803,7 @@ public virtual ArmOperation Update(WaitU
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -679,7 +842,7 @@ public virtual async Task> GetAccessProfil
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -718,7 +881,7 @@ public virtual Response GetAccessProfile(string rol
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -757,7 +920,7 @@ public virtual async Task> GetClusterAdminCr
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -796,7 +959,7 @@ public virtual Response GetClusterAdminCredentials(st
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -836,7 +999,7 @@ public virtual async Task> GetClusterUserCre
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -876,7 +1039,7 @@ public virtual Response GetClusterUserCredentials(str
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -915,7 +1078,7 @@ public virtual async Task> GetClusterMonitor
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -954,7 +1117,7 @@ public virtual Response GetClusterMonitoringUserCrede
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1000,7 +1163,7 @@ public virtual async Task ResetServicePrincipalProfileAsync(WaitUn
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1046,7 +1209,7 @@ public virtual ArmOperation ResetServicePrincipalProfile(WaitUntil waitUntil, Ma
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1092,7 +1255,7 @@ public virtual async Task ResetAadProfileAsync(WaitUntil waitUntil
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1126,19 +1289,19 @@ public virtual ArmOperation ResetAadProfile(WaitUntil waitUntil, ManagedClusterA
}
///
- /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates.
+ /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned.
///
/// -
/// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort
///
/// -
/// Operation Id
- /// ManagedClusters_RotateClusterCertificates
+ /// ManagedClusters_AbortLatestOperation
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1148,14 +1311,14 @@ public virtual ArmOperation ResetAadProfile(WaitUntil waitUntil, ManagedClusterA
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The cancellation token to use.
- public virtual async Task RotateClusterCertificatesAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ public virtual async Task AbortLatestOperationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
{
- using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateClusterCertificates");
+ using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.AbortLatestOperation");
scope.Start();
try
{
- var response = await _containerServiceManagedClusterManagedClustersRestClient.RotateClusterCertificatesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
- var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateRotateClusterCertificatesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ var response = await _containerServiceManagedClusterManagedClustersRestClient.AbortLatestOperationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateAbortLatestOperationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -1168,19 +1331,19 @@ public virtual async Task RotateClusterCertificatesAsync(WaitUntil
}
///
- /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates.
+ /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, an error is returned.
///
/// -
/// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort
///
/// -
/// Operation Id
- /// ManagedClusters_RotateClusterCertificates
+ /// ManagedClusters_AbortLatestOperation
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1190,14 +1353,14 @@ public virtual async Task RotateClusterCertificatesAsync(WaitUntil
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The cancellation token to use.
- public virtual ArmOperation RotateClusterCertificates(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ public virtual ArmOperation AbortLatestOperation(WaitUntil waitUntil, CancellationToken cancellationToken = default)
{
- using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateClusterCertificates");
+ using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.AbortLatestOperation");
scope.Start();
try
{
- var response = _containerServiceManagedClusterManagedClustersRestClient.RotateClusterCertificates(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
- var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateRotateClusterCertificatesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
+ var response = _containerServiceManagedClusterManagedClustersRestClient.AbortLatestOperation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateAbortLatestOperationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location);
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletionResponse(cancellationToken);
return operation;
@@ -1210,19 +1373,19 @@ public virtual ArmOperation RotateClusterCertificates(WaitUntil waitUntil, Cance
}
///
- /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned.
+ /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates.
///
/// -
/// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates
///
/// -
/// Operation Id
- /// ManagedClusters_AbortLatestOperation
+ /// ManagedClusters_RotateClusterCertificates
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1232,14 +1395,14 @@ public virtual ArmOperation RotateClusterCertificates(WaitUntil waitUntil, Cance
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The cancellation token to use.
- public virtual async Task AbortLatestOperationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ public virtual async Task RotateClusterCertificatesAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
{
- using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.AbortLatestOperation");
+ using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateClusterCertificates");
scope.Start();
try
{
- var response = await _containerServiceManagedClusterManagedClustersRestClient.AbortLatestOperationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
- var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateAbortLatestOperationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location);
+ var response = await _containerServiceManagedClusterManagedClustersRestClient.RotateClusterCertificatesAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateRotateClusterCertificatesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
if (waitUntil == WaitUntil.Completed)
await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
return operation;
@@ -1252,19 +1415,19 @@ public virtual async Task AbortLatestOperationAsync(WaitUntil wait
}
///
- /// Aborts the currently running operation on the managed cluster. The Managed Cluster will be moved to a Canceling state and eventually to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error code is returned.
+ /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates.
///
/// -
/// Request Path
- /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates
///
/// -
/// Operation Id
- /// ManagedClusters_AbortLatestOperation
+ /// ManagedClusters_RotateClusterCertificates
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1274,14 +1437,14 @@ public virtual async Task AbortLatestOperationAsync(WaitUntil wait
///
/// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
/// The cancellation token to use.
- public virtual ArmOperation AbortLatestOperation(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ public virtual ArmOperation RotateClusterCertificates(WaitUntil waitUntil, CancellationToken cancellationToken = default)
{
- using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.AbortLatestOperation");
+ using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateClusterCertificates");
scope.Start();
try
{
- var response = _containerServiceManagedClusterManagedClustersRestClient.AbortLatestOperation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
- var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateAbortLatestOperationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location);
+ var response = _containerServiceManagedClusterManagedClustersRestClient.RotateClusterCertificates(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateRotateClusterCertificatesRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location, apiVersionOverrideValue: "2017-08-31");
if (waitUntil == WaitUntil.Completed)
operation.WaitForCompletionResponse(cancellationToken);
return operation;
@@ -1306,7 +1469,7 @@ public virtual ArmOperation AbortLatestOperation(WaitUntil waitUntil, Cancellati
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1348,7 +1511,7 @@ public virtual async Task RotateServiceAccountSigningKeysAsync(Wai
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1390,7 +1553,7 @@ public virtual ArmOperation RotateServiceAccountSigningKeys(WaitUntil waitUntil,
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1432,7 +1595,7 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1474,7 +1637,7 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1516,7 +1679,7 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1558,7 +1721,7 @@ public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancell
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1604,7 +1767,7 @@ public virtual async Task> RunComma
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1650,7 +1813,7 @@ public virtual ArmOperation RunCommand(WaitUntil
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -1689,7 +1852,7 @@ public virtual async Task> GetCommandRe
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -1728,7 +1891,7 @@ public virtual Response GetCommandResult(string
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1758,7 +1921,7 @@ public virtual AsyncPageable GetOut
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -1775,6 +1938,98 @@ public virtual Pageable GetOutbound
return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ContainerServiceOutboundEnvironmentEndpoint.DeserializeContainerServiceOutboundEnvironmentEndpoint(e), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, "ContainerServiceManagedClusterResource.GetOutboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken);
}
+ ///
+ /// Rebalance nodes across specific load balancers.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_RebalanceLoadBalancers
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The names of the load balancers to be rebalanced. If set to empty, all load balancers will be rebalanced.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task RebalanceLoadBalancersAsync(WaitUntil waitUntil, RebalanceLoadBalancersRequestBody rebalanceLoadBalancersRequestBody, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(rebalanceLoadBalancersRequestBody, nameof(rebalanceLoadBalancersRequestBody));
+
+ using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RebalanceLoadBalancers");
+ scope.Start();
+ try
+ {
+ var response = await _containerServiceManagedClusterManagedClustersRestClient.RebalanceLoadBalancersAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, rebalanceLoadBalancersRequestBody, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateRebalanceLoadBalancersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, rebalanceLoadBalancersRequestBody).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Rebalance nodes across specific load balancers.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rebalanceLoadBalancers
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_RebalanceLoadBalancers
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The names of the load balancers to be rebalanced. If set to empty, all load balancers will be rebalanced.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation RebalanceLoadBalancers(WaitUntil waitUntil, RebalanceLoadBalancersRequestBody rebalanceLoadBalancersRequestBody, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(rebalanceLoadBalancersRequestBody, nameof(rebalanceLoadBalancersRequestBody));
+
+ using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RebalanceLoadBalancers");
+ scope.Start();
+ try
+ {
+ var response = _containerServiceManagedClusterManagedClustersRestClient.RebalanceLoadBalancers(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, rebalanceLoadBalancersRequestBody, cancellationToken);
+ var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateRebalanceLoadBalancersRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, rebalanceLoadBalancersRequestBody).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
///
/// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle.
///
@@ -1788,7 +2043,7 @@ public virtual Pageable GetOutbound
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -1822,7 +2077,7 @@ public virtual async Task> GetAvailableAgen
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -1856,7 +2111,7 @@ public virtual Response GetAvailableAgentPoolVersion
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -1881,7 +2136,7 @@ public virtual AsyncPageable GetPrivate
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -1906,7 +2161,7 @@ public virtual Pageable GetPrivateLinkR
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -1944,7 +2199,7 @@ public virtual async Task> Res
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -1969,6 +2224,136 @@ public virtual Response ResolvePrivateL
}
}
+ ///
+ /// Gets a list of operations in the specified managedCluster
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations
+ ///
+ /// -
+ /// Operation Id
+ /// OperationStatusResult_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetOperationStatusResultsAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _operationStatusResultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _operationStatusResultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => OperationStatusResult.DeserializeOperationStatusResult(e), _operationStatusResultClientDiagnostics, Pipeline, "ContainerServiceManagedClusterResource.GetOperationStatusResults", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Gets a list of operations in the specified managedCluster
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations
+ ///
+ /// -
+ /// Operation Id
+ /// OperationStatusResult_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetOperationStatusResults(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _operationStatusResultRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _operationStatusResultRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => OperationStatusResult.DeserializeOperationStatusResult(e), _operationStatusResultClientDiagnostics, Pipeline, "ContainerServiceManagedClusterResource.GetOperationStatusResults", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Get the status of a specific operation in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}
+ ///
+ /// -
+ /// Operation Id
+ /// OperationStatusResult_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ ///
+ ///
+ /// The ID of an ongoing async operation.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetOperationStatusResultAsync(string operationId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(operationId, nameof(operationId));
+
+ using var scope = _operationStatusResultClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetOperationStatusResult");
+ scope.Start();
+ try
+ {
+ var response = await _operationStatusResultRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken).ConfigureAwait(false);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get the status of a specific operation in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/operations/{operationId}
+ ///
+ /// -
+ /// Operation Id
+ /// OperationStatusResult_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ ///
+ ///
+ /// The ID of an ongoing async operation.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response GetOperationStatusResult(string operationId, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(operationId, nameof(operationId));
+
+ using var scope = _operationStatusResultClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetOperationStatusResult");
+ scope.Start();
+ try
+ {
+ var response = _operationStatusResultRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, operationId, cancellationToken);
+ return response;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
///
/// Add a tag to the current resource.
///
@@ -1982,7 +2367,7 @@ public virtual Response ResolvePrivateL
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -2044,7 +2429,7 @@ public virtual async Task> AddT
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -2106,7 +2491,7 @@ public virtual Response AddTag(string ke
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -2163,7 +2548,7 @@ public virtual async Task> SetT
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -2220,7 +2605,7 @@ public virtual Response SetTags(IDiction
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -2280,7 +2665,7 @@ public virtual async Task> Remo
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionCollection.cs
index e42d1a48311f..e42dc96ac9e0 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionCollection.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionCollection.cs
@@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -115,7 +115,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -166,7 +166,7 @@ public virtual ArmOperation C
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -211,7 +211,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -256,7 +256,7 @@ public virtual Response Get(s
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -285,7 +285,7 @@ public virtual AsyncPageable
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -314,7 +314,7 @@ public virtual Pageable GetAl
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -400,7 +400,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -445,7 +445,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionResource.cs
index 58ad6fe51598..4f2ef7df43be 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServicePrivateEndpointConnectionResource.cs
@@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -141,7 +141,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -181,7 +181,7 @@ public virtual Response Get(C
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -313,7 +313,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingCollection.cs
index 53b1a5b4fea4..7381e95fe7fe 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingCollection.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingCollection.cs
@@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -113,7 +113,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -162,7 +162,7 @@ public virtual ArmOperation Cr
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -207,7 +207,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -252,7 +252,7 @@ public virtual Response Get(st
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -282,7 +282,7 @@ public virtual AsyncPageable G
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -312,7 +312,7 @@ public virtual Pageable GetAll
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string trustedAccessRoleBi
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -398,7 +398,7 @@ public virtual Response Exists(string trustedAccessRoleBindingName, Cancel
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -443,7 +443,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingResource.cs
index c31d699ddd30..c25f09e93be5 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceTrustedAccessRoleBindingResource.cs
@@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -141,7 +141,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -181,7 +181,7 @@ public virtual Response Get(Ca
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -311,7 +311,7 @@ public virtual async Task
///
-
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/ContainerServiceExtensions.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/ContainerServiceExtensions.cs
index 9d4c114d8c6b..bb320cbf57b4 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/ContainerServiceExtensions.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/ContainerServiceExtensions.cs
@@ -90,6 +90,44 @@ public static ContainerServiceManagedClusterResource GetContainerServiceManagedC
return GetMockableContainerServiceArmClient(client).GetContainerServiceManagedClusterResource(id);
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
-
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static GuardrailsAvailableVersionResource GetGuardrailsAvailableVersionResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerServiceArmClient(client).GetGuardrailsAvailableVersionResource(id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static SafeguardsAvailableVersionResource GetSafeguardsAvailableVersionResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerServiceArmClient(client).GetSafeguardsAvailableVersionResource(id);
+ }
+
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// You can use to create a from its components.
@@ -185,6 +223,25 @@ public static AgentPoolUpgradeProfileResource GetAgentPoolUpgradeProfileResource
return GetMockableContainerServiceArmClient(client).GetAgentPoolUpgradeProfileResource(id);
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static MachineResource GetMachineResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerServiceArmClient(client).GetMachineResource(id);
+ }
+
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// You can use to create a from its components.
@@ -223,6 +280,25 @@ public static AgentPoolSnapshotResource GetAgentPoolSnapshotResource(this ArmCli
return GetMockableContainerServiceArmClient(client).GetAgentPoolSnapshotResource(id);
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static ManagedClusterSnapshotResource GetManagedClusterSnapshotResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerServiceArmClient(client).GetManagedClusterSnapshotResource(id);
+ }
+
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// You can use to create a from its components.
@@ -242,6 +318,25 @@ public static ContainerServiceTrustedAccessRoleBindingResource GetContainerServi
return GetMockableContainerServiceArmClient(client).GetContainerServiceTrustedAccessRoleBindingResource(id);
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The resource ID of the resource to get.
+ /// is null.
+ /// Returns a object.
+ public static LoadBalancerResource GetLoadBalancerResource(this ArmClient client, ResourceIdentifier id)
+ {
+ Argument.AssertNotNull(client, nameof(client));
+
+ return GetMockableContainerServiceArmClient(client).GetLoadBalancerResource(id);
+ }
+
///
/// Gets a collection of ContainerServiceManagedClusterResources in the ResourceGroupResource.
/// -
@@ -272,7 +367,7 @@ public static ContainerServiceManagedClusterCollection GetContainerServiceManage
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -310,7 +405,7 @@ public static async Task> GetCo
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -365,7 +460,7 @@ public static AgentPoolSnapshotCollection GetAgentPoolSnapshots(this ResourceGro
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -403,7 +498,7 @@ public static async Task> GetAgentPoolSnapsh
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -428,6 +523,291 @@ public static Response GetAgentPoolSnapshot(this Reso
return GetMockableContainerServiceResourceGroupResource(resourceGroupResource).GetAgentPoolSnapshot(resourceName, cancellationToken);
}
+ ///
+ /// Gets a collection of ManagedClusterSnapshotResources in the ResourceGroupResource.
+ ///
-
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// is null.
+ /// An object representing collection of ManagedClusterSnapshotResources and their operations over a ManagedClusterSnapshotResource.
+ public static ManagedClusterSnapshotCollection GetManagedClusterSnapshots(this ResourceGroupResource resourceGroupResource)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableContainerServiceResourceGroupResource(resourceGroupResource).GetManagedClusterSnapshots();
+ }
+
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the managed cluster resource.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetManagedClusterSnapshotAsync(this ResourceGroupResource resourceGroupResource, string resourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return await GetMockableContainerServiceResourceGroupResource(resourceGroupResource).GetManagedClusterSnapshotAsync(resourceName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the managed cluster resource.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetManagedClusterSnapshot(this ResourceGroupResource resourceGroupResource, string resourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource));
+
+ return GetMockableContainerServiceResourceGroupResource(resourceGroupResource).GetManagedClusterSnapshot(resourceName, cancellationToken);
+ }
+
+ ///
+ /// Gets a collection of GuardrailsAvailableVersionResources in the SubscriptionResource.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// is null.
+ /// An object representing collection of GuardrailsAvailableVersionResources and their operations over a GuardrailsAvailableVersionResource.
+ public static GuardrailsAvailableVersionCollection GetGuardrailsAvailableVersions(this SubscriptionResource subscriptionResource, AzureLocation location)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetGuardrailsAvailableVersions(location);
+ }
+
+ ///
+ /// Contains Guardrails version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetGuardrailsAvailableVersionAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string version, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return await GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetGuardrailsAvailableVersionAsync(location, version, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Contains Guardrails version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetGuardrailsAvailableVersion(this SubscriptionResource subscriptionResource, AzureLocation location, string version, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetGuardrailsAvailableVersion(location, version, cancellationToken);
+ }
+
+ ///
+ /// Gets a collection of SafeguardsAvailableVersionResources in the SubscriptionResource.
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// is null.
+ /// An object representing collection of SafeguardsAvailableVersionResources and their operations over a SafeguardsAvailableVersionResource.
+ public static SafeguardsAvailableVersionCollection GetSafeguardsAvailableVersions(this SubscriptionResource subscriptionResource, AzureLocation location)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetSafeguardsAvailableVersions(location);
+ }
+
+ ///
+ /// Contains Safeguards version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetSafeguardsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static async Task> GetSafeguardsAvailableVersionAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string version, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return await GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetSafeguardsAvailableVersionAsync(location, version, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Contains Safeguards version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetSafeguardsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The name of the Azure region.
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// or is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public static Response GetSafeguardsAvailableVersion(this SubscriptionResource subscriptionResource, AzureLocation location, string version, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetSafeguardsAvailableVersion(location, version, cancellationToken);
+ }
+
///
/// Gets a collection of MeshRevisionProfileResources in the SubscriptionResource.
/// -
@@ -459,7 +839,7 @@ public static MeshRevisionProfileCollection GetMeshRevisionProfiles(this Subscri
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -498,7 +878,7 @@ public static async Task> GetMeshRevisionP
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -537,7 +917,7 @@ public static Response GetMeshRevisionProfile(this
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
/// -
@@ -569,7 +949,7 @@ public static async Task> GetKubernetesVer
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
/// -
@@ -601,7 +981,7 @@ public static Response GetKubernetesVersionsManaged
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -637,7 +1017,7 @@ public static AsyncPageable GetContainer
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -673,7 +1053,7 @@ public static Pageable GetContainerServi
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -709,7 +1089,7 @@ public static AsyncPageable GetAgentPoolSnapshotsAsyn
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -732,6 +1112,78 @@ public static Pageable GetAgentPoolSnapshots(this Sub
return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetAgentPoolSnapshots(cancellationToken);
}
+ ///
+ /// Gets a list of managed cluster snapshots in the specified subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// is null.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public static AsyncPageable GetManagedClusterSnapshotsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetManagedClusterSnapshotsAsync(cancellationToken);
+ }
+
+ ///
+ /// Gets a list of managed cluster snapshots in the specified subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ /// -
+ /// Mocking
+ /// To mock this method, please mock instead.
+ ///
+ ///
+ /// The instance the method will execute against.
+ /// The cancellation token to use.
+ /// is null.
+ /// A collection of that may take multiple service requests to iterate over.
+ public static Pageable GetManagedClusterSnapshots(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource));
+
+ return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetManagedClusterSnapshots(cancellationToken);
+ }
+
///
/// List supported trusted access roles.
///
@@ -745,7 +1197,7 @@ public static Pageable GetAgentPoolSnapshots(this Sub
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
/// -
@@ -778,7 +1230,7 @@ public static AsyncPageable GetTrustedAccessR
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
/// -
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceArmClient.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceArmClient.cs
index 480506346597..f667029f887a 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceArmClient.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceArmClient.cs
@@ -70,6 +70,30 @@ public virtual ContainerServiceManagedClusterResource GetContainerServiceManaged
return new ContainerServiceManagedClusterResource(Client, id);
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual GuardrailsAvailableVersionResource GetGuardrailsAvailableVersionResource(ResourceIdentifier id)
+ {
+ GuardrailsAvailableVersionResource.ValidateResourceId(id);
+ return new GuardrailsAvailableVersionResource(Client, id);
+ }
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual SafeguardsAvailableVersionResource GetSafeguardsAvailableVersionResource(ResourceIdentifier id)
+ {
+ SafeguardsAvailableVersionResource.ValidateResourceId(id);
+ return new SafeguardsAvailableVersionResource(Client, id);
+ }
+
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// You can use to create a from its components.
@@ -130,6 +154,18 @@ public virtual AgentPoolUpgradeProfileResource GetAgentPoolUpgradeProfileResourc
return new AgentPoolUpgradeProfileResource(Client, id);
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual MachineResource GetMachineResource(ResourceIdentifier id)
+ {
+ MachineResource.ValidateResourceId(id);
+ return new MachineResource(Client, id);
+ }
+
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// You can use to create a from its components.
@@ -154,6 +190,18 @@ public virtual AgentPoolSnapshotResource GetAgentPoolSnapshotResource(ResourceId
return new AgentPoolSnapshotResource(Client, id);
}
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual ManagedClusterSnapshotResource GetManagedClusterSnapshotResource(ResourceIdentifier id)
+ {
+ ManagedClusterSnapshotResource.ValidateResourceId(id);
+ return new ManagedClusterSnapshotResource(Client, id);
+ }
+
///
/// Gets an object representing a along with the instance operations that can be performed on it but with no data.
/// You can use to create a from its components.
@@ -165,5 +213,17 @@ public virtual ContainerServiceTrustedAccessRoleBindingResource GetContainerServ
ContainerServiceTrustedAccessRoleBindingResource.ValidateResourceId(id);
return new ContainerServiceTrustedAccessRoleBindingResource(Client, id);
}
+
+ ///
+ /// Gets an object representing a along with the instance operations that can be performed on it but with no data.
+ /// You can use to create a from its components.
+ ///
+ /// The resource ID of the resource to get.
+ /// Returns a object.
+ public virtual LoadBalancerResource GetLoadBalancerResource(ResourceIdentifier id)
+ {
+ LoadBalancerResource.ValidateResourceId(id);
+ return new LoadBalancerResource(Client, id);
+ }
}
}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceResourceGroupResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceResourceGroupResource.cs
index c0fa202bd1ae..2e49dbee1eb3 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceResourceGroupResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceResourceGroupResource.cs
@@ -53,7 +53,7 @@ public virtual ContainerServiceManagedClusterCollection GetContainerServiceManag
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -84,7 +84,7 @@ public virtual async Task> GetC
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -122,7 +122,7 @@ public virtual AgentPoolSnapshotCollection GetAgentPoolSnapshots()
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -153,7 +153,7 @@ public virtual async Task> GetAgentPoolSnaps
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -170,5 +170,74 @@ public virtual Response GetAgentPoolSnapshot(string r
{
return GetAgentPoolSnapshots().Get(resourceName, cancellationToken);
}
+
+ /// Gets a collection of ManagedClusterSnapshotResources in the ResourceGroupResource.
+ /// An object representing collection of ManagedClusterSnapshotResources and their operations over a ManagedClusterSnapshotResource.
+ public virtual ManagedClusterSnapshotCollection GetManagedClusterSnapshots()
+ {
+ return GetCachedClient(client => new ManagedClusterSnapshotCollection(client, Id));
+ }
+
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetManagedClusterSnapshotAsync(string resourceName, CancellationToken cancellationToken = default)
+ {
+ return await GetManagedClusterSnapshots().GetAsync(resourceName, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetManagedClusterSnapshot(string resourceName, CancellationToken cancellationToken = default)
+ {
+ return GetManagedClusterSnapshots().Get(resourceName, cancellationToken);
+ }
}
}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceSubscriptionResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceSubscriptionResource.cs
index fadc63f13095..aee2c61193b6 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceSubscriptionResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceSubscriptionResource.cs
@@ -24,6 +24,8 @@ public partial class MockableContainerServiceSubscriptionResource : ArmResource
private ManagedClustersRestOperations _containerServiceManagedClusterManagedClustersRestClient;
private ClientDiagnostics _agentPoolSnapshotSnapshotsClientDiagnostics;
private SnapshotsRestOperations _agentPoolSnapshotSnapshotsRestClient;
+ private ClientDiagnostics _managedClusterSnapshotClientDiagnostics;
+ private ManagedClusterSnapshotsRestOperations _managedClusterSnapshotRestClient;
private ClientDiagnostics _trustedAccessRolesClientDiagnostics;
private TrustedAccessRolesRestOperations _trustedAccessRolesRestClient;
@@ -45,6 +47,8 @@ internal MockableContainerServiceSubscriptionResource(ArmClient client, Resource
private ManagedClustersRestOperations ContainerServiceManagedClusterManagedClustersRestClient => _containerServiceManagedClusterManagedClustersRestClient ??= new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ContainerServiceManagedClusterResource.ResourceType));
private ClientDiagnostics AgentPoolSnapshotSnapshotsClientDiagnostics => _agentPoolSnapshotSnapshotsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ContainerService", AgentPoolSnapshotResource.ResourceType.Namespace, Diagnostics);
private SnapshotsRestOperations AgentPoolSnapshotSnapshotsRestClient => _agentPoolSnapshotSnapshotsRestClient ??= new SnapshotsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AgentPoolSnapshotResource.ResourceType));
+ private ClientDiagnostics ManagedClusterSnapshotClientDiagnostics => _managedClusterSnapshotClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ContainerService", ManagedClusterSnapshotResource.ResourceType.Namespace, Diagnostics);
+ private ManagedClusterSnapshotsRestOperations ManagedClusterSnapshotRestClient => _managedClusterSnapshotRestClient ??= new ManagedClusterSnapshotsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ManagedClusterSnapshotResource.ResourceType));
private ClientDiagnostics TrustedAccessRolesClientDiagnostics => _trustedAccessRolesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ContainerService", ProviderConstants.DefaultProviderNamespace, Diagnostics);
private TrustedAccessRolesRestOperations TrustedAccessRolesRestClient => _trustedAccessRolesRestClient ??= new TrustedAccessRolesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint);
@@ -54,6 +58,150 @@ private string GetApiVersionOrNull(ResourceType resourceType)
return apiVersion;
}
+ /// Gets a collection of GuardrailsAvailableVersionResources in the SubscriptionResource.
+ /// The name of the Azure region.
+ /// An object representing collection of GuardrailsAvailableVersionResources and their operations over a GuardrailsAvailableVersionResource.
+ public virtual GuardrailsAvailableVersionCollection GetGuardrailsAvailableVersions(AzureLocation location)
+ {
+ return new GuardrailsAvailableVersionCollection(Client, Id, location);
+ }
+
+ ///
+ /// Contains Guardrails version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetGuardrailsAvailableVersionAsync(AzureLocation location, string version, CancellationToken cancellationToken = default)
+ {
+ return await GetGuardrailsAvailableVersions(location).GetAsync(version, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Contains Guardrails version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetGuardrailsAvailableVersion(AzureLocation location, string version, CancellationToken cancellationToken = default)
+ {
+ return GetGuardrailsAvailableVersions(location).Get(version, cancellationToken);
+ }
+
+ /// Gets a collection of SafeguardsAvailableVersionResources in the SubscriptionResource.
+ /// The name of the Azure region.
+ /// An object representing collection of SafeguardsAvailableVersionResources and their operations over a SafeguardsAvailableVersionResource.
+ public virtual SafeguardsAvailableVersionCollection GetSafeguardsAvailableVersions(AzureLocation location)
+ {
+ return new SafeguardsAvailableVersionCollection(Client, Id, location);
+ }
+
+ ///
+ /// Contains Safeguards version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetSafeguardsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual async Task> GetSafeguardsAvailableVersionAsync(AzureLocation location, string version, CancellationToken cancellationToken = default)
+ {
+ return await GetSafeguardsAvailableVersions(location).GetAsync(version, cancellationToken).ConfigureAwait(false);
+ }
+
+ ///
+ /// Contains Safeguards version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/safeguardsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetSafeguardsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the Azure region.
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ [ForwardsClientCalls]
+ public virtual Response GetSafeguardsAvailableVersion(AzureLocation location, string version, CancellationToken cancellationToken = default)
+ {
+ return GetSafeguardsAvailableVersions(location).Get(version, cancellationToken);
+ }
+
/// Gets a collection of MeshRevisionProfileResources in the SubscriptionResource.
/// The name of the Azure region.
/// An object representing collection of MeshRevisionProfileResources and their operations over a MeshRevisionProfileResource.
@@ -75,7 +223,7 @@ public virtual MeshRevisionProfileCollection GetMeshRevisionProfiles(AzureLocati
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -107,7 +255,7 @@ public virtual async Task> GetMeshRevision
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -139,7 +287,7 @@ public virtual Response GetMeshRevisionProfile(Azur
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -174,7 +322,7 @@ public virtual async Task> GetKubernetesVe
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -209,7 +357,7 @@ public virtual Response GetKubernetesVersionsManage
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -239,7 +387,7 @@ public virtual AsyncPageable GetContaine
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -269,7 +417,7 @@ public virtual Pageable GetContainerServ
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -299,7 +447,7 @@ public virtual AsyncPageable GetAgentPoolSnapshotsAsy
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -316,6 +464,66 @@ public virtual Pageable GetAgentPoolSnapshots(Cancell
return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AgentPoolSnapshotResource(Client, AgentPoolSnapshotData.DeserializeAgentPoolSnapshotData(e)), AgentPoolSnapshotSnapshotsClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetAgentPoolSnapshots", "value", "nextLink", cancellationToken);
}
+ ///
+ /// Gets a list of managed cluster snapshots in the specified subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetManagedClusterSnapshotsAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterSnapshotRestClient.CreateListRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedClusterSnapshotRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedClusterSnapshotResource(Client, ManagedClusterSnapshotData.DeserializeManagedClusterSnapshotData(e)), ManagedClusterSnapshotClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetManagedClusterSnapshots", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Gets a list of managed cluster snapshots in the specified subscription.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedclustersnapshots
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetManagedClusterSnapshots(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterSnapshotRestClient.CreateListRequest(Id.SubscriptionId);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedClusterSnapshotRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedClusterSnapshotResource(Client, ManagedClusterSnapshotData.DeserializeManagedClusterSnapshotData(e)), ManagedClusterSnapshotClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetManagedClusterSnapshots", "value", "nextLink", cancellationToken);
+ }
+
///
/// List supported trusted access roles.
///
@@ -329,7 +537,7 @@ public virtual Pageable GetAgentPoolSnapshots(Cancell
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
@@ -356,7 +564,7 @@ public virtual AsyncPageable GetTrustedAccess
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
///
///
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionCollection.cs
new file mode 100644
index 000000000000..e5ebd3c5f7ed
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionCollection.cs
@@ -0,0 +1,399 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetGuardrailsAvailableVersions method from an instance of .
+ ///
+ public partial class GuardrailsAvailableVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _guardrailsAvailableVersionManagedClustersClientDiagnostics;
+ private readonly ManagedClustersRestOperations _guardrailsAvailableVersionManagedClustersRestClient;
+ private readonly AzureLocation _location;
+
+ /// Initializes a new instance of the class for mocking.
+ protected GuardrailsAvailableVersionCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ /// The name of the Azure region.
+ internal GuardrailsAvailableVersionCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id)
+ {
+ _location = location;
+ _guardrailsAvailableVersionManagedClustersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", GuardrailsAvailableVersionResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(GuardrailsAvailableVersionResource.ResourceType, out string guardrailsAvailableVersionManagedClustersApiVersion);
+ _guardrailsAvailableVersionManagedClustersRestClient = new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, guardrailsAvailableVersionManagedClustersApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != SubscriptionResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Contains Guardrails version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string version, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(version, nameof(version));
+
+ using var scope = _guardrailsAvailableVersionManagedClustersClientDiagnostics.CreateScope("GuardrailsAvailableVersionCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _guardrailsAvailableVersionManagedClustersRestClient.GetGuardrailsVersionsAsync(Id.SubscriptionId, new AzureLocation(_location), version, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new GuardrailsAvailableVersionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Contains Guardrails version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string version, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(version, nameof(version));
+
+ using var scope = _guardrailsAvailableVersionManagedClustersClientDiagnostics.CreateScope("GuardrailsAvailableVersionCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _guardrailsAvailableVersionManagedClustersRestClient.GetGuardrailsVersions(Id.SubscriptionId, new AzureLocation(_location), version, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new GuardrailsAvailableVersionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Contains list of Guardrails version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_ListGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _guardrailsAvailableVersionManagedClustersRestClient.CreateListGuardrailsVersionsRequest(Id.SubscriptionId, new AzureLocation(_location));
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _guardrailsAvailableVersionManagedClustersRestClient.CreateListGuardrailsVersionsNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location));
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new GuardrailsAvailableVersionResource(Client, GuardrailsAvailableVersionData.DeserializeGuardrailsAvailableVersionData(e)), _guardrailsAvailableVersionManagedClustersClientDiagnostics, Pipeline, "GuardrailsAvailableVersionCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Contains list of Guardrails version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_ListGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _guardrailsAvailableVersionManagedClustersRestClient.CreateListGuardrailsVersionsRequest(Id.SubscriptionId, new AzureLocation(_location));
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _guardrailsAvailableVersionManagedClustersRestClient.CreateListGuardrailsVersionsNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location));
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new GuardrailsAvailableVersionResource(Client, GuardrailsAvailableVersionData.DeserializeGuardrailsAvailableVersionData(e)), _guardrailsAvailableVersionManagedClustersClientDiagnostics, Pipeline, "GuardrailsAvailableVersionCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string version, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(version, nameof(version));
+
+ using var scope = _guardrailsAvailableVersionManagedClustersClientDiagnostics.CreateScope("GuardrailsAvailableVersionCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _guardrailsAvailableVersionManagedClustersRestClient.GetGuardrailsVersionsAsync(Id.SubscriptionId, new AzureLocation(_location), version, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string version, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(version, nameof(version));
+
+ using var scope = _guardrailsAvailableVersionManagedClustersClientDiagnostics.CreateScope("GuardrailsAvailableVersionCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _guardrailsAvailableVersionManagedClustersRestClient.GetGuardrailsVersions(Id.SubscriptionId, new AzureLocation(_location), version, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string version, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(version, nameof(version));
+
+ using var scope = _guardrailsAvailableVersionManagedClustersClientDiagnostics.CreateScope("GuardrailsAvailableVersionCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _guardrailsAvailableVersionManagedClustersRestClient.GetGuardrailsVersionsAsync(Id.SubscriptionId, new AzureLocation(_location), version, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new GuardrailsAvailableVersionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Safeguards version.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string version, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(version, nameof(version));
+
+ using var scope = _guardrailsAvailableVersionManagedClustersClientDiagnostics.CreateScope("GuardrailsAvailableVersionCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _guardrailsAvailableVersionManagedClustersRestClient.GetGuardrailsVersions(Id.SubscriptionId, new AzureLocation(_location), version, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new GuardrailsAvailableVersionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionData.Serialization.cs
new file mode 100644
index 000000000000..2ed84da9de3a
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionData.Serialization.cs
@@ -0,0 +1,175 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.ContainerService.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ public partial class GuardrailsAvailableVersionData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(GuardrailsAvailableVersionData)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("id"u8);
+ writer.WriteStringValue(Id);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("type"u8);
+ writer.WriteStringValue(ResourceType);
+ }
+ if (options.Format != "W" && Optional.IsDefined(SystemData))
+ {
+ writer.WritePropertyName("systemData"u8);
+ JsonSerializer.Serialize(writer, SystemData);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ GuardrailsAvailableVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(GuardrailsAvailableVersionData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeGuardrailsAvailableVersionData(document.RootElement, options);
+ }
+
+ internal static GuardrailsAvailableVersionData DeserializeGuardrailsAvailableVersionData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ GuardrailsAvailableVersionsProperties properties = default;
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("properties"u8))
+ {
+ properties = GuardrailsAvailableVersionsProperties.DeserializeGuardrailsAvailableVersionsProperties(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new GuardrailsAvailableVersionData(
+ id,
+ name,
+ type,
+ systemData,
+ properties,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(GuardrailsAvailableVersionData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ GuardrailsAvailableVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeGuardrailsAvailableVersionData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(GuardrailsAvailableVersionData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionData.cs
new file mode 100644
index 000000000000..ea3993f88b62
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionData.cs
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.ContainerService.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A class representing the GuardrailsAvailableVersion data model.
+ /// Available Guardrails Version
+ ///
+ public partial class GuardrailsAvailableVersionData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// Whether the version is default or not and support info.
+ /// is null.
+ public GuardrailsAvailableVersionData(GuardrailsAvailableVersionsProperties properties)
+ {
+ Argument.AssertNotNull(properties, nameof(properties));
+
+ Properties = properties;
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Whether the version is default or not and support info.
+ /// Keeps track of any properties unknown to the library.
+ internal GuardrailsAvailableVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, GuardrailsAvailableVersionsProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal GuardrailsAvailableVersionData()
+ {
+ }
+
+ /// Whether the version is default or not and support info.
+ public GuardrailsAvailableVersionsProperties Properties { get; set; }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionResource.Serialization.cs
new file mode 100644
index 000000000000..7b29459dd565
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionResource.Serialization.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ public partial class GuardrailsAvailableVersionResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ GuardrailsAvailableVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ GuardrailsAvailableVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionResource.cs
new file mode 100644
index 000000000000..ce047eb1201e
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/GuardrailsAvailableVersionResource.cs
@@ -0,0 +1,171 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A Class representing a GuardrailsAvailableVersion along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetGuardrailsAvailableVersionResource method.
+ /// Otherwise you can get one from its parent resource using the GetGuardrailsAvailableVersion method.
+ ///
+ public partial class GuardrailsAvailableVersionResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The location.
+ /// The version.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string version)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _guardrailsAvailableVersionManagedClustersClientDiagnostics;
+ private readonly ManagedClustersRestOperations _guardrailsAvailableVersionManagedClustersRestClient;
+ private readonly GuardrailsAvailableVersionData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.ContainerService/locations/guardrailsVersions";
+
+ /// Initializes a new instance of the class for mocking.
+ protected GuardrailsAvailableVersionResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal GuardrailsAvailableVersionResource(ArmClient client, GuardrailsAvailableVersionData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal GuardrailsAvailableVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _guardrailsAvailableVersionManagedClustersClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string guardrailsAvailableVersionManagedClustersApiVersion);
+ _guardrailsAvailableVersionManagedClustersRestClient = new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, guardrailsAvailableVersionManagedClustersApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual GuardrailsAvailableVersionData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Contains Guardrails version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _guardrailsAvailableVersionManagedClustersClientDiagnostics.CreateScope("GuardrailsAvailableVersionResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _guardrailsAvailableVersionManagedClustersRestClient.GetGuardrailsVersionsAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new GuardrailsAvailableVersionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Contains Guardrails version along with its support info and whether it is a default version.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/guardrailsVersions/{version}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusters_GetGuardrailsVersions
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _guardrailsAvailableVersionManagedClustersClientDiagnostics.CreateScope("GuardrailsAvailableVersionResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _guardrailsAvailableVersionManagedClustersRestClient.GetGuardrailsVersions(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new GuardrailsAvailableVersionResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerCollection.cs
new file mode 100644
index 000000000000..8a9d0b73d36a
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerCollection.cs
@@ -0,0 +1,497 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetLoadBalancers method from an instance of .
+ ///
+ public partial class LoadBalancerCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _loadBalancerClientDiagnostics;
+ private readonly LoadBalancersRestOperations _loadBalancerRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected LoadBalancerCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal LoadBalancerCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _loadBalancerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", LoadBalancerResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(LoadBalancerResource.ResourceType, out string loadBalancerApiVersion);
+ _loadBalancerRestClient = new LoadBalancersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, loadBalancerApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ContainerServiceManagedClusterResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerServiceManagedClusterResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Creates or updates a load balancer in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the load balancer.
+ /// The load balancer to create or update.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string loadBalancerName, LoadBalancerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _loadBalancerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, loadBalancerName, data, cancellationToken).ConfigureAwait(false);
+ var uri = _loadBalancerRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, loadBalancerName, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerServiceArmOperation(Response.FromValue(new LoadBalancerResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Creates or updates a load balancer in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the load balancer.
+ /// The load balancer to create or update.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string loadBalancerName, LoadBalancerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _loadBalancerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, loadBalancerName, data, cancellationToken);
+ var uri = _loadBalancerRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, loadBalancerName, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerServiceArmOperation(Response.FromValue(new LoadBalancerResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the specified load balancer.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the load balancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _loadBalancerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, loadBalancerName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new LoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the specified load balancer.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the load balancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _loadBalancerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, loadBalancerName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new LoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a list of load balancers in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_ListByManagedCluster
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _loadBalancerRestClient.CreateListByManagedClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _loadBalancerRestClient.CreateListByManagedClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new LoadBalancerResource(Client, LoadBalancerData.DeserializeLoadBalancerData(e)), _loadBalancerClientDiagnostics, Pipeline, "LoadBalancerCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Gets a list of load balancers in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_ListByManagedCluster
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _loadBalancerRestClient.CreateListByManagedClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _loadBalancerRestClient.CreateListByManagedClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new LoadBalancerResource(Client, LoadBalancerData.DeserializeLoadBalancerData(e)), _loadBalancerClientDiagnostics, Pipeline, "LoadBalancerCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the load balancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _loadBalancerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, loadBalancerName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the load balancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _loadBalancerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, loadBalancerName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the load balancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _loadBalancerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, loadBalancerName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new LoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the load balancer.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string loadBalancerName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(loadBalancerName, nameof(loadBalancerName));
+
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _loadBalancerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, loadBalancerName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new LoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerData.Serialization.cs
new file mode 100644
index 000000000000..fbdc0ac879ec
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerData.Serialization.cs
@@ -0,0 +1,281 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.ContainerService.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ public partial class LoadBalancerData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(LoadBalancerData)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("id"u8);
+ writer.WriteStringValue(Id);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("type"u8);
+ writer.WriteStringValue(ResourceType);
+ }
+ if (options.Format != "W" && Optional.IsDefined(SystemData))
+ {
+ writer.WritePropertyName("systemData"u8);
+ JsonSerializer.Serialize(writer, SystemData);
+ }
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(NamePropertiesName))
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(NamePropertiesName);
+ }
+ if (Optional.IsDefined(PrimaryAgentPoolName))
+ {
+ writer.WritePropertyName("primaryAgentPoolName"u8);
+ writer.WriteStringValue(PrimaryAgentPoolName);
+ }
+ if (Optional.IsDefined(AllowServicePlacement))
+ {
+ writer.WritePropertyName("allowServicePlacement"u8);
+ writer.WriteBooleanValue(AllowServicePlacement.Value);
+ }
+ if (Optional.IsDefined(ServiceLabelSelector))
+ {
+ writer.WritePropertyName("serviceLabelSelector"u8);
+ writer.WriteObjectValue(ServiceLabelSelector, options);
+ }
+ if (Optional.IsDefined(ServiceNamespaceSelector))
+ {
+ writer.WritePropertyName("serviceNamespaceSelector"u8);
+ writer.WriteObjectValue(ServiceNamespaceSelector, options);
+ }
+ if (Optional.IsDefined(NodeSelector))
+ {
+ writer.WritePropertyName("nodeSelector"u8);
+ writer.WriteObjectValue(NodeSelector, options);
+ }
+ if (options.Format != "W" && Optional.IsDefined(ProvisioningState))
+ {
+ writer.WritePropertyName("provisioningState"u8);
+ writer.WriteStringValue(ProvisioningState);
+ }
+ writer.WriteEndObject();
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ LoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(LoadBalancerData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeLoadBalancerData(document.RootElement, options);
+ }
+
+ internal static LoadBalancerData DeserializeLoadBalancerData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ string name0 = default;
+ string primaryAgentPoolName = default;
+ bool? allowServicePlacement = default;
+ LabelSelector serviceLabelSelector = default;
+ LabelSelector serviceNamespaceSelector = default;
+ LabelSelector nodeSelector = default;
+ string provisioningState = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("name"u8))
+ {
+ name0 = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("primaryAgentPoolName"u8))
+ {
+ primaryAgentPoolName = property0.Value.GetString();
+ continue;
+ }
+ if (property0.NameEquals("allowServicePlacement"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ allowServicePlacement = property0.Value.GetBoolean();
+ continue;
+ }
+ if (property0.NameEquals("serviceLabelSelector"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ serviceLabelSelector = LabelSelector.DeserializeLabelSelector(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("serviceNamespaceSelector"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ serviceNamespaceSelector = LabelSelector.DeserializeLabelSelector(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("nodeSelector"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ nodeSelector = LabelSelector.DeserializeLabelSelector(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("provisioningState"u8))
+ {
+ provisioningState = property0.Value.GetString();
+ continue;
+ }
+ }
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new LoadBalancerData(
+ id,
+ name,
+ type,
+ systemData,
+ name0,
+ primaryAgentPoolName,
+ allowServicePlacement,
+ serviceLabelSelector,
+ serviceNamespaceSelector,
+ nodeSelector,
+ provisioningState,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(LoadBalancerData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ LoadBalancerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeLoadBalancerData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(LoadBalancerData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerData.cs
new file mode 100644
index 000000000000..4ac82664fd52
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerData.cs
@@ -0,0 +1,99 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.ContainerService.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A class representing the LoadBalancer data model.
+ /// The configurations regarding multiple standard load balancers. If not supplied, single load balancer mode will be used. Multiple standard load balancers mode will be used if at lease one configuration is supplied. There has to be a configuration named `kubernetes`.
+ ///
+ public partial class LoadBalancerData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public LoadBalancerData()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list.
+ /// Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer.
+ /// Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it.
+ /// Only services that must match this selector can be placed on this load balancer.
+ /// Services created in namespaces that match the selector can be placed on this load balancer.
+ /// Nodes that match this selector will be possible members of this load balancer.
+ /// The current provisioning state.
+ /// Keeps track of any properties unknown to the library.
+ internal LoadBalancerData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string namePropertiesName, string primaryAgentPoolName, bool? allowServicePlacement, LabelSelector serviceLabelSelector, LabelSelector serviceNamespaceSelector, LabelSelector nodeSelector, string provisioningState, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ NamePropertiesName = namePropertiesName;
+ PrimaryAgentPoolName = primaryAgentPoolName;
+ AllowServicePlacement = allowServicePlacement;
+ ServiceLabelSelector = serviceLabelSelector;
+ ServiceNamespaceSelector = serviceNamespaceSelector;
+ NodeSelector = nodeSelector;
+ ProvisioningState = provisioningState;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Name of the public load balancer. There will be an internal load balancer created if needed, and the name will be `<name>-internal`. The internal lb shares the same configurations as the external one. The internal lbs are not needed to be included in LoadBalancer list. There must be a name of kubernetes in the list.
+ public string NamePropertiesName { get; set; }
+ /// Required field. A string value that must specify the ID of an existing agent pool. All nodes in the given pool will always be added to this load balancer. This agent pool must have at least one node and minCount>=1 for autoscaling operations. An agent pool can only be the primary pool for a single load balancer.
+ public string PrimaryAgentPoolName { get; set; }
+ /// Whether to automatically place services on the load balancer. If not supplied, the default value is true. If set to false manually, both of the external and the internal load balancer will not be selected for services unless they explicitly target it.
+ public bool? AllowServicePlacement { get; set; }
+ /// Only services that must match this selector can be placed on this load balancer.
+ public LabelSelector ServiceLabelSelector { get; set; }
+ /// Services created in namespaces that match the selector can be placed on this load balancer.
+ public LabelSelector ServiceNamespaceSelector { get; set; }
+ /// Nodes that match this selector will be possible members of this load balancer.
+ public LabelSelector NodeSelector { get; set; }
+ /// The current provisioning state.
+ public string ProvisioningState { get; }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerResource.Serialization.cs
new file mode 100644
index 000000000000..6692212d0394
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerResource.Serialization.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ public partial class LoadBalancerResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ LoadBalancerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ LoadBalancerData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerResource.cs
new file mode 100644
index 000000000000..7f286065455d
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/LoadBalancerResource.cs
@@ -0,0 +1,351 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A Class representing a LoadBalancer along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetLoadBalancerResource method.
+ /// Otherwise you can get one from its parent resource using the GetLoadBalancer method.
+ ///
+ public partial class LoadBalancerResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The resourceName.
+ /// The loadBalancerName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName, string loadBalancerName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _loadBalancerClientDiagnostics;
+ private readonly LoadBalancersRestOperations _loadBalancerRestClient;
+ private readonly LoadBalancerData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.ContainerService/managedClusters/loadBalancers";
+
+ /// Initializes a new instance of the class for mocking.
+ protected LoadBalancerResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal LoadBalancerResource(ArmClient client, LoadBalancerData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal LoadBalancerResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _loadBalancerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string loadBalancerApiVersion);
+ _loadBalancerRestClient = new LoadBalancersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, loadBalancerApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual LoadBalancerData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Gets the specified load balancer.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _loadBalancerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new LoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets the specified load balancer.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _loadBalancerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new LoadBalancerResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Deletes a load balancer in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _loadBalancerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ var operation = new ContainerServiceArmOperation(_loadBalancerClientDiagnostics, Pipeline, _loadBalancerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Deletes a load balancer in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _loadBalancerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken);
+ var operation = new ContainerServiceArmOperation(_loadBalancerClientDiagnostics, Pipeline, _loadBalancerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Creates or updates a load balancer in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The load balancer to create or update.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(WaitUntil waitUntil, LoadBalancerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _loadBalancerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false);
+ var uri = _loadBalancerRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerServiceArmOperation(Response.FromValue(new LoadBalancerResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Creates or updates a load balancer in the specified managed cluster.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/loadBalancers/{loadBalancerName}
+ ///
+ /// -
+ /// Operation Id
+ /// LoadBalancers_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The load balancer to create or update.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual ArmOperation Update(WaitUntil waitUntil, LoadBalancerData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _loadBalancerClientDiagnostics.CreateScope("LoadBalancerResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _loadBalancerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken);
+ var uri = _loadBalancerRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerServiceArmOperation(Response.FromValue(new LoadBalancerResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineCollection.cs
new file mode 100644
index 000000000000..55811432929b
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineCollection.cs
@@ -0,0 +1,395 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetMachines method from an instance of .
+ ///
+ public partial class MachineCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _machineClientDiagnostics;
+ private readonly MachinesRestOperations _machineRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected MachineCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal MachineCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _machineClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", MachineResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(MachineResource.ResourceType, out string machineApiVersion);
+ _machineRestClient = new MachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ContainerServiceAgentPoolResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ContainerServiceAgentPoolResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get a specific machine in the specified agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// host name of the machine.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string machineName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(machineName, nameof(machineName));
+
+ using var scope = _machineClientDiagnostics.CreateScope("MachineCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _machineRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, machineName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new MachineResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a specific machine in the specified agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// host name of the machine.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string machineName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(machineName, nameof(machineName));
+
+ using var scope = _machineClientDiagnostics.CreateScope("MachineCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _machineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, machineName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new MachineResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a list of machines in the specified agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _machineRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MachineResource(Client, MachineData.DeserializeMachineData(e)), _machineClientDiagnostics, Pipeline, "MachineCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Gets a list of machines in the specified agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_List
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _machineRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _machineRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MachineResource(Client, MachineData.DeserializeMachineData(e)), _machineClientDiagnostics, Pipeline, "MachineCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// host name of the machine.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string machineName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(machineName, nameof(machineName));
+
+ using var scope = _machineClientDiagnostics.CreateScope("MachineCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _machineRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, machineName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// host name of the machine.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string machineName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(machineName, nameof(machineName));
+
+ using var scope = _machineClientDiagnostics.CreateScope("MachineCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _machineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, machineName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// host name of the machine.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string machineName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(machineName, nameof(machineName));
+
+ using var scope = _machineClientDiagnostics.CreateScope("MachineCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _machineRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, machineName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new MachineResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// host name of the machine.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string machineName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(machineName, nameof(machineName));
+
+ using var scope = _machineClientDiagnostics.CreateScope("MachineCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _machineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, machineName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new MachineResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineData.Serialization.cs
new file mode 100644
index 000000000000..0f4843e6f23d
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineData.Serialization.cs
@@ -0,0 +1,182 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.ContainerService.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ public partial class MachineData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(MachineData)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (options.Format != "W" && Optional.IsDefined(Properties))
+ {
+ writer.WritePropertyName("properties"u8);
+ writer.WriteObjectValue(Properties, options);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("id"u8);
+ writer.WriteStringValue(Id);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("type"u8);
+ writer.WriteStringValue(ResourceType);
+ }
+ if (options.Format != "W" && Optional.IsDefined(SystemData))
+ {
+ writer.WritePropertyName("systemData"u8);
+ JsonSerializer.Serialize(writer, SystemData);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ MachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(MachineData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeMachineData(document.RootElement, options);
+ }
+
+ internal static MachineData DeserializeMachineData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ MachineProperties properties = default;
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ properties = MachineProperties.DeserializeMachineProperties(property.Value, options);
+ continue;
+ }
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new MachineData(
+ id,
+ name,
+ type,
+ systemData,
+ properties,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(MachineData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ MachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeMachineData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(MachineData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineData.cs
new file mode 100644
index 000000000000..ccb8f2214034
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineData.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.ContainerService.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A class representing the Machine data model.
+ /// A machine. Contains details about the underlying virtual machine. A machine may be visible here but not in kubectl get nodes; if so it may be because the machine has not been registered with the Kubernetes API Server yet.
+ ///
+ public partial class MachineData : ResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public MachineData()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The properties of the machine.
+ /// Keeps track of any properties unknown to the library.
+ internal MachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, MachineProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData)
+ {
+ Properties = properties;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// The properties of the machine.
+ public MachineProperties Properties { get; }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineResource.Serialization.cs
new file mode 100644
index 000000000000..53a1eacdb245
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineResource.Serialization.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ public partial class MachineResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ MachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ MachineData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineResource.cs
new file mode 100644
index 000000000000..c92e26d15d45
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MachineResource.cs
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A Class representing a Machine along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetMachineResource method.
+ /// Otherwise you can get one from its parent resource using the GetMachine method.
+ ///
+ public partial class MachineResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The resourceName.
+ /// The agentPoolName.
+ /// The machineName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, string machineName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _machineClientDiagnostics;
+ private readonly MachinesRestOperations _machineRestClient;
+ private readonly MachineData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.ContainerService/managedClusters/agentPools/machines";
+
+ /// Initializes a new instance of the class for mocking.
+ protected MachineResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal MachineResource(ArmClient client, MachineData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal MachineResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _machineClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string machineApiVersion);
+ _machineRestClient = new MachinesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, machineApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual MachineData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Get a specific machine in the specified agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _machineClientDiagnostics.CreateScope("MachineResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _machineRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new MachineResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Get a specific machine in the specified agent pool.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/machines/{machineName}
+ ///
+ /// -
+ /// Operation Id
+ /// Machines_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _machineClientDiagnostics.CreateScope("MachineResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _machineRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new MachineResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotCollection.cs
new file mode 100644
index 000000000000..42fc35934ec6
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotCollection.cs
@@ -0,0 +1,498 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Autorest.CSharp.Core;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A class representing a collection of and their operations.
+ /// Each in the collection will belong to the same instance of .
+ /// To get a instance call the GetManagedClusterSnapshots method from an instance of .
+ ///
+ public partial class ManagedClusterSnapshotCollection : ArmCollection, IEnumerable, IAsyncEnumerable
+ {
+ private readonly ClientDiagnostics _managedClusterSnapshotClientDiagnostics;
+ private readonly ManagedClusterSnapshotsRestOperations _managedClusterSnapshotRestClient;
+
+ /// Initializes a new instance of the class for mocking.
+ protected ManagedClusterSnapshotCollection()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the parent resource that is the target of operations.
+ internal ManagedClusterSnapshotCollection(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _managedClusterSnapshotClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", ManagedClusterSnapshotResource.ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ManagedClusterSnapshotResource.ResourceType, out string managedClusterSnapshotApiVersion);
+ _managedClusterSnapshotRestClient = new ManagedClusterSnapshotsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedClusterSnapshotApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceGroupResource.ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id));
+ }
+
+ ///
+ /// Creates or updates a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the managed cluster resource.
+ /// The managed cluster snapshot to create or update.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceName, ManagedClusterSnapshotData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = await _managedClusterSnapshotRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data, cancellationToken).ConfigureAwait(false);
+ var uri = _managedClusterSnapshotRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerServiceArmOperation(Response.FromValue(new ManagedClusterSnapshotResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Creates or updates a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_CreateOrUpdate
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The name of the managed cluster resource.
+ /// The managed cluster snapshot to create or update.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string resourceName, ManagedClusterSnapshotData data, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
+ Argument.AssertNotNull(data, nameof(data));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotCollection.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ var response = _managedClusterSnapshotRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data, cancellationToken);
+ var uri = _managedClusterSnapshotRestClient.CreateCreateOrUpdateRequestUri(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Put, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerServiceArmOperation(Response.FromValue(new ManagedClusterSnapshotResource(Client, response), response.GetRawResponse()), rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletion(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetAsync(string resourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = await _managedClusterSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Get(string resourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotCollection.Get");
+ scope.Start();
+ try
+ {
+ var response = _managedClusterSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Lists managed cluster snapshots in the specified subscription and resource group.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_ListByResourceGroup
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// An async collection of that may take multiple service requests to iterate over.
+ public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _managedClusterSnapshotRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedClusterSnapshotRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName);
+ return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ManagedClusterSnapshotResource(Client, ManagedClusterSnapshotData.DeserializeManagedClusterSnapshotData(e)), _managedClusterSnapshotClientDiagnostics, Pipeline, "ManagedClusterSnapshotCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Lists managed cluster snapshots in the specified subscription and resource group.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_ListByResourceGroup
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ /// A collection of that may take multiple service requests to iterate over.
+ public virtual Pageable GetAll(CancellationToken cancellationToken = default)
+ {
+ HttpMessage FirstPageRequest(int? pageSizeHint) => _managedClusterSnapshotRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName);
+ HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _managedClusterSnapshotRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName);
+ return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ManagedClusterSnapshotResource(Client, ManagedClusterSnapshotData.DeserializeManagedClusterSnapshotData(e)), _managedClusterSnapshotClientDiagnostics, Pipeline, "ManagedClusterSnapshotCollection.GetAll", "value", "nextLink", cancellationToken);
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> ExistsAsync(string resourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = await _managedClusterSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Checks to see if the resource exists in azure.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual Response Exists(string resourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotCollection.Exists");
+ scope.Start();
+ try
+ {
+ var response = _managedClusterSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken: cancellationToken);
+ return Response.FromValue(response.Value != null, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual async Task> GetIfExistsAsync(string resourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = await _managedClusterSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken: cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Tries to get details for this resource from the service.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The name of the managed cluster resource.
+ /// The cancellation token to use.
+ /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ public virtual NullableResponse GetIfExists(string resourceName, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotCollection.GetIfExists");
+ scope.Start();
+ try
+ {
+ var response = _managedClusterSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken: cancellationToken);
+ if (response.Value == null)
+ return new NoValueResponse(response.GetRawResponse());
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetAll().GetEnumerator();
+ }
+
+ IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
+ {
+ return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken);
+ }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotData.Serialization.cs
new file mode 100644
index 000000000000..8f0f9ceb4e31
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotData.Serialization.cs
@@ -0,0 +1,265 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+using Azure.ResourceManager.ContainerService.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ public partial class ManagedClusterSnapshotData : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ManagedClusterSnapshotData)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (Optional.IsCollectionDefined(Tags))
+ {
+ writer.WritePropertyName("tags"u8);
+ writer.WriteStartObject();
+ foreach (var item in Tags)
+ {
+ writer.WritePropertyName(item.Key);
+ writer.WriteStringValue(item.Value);
+ }
+ writer.WriteEndObject();
+ }
+ writer.WritePropertyName("location"u8);
+ writer.WriteStringValue(Location);
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("id"u8);
+ writer.WriteStringValue(Id);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("name"u8);
+ writer.WriteStringValue(Name);
+ }
+ if (options.Format != "W")
+ {
+ writer.WritePropertyName("type"u8);
+ writer.WriteStringValue(ResourceType);
+ }
+ if (options.Format != "W" && Optional.IsDefined(SystemData))
+ {
+ writer.WritePropertyName("systemData"u8);
+ JsonSerializer.Serialize(writer, SystemData);
+ }
+ writer.WritePropertyName("properties"u8);
+ writer.WriteStartObject();
+ if (Optional.IsDefined(CreationData))
+ {
+ writer.WritePropertyName("creationData"u8);
+ writer.WriteObjectValue(CreationData, options);
+ }
+ if (Optional.IsDefined(SnapshotType))
+ {
+ writer.WritePropertyName("snapshotType"u8);
+ writer.WriteStringValue(SnapshotType.Value.ToString());
+ }
+ if (options.Format != "W" && Optional.IsDefined(ManagedClusterPropertiesReadOnly))
+ {
+ writer.WritePropertyName("managedClusterPropertiesReadOnly"u8);
+ writer.WriteObjectValue(ManagedClusterPropertiesReadOnly, options);
+ }
+ writer.WriteEndObject();
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ ManagedClusterSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(ManagedClusterSnapshotData)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeManagedClusterSnapshotData(document.RootElement, options);
+ }
+
+ internal static ManagedClusterSnapshotData DeserializeManagedClusterSnapshotData(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ IDictionary tags = default;
+ AzureLocation location = default;
+ ResourceIdentifier id = default;
+ string name = default;
+ ResourceType type = default;
+ SystemData systemData = default;
+ ContainerServiceCreationData creationData = default;
+ SnapshotType? snapshotType = default;
+ ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("tags"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ Dictionary dictionary = new Dictionary();
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ dictionary.Add(property0.Name, property0.Value.GetString());
+ }
+ tags = dictionary;
+ continue;
+ }
+ if (property.NameEquals("location"u8))
+ {
+ location = new AzureLocation(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("id"u8))
+ {
+ id = new ResourceIdentifier(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("name"u8))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"u8))
+ {
+ type = new ResourceType(property.Value.GetString());
+ continue;
+ }
+ if (property.NameEquals("systemData"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ systemData = JsonSerializer.Deserialize(property.Value.GetRawText());
+ continue;
+ }
+ if (property.NameEquals("properties"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ foreach (var property0 in property.Value.EnumerateObject())
+ {
+ if (property0.NameEquals("creationData"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ creationData = ContainerServiceCreationData.DeserializeContainerServiceCreationData(property0.Value, options);
+ continue;
+ }
+ if (property0.NameEquals("snapshotType"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ snapshotType = new SnapshotType(property0.Value.GetString());
+ continue;
+ }
+ if (property0.NameEquals("managedClusterPropertiesReadOnly"u8))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ managedClusterPropertiesReadOnly = ManagedClusterPropertiesForSnapshot.DeserializeManagedClusterPropertiesForSnapshot(property0.Value, options);
+ continue;
+ }
+ }
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new ManagedClusterSnapshotData(
+ id,
+ name,
+ type,
+ systemData,
+ tags ?? new ChangeTrackingDictionary(),
+ location,
+ creationData,
+ snapshotType,
+ managedClusterPropertiesReadOnly,
+ serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(ManagedClusterSnapshotData)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ ManagedClusterSnapshotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeManagedClusterSnapshotData(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(ManagedClusterSnapshotData)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotData.cs
new file mode 100644
index 000000000000..4223ab528401
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotData.cs
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using Azure.Core;
+using Azure.ResourceManager.ContainerService.Models;
+using Azure.ResourceManager.Models;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A class representing the ManagedClusterSnapshot data model.
+ /// A managed cluster snapshot resource.
+ ///
+ public partial class ManagedClusterSnapshotData : TrackedResourceData
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ /// The location.
+ public ManagedClusterSnapshotData(AzureLocation location) : base(location)
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// The id.
+ /// The name.
+ /// The resourceType.
+ /// The systemData.
+ /// The tags.
+ /// The location.
+ /// CreationData to be used to specify the source resource ID to create this snapshot.
+ /// The type of a snapshot. The default is NodePool.
+ /// What the properties will be showed when getting managed cluster snapshot. Those properties are read-only.
+ /// Keeps track of any properties unknown to the library.
+ internal ManagedClusterSnapshotData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerServiceCreationData creationData, SnapshotType? snapshotType, ManagedClusterPropertiesForSnapshot managedClusterPropertiesReadOnly, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location)
+ {
+ CreationData = creationData;
+ SnapshotType = snapshotType;
+ ManagedClusterPropertiesReadOnly = managedClusterPropertiesReadOnly;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Initializes a new instance of for deserialization.
+ internal ManagedClusterSnapshotData()
+ {
+ }
+
+ /// CreationData to be used to specify the source resource ID to create this snapshot.
+ internal ContainerServiceCreationData CreationData { get; set; }
+ /// This is the ARM ID of the source object to be used to create the target object.
+ public ResourceIdentifier CreationDataSourceResourceId
+ {
+ get => CreationData is null ? default : CreationData.SourceResourceId;
+ set
+ {
+ if (CreationData is null)
+ CreationData = new ContainerServiceCreationData();
+ CreationData.SourceResourceId = value;
+ }
+ }
+
+ /// The type of a snapshot. The default is NodePool.
+ public SnapshotType? SnapshotType { get; set; }
+ /// What the properties will be showed when getting managed cluster snapshot. Those properties are read-only.
+ public ManagedClusterPropertiesForSnapshot ManagedClusterPropertiesReadOnly { get; }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotResource.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotResource.Serialization.cs
new file mode 100644
index 000000000000..6dd6c1238cc0
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotResource.Serialization.cs
@@ -0,0 +1,26 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Text.Json;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ public partial class ManagedClusterSnapshotResource : IJsonModel
+ {
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options);
+
+ ManagedClusterSnapshotData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options);
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options);
+
+ ManagedClusterSnapshotData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options);
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options);
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotResource.cs
new file mode 100644
index 000000000000..84128f161c2d
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterSnapshotResource.cs
@@ -0,0 +1,703 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.ContainerService.Models;
+using Azure.ResourceManager.Resources;
+
+namespace Azure.ResourceManager.ContainerService
+{
+ ///
+ /// A Class representing a ManagedClusterSnapshot along with the instance operations that can be performed on it.
+ /// If you have a you can construct a
+ /// from an instance of using the GetManagedClusterSnapshotResource method.
+ /// Otherwise you can get one from its parent resource using the GetManagedClusterSnapshot method.
+ ///
+ public partial class ManagedClusterSnapshotResource : ArmResource
+ {
+ /// Generate the resource identifier of a instance.
+ /// The subscriptionId.
+ /// The resourceGroupName.
+ /// The resourceName.
+ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName)
+ {
+ var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}";
+ return new ResourceIdentifier(resourceId);
+ }
+
+ private readonly ClientDiagnostics _managedClusterSnapshotClientDiagnostics;
+ private readonly ManagedClusterSnapshotsRestOperations _managedClusterSnapshotRestClient;
+ private readonly ManagedClusterSnapshotData _data;
+
+ /// Gets the resource type for the operations.
+ public static readonly ResourceType ResourceType = "Microsoft.ContainerService/managedclustersnapshots";
+
+ /// Initializes a new instance of the class for mocking.
+ protected ManagedClusterSnapshotResource()
+ {
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The resource that is the target of operations.
+ internal ManagedClusterSnapshotResource(ArmClient client, ManagedClusterSnapshotData data) : this(client, data.Id)
+ {
+ HasData = true;
+ _data = data;
+ }
+
+ /// Initializes a new instance of the class.
+ /// The client parameters to use in these operations.
+ /// The identifier of the resource that is the target of operations.
+ internal ManagedClusterSnapshotResource(ArmClient client, ResourceIdentifier id) : base(client, id)
+ {
+ _managedClusterSnapshotClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ContainerService", ResourceType.Namespace, Diagnostics);
+ TryGetApiVersion(ResourceType, out string managedClusterSnapshotApiVersion);
+ _managedClusterSnapshotRestClient = new ManagedClusterSnapshotsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, managedClusterSnapshotApiVersion);
+#if DEBUG
+ ValidateResourceId(Id);
+#endif
+ }
+
+ /// Gets whether or not the current instance has data.
+ public virtual bool HasData { get; }
+
+ /// Gets the data representing this Feature.
+ /// Throws if there is no data loaded in the current instance.
+ public virtual ManagedClusterSnapshotData Data
+ {
+ get
+ {
+ if (!HasData)
+ throw new InvalidOperationException("The current instance does not have data, you must call Get first.");
+ return _data;
+ }
+ }
+
+ internal static void ValidateResourceId(ResourceIdentifier id)
+ {
+ if (id.ResourceType != ResourceType)
+ throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id));
+ }
+
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(CancellationToken cancellationToken = default)
+ {
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.Get");
+ scope.Start();
+ try
+ {
+ var response = await _managedClusterSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Gets a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The cancellation token to use.
+ public virtual Response Get(CancellationToken cancellationToken = default)
+ {
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.Get");
+ scope.Start();
+ try
+ {
+ var response = _managedClusterSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ if (response.Value == null)
+ throw new RequestFailedException(response.GetRawResponse());
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Deletes a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = await _managedClusterSnapshotRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ var uri = _managedClusterSnapshotRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerServiceArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Deletes a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Delete
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.
+ /// The cancellation token to use.
+ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default)
+ {
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.Delete");
+ scope.Start();
+ try
+ {
+ var response = _managedClusterSnapshotRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ var uri = _managedClusterSnapshotRestClient.CreateDeleteRequestUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
+ var rehydrationToken = NextLinkOperationImplementation.GetRehydrationToken(RequestMethod.Delete, uri.ToUri(), uri.ToString(), "None", null, OperationFinalStateVia.OriginalUri.ToString());
+ var operation = new ContainerServiceArmOperation(response, rehydrationToken);
+ if (waitUntil == WaitUntil.Completed)
+ operation.WaitForCompletionResponse(cancellationToken);
+ return operation;
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Updates tags on a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_UpdateTags
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Parameters supplied to the Update managed cluster snapshot Tags operation.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UpdateAsync(ContainerServiceTagsObject containerServiceTagsObject, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.Update");
+ scope.Start();
+ try
+ {
+ var response = await _managedClusterSnapshotRestClient.UpdateTagsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerServiceTagsObject, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Updates tags on a managed cluster snapshot.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_UpdateTags
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// Parameters supplied to the Update managed cluster snapshot Tags operation.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response Update(ContainerServiceTagsObject containerServiceTagsObject, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.Update");
+ scope.Start();
+ try
+ {
+ var response = _managedClusterSnapshotRestClient.UpdateTags(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, containerServiceTagsObject, cancellationToken);
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, response.Value), response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues[key] = value;
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _managedClusterSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new ContainerServiceTagsObject();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Add a tag to the current resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The value for the tag.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+ Argument.AssertNotNull(value, nameof(value));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.AddTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues[key] = value;
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _managedClusterSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new ContainerServiceTagsObject();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags[key] = value;
+ var result = Update(patch, cancellationToken: cancellationToken);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _managedClusterSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new ContainerServiceTagsObject();
+ patch.Tags.ReplaceWith(tags);
+ var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Replace the tags on the resource with the given set.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The set of tags to use as replacement.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(tags, nameof(tags));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.SetTags");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken);
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.ReplaceWith(tags);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _managedClusterSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new ContainerServiceTagsObject();
+ patch.Tags.ReplaceWith(tags);
+ var result = Update(patch, cancellationToken: cancellationToken);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false))
+ {
+ var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false);
+ originalTags.Value.Data.TagValues.Remove(key);
+ await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false);
+ var originalResponse = await _managedClusterSnapshotRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false);
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data;
+ var patch = new ContainerServiceTagsObject();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// Removes a tag by key from the resource.
+ ///
+ /// -
+ /// Request Path
+ /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclustersnapshots/{resourceName}
+ ///
+ /// -
+ /// Operation Id
+ /// ManagedClusterSnapshots_Get
+ ///
+ /// -
+ /// Default Api Version
+ /// 2024-04-02-preview
+ ///
+ /// -
+ /// Resource
+ ///
+ ///
+ ///
+ ///
+ /// The key for the tag.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(key, nameof(key));
+
+ using var scope = _managedClusterSnapshotClientDiagnostics.CreateScope("ManagedClusterSnapshotResource.RemoveTag");
+ scope.Start();
+ try
+ {
+ if (CanUseTagResource(cancellationToken: cancellationToken))
+ {
+ var originalTags = GetTagResource().Get(cancellationToken);
+ originalTags.Value.Data.TagValues.Remove(key);
+ GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken);
+ var originalResponse = _managedClusterSnapshotRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken);
+ return Response.FromValue(new ManagedClusterSnapshotResource(Client, originalResponse.Value), originalResponse.GetRawResponse());
+ }
+ else
+ {
+ var current = Get(cancellationToken: cancellationToken).Value.Data;
+ var patch = new ContainerServiceTagsObject();
+ foreach (var tag in current.Tags)
+ {
+ patch.Tags.Add(tag);
+ }
+ patch.Tags.Remove(key);
+ var result = Update(patch, cancellationToken: cancellationToken);
+ return result;
+ }
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileResource.cs
index ae15f4b29f21..09c712d3b801 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileResource.cs
@@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -140,7 +140,7 @@ public virtual async Task> GetAsy
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileCollection.cs
index 73f52e619891..8204f8b23425 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileCollection.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileCollection.cs
@@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -158,7 +158,7 @@ public virtual Response Get(string mode, Cancellati
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken ca
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string mode, CancellationT
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -304,7 +304,7 @@ public virtual Response Exists(string mode, CancellationToken cancellation
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -349,7 +349,7 @@ public virtual async Task> GetIfEx
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileResource.cs
index 349a3898fb10..dc5bc42bcf0f 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshRevisionProfileResource.cs
@@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileCollection.cs
index c9c2c819a366..61523d190e8c 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileCollection.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileCollection.cs
@@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -154,7 +154,7 @@ public virtual Response Get(string mode, Cancellatio
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken can
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string mode, CancellationT
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -300,7 +300,7 @@ public virtual Response Exists(string mode, CancellationToken cancellation
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -345,7 +345,7 @@ public virtual async Task> GetIfExi
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileResource.cs
index 84cce4083213..1a899135df0e 100644
--- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileResource.cs
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/MeshUpgradeProfileResource.cs
@@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id)
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
@@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancell
///
/// -
/// Default Api Version
- /// 2023-10-01
+ /// 2024-04-02-preview
///
/// -
/// Resource
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AddonAutoscaling.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AddonAutoscaling.cs
new file mode 100644
index 000000000000..daf42a3d0018
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AddonAutoscaling.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.ContainerService.Models
+{
+ /// Whether VPA add-on is enabled and configured to scale AKS-managed add-ons.
+ public readonly partial struct AddonAutoscaling : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public AddonAutoscaling(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string EnabledValue = "Enabled";
+ private const string DisabledValue = "Disabled";
+
+ /// Feature to autoscale AKS-managed add-ons is enabled. The default VPA update mode is Initial mode.
+ public static AddonAutoscaling Enabled { get; } = new AddonAutoscaling(EnabledValue);
+ /// Feature to autoscale AKS-managed add-ons is disabled.
+ public static AddonAutoscaling Disabled { get; } = new AddonAutoscaling(DisabledValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(AddonAutoscaling left, AddonAutoscaling right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(AddonAutoscaling left, AddonAutoscaling right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator AddonAutoscaling(string value) => new AddonAutoscaling(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is AddonAutoscaling other && Equals(other);
+ ///
+ public bool Equals(AddonAutoscaling other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AdvancedNetworking.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AdvancedNetworking.Serialization.cs
new file mode 100644
index 000000000000..199e5c7cde68
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AdvancedNetworking.Serialization.cs
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.ContainerService.Models
+{
+ internal partial class AdvancedNetworking : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AdvancedNetworking)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Observability))
+ {
+ writer.WritePropertyName("observability"u8);
+ writer.WriteObjectValue(Observability, options);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ AdvancedNetworking IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AdvancedNetworking)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAdvancedNetworking(document.RootElement, options);
+ }
+
+ internal static AdvancedNetworking DeserializeAdvancedNetworking(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ AdvancedNetworkingObservability observability = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("observability"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ observability = AdvancedNetworkingObservability.DeserializeAdvancedNetworkingObservability(property.Value, options);
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AdvancedNetworking(observability, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AdvancedNetworking)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AdvancedNetworking IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ {
+ using JsonDocument document = JsonDocument.Parse(data);
+ return DeserializeAdvancedNetworking(document.RootElement, options);
+ }
+ default:
+ throw new FormatException($"The model {nameof(AdvancedNetworking)} does not support reading '{options.Format}' format.");
+ }
+ }
+
+ string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J";
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AdvancedNetworking.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AdvancedNetworking.cs
new file mode 100644
index 000000000000..971de3a690cf
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AdvancedNetworking.cs
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+
+namespace Azure.ResourceManager.ContainerService.Models
+{
+ /// Advanced Networking profile for enabling observability on a cluster. For more information see aka.ms/aksadvancednetworking.
+ internal partial class AdvancedNetworking
+ {
+ ///
+ /// Keeps track of any properties unknown to the library.
+ ///
+ /// To assign an object to the value of this property use .
+ ///
+ ///
+ /// To assign an already formatted json string to this property use .
+ ///
+ ///
+ /// Examples:
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson("foo")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromString("\"foo\"")
+ /// Creates a payload of "foo".
+ ///
+ /// -
+ /// BinaryData.FromObjectAsJson(new { key = "value" })
+ /// Creates a payload of { "key": "value" }.
+ ///
+ /// -
+ /// BinaryData.FromString("{\"key\": \"value\"}")
+ /// Creates a payload of { "key": "value" }.
+ ///
+ ///
+ ///
+ ///
+ private IDictionary _serializedAdditionalRawData;
+
+ /// Initializes a new instance of .
+ public AdvancedNetworking()
+ {
+ }
+
+ /// Initializes a new instance of .
+ /// Observability profile to enable advanced network metrics and flow logs with historical contexts.
+ /// Keeps track of any properties unknown to the library.
+ internal AdvancedNetworking(AdvancedNetworkingObservability observability, IDictionary serializedAdditionalRawData)
+ {
+ Observability = observability;
+ _serializedAdditionalRawData = serializedAdditionalRawData;
+ }
+
+ /// Observability profile to enable advanced network metrics and flow logs with historical contexts.
+ internal AdvancedNetworkingObservability Observability { get; set; }
+ /// Indicates the enablement of Advanced Networking observability functionalities on clusters.
+ public bool? ObservabilityEnabled
+ {
+ get => Observability is null ? default : Observability.Enabled;
+ set
+ {
+ if (Observability is null)
+ Observability = new AdvancedNetworkingObservability();
+ Observability.Enabled = value;
+ }
+ }
+ }
+}
diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AdvancedNetworkingObservability.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AdvancedNetworkingObservability.Serialization.cs
new file mode 100644
index 000000000000..53a361d55a30
--- /dev/null
+++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AdvancedNetworkingObservability.Serialization.cs
@@ -0,0 +1,126 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ClientModel.Primitives;
+using System.Collections.Generic;
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.ContainerService.Models
+{
+ internal partial class AdvancedNetworkingObservability : IUtf8JsonSerializable, IJsonModel
+ {
+ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions);
+
+ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AdvancedNetworkingObservability)} does not support writing '{format}' format.");
+ }
+
+ writer.WriteStartObject();
+ if (Optional.IsDefined(Enabled))
+ {
+ writer.WritePropertyName("enabled"u8);
+ writer.WriteBooleanValue(Enabled.Value);
+ }
+ if (options.Format != "W" && _serializedAdditionalRawData != null)
+ {
+ foreach (var item in _serializedAdditionalRawData)
+ {
+ writer.WritePropertyName(item.Key);
+#if NET6_0_OR_GREATER
+ writer.WriteRawValue(item.Value);
+#else
+ using (JsonDocument document = JsonDocument.Parse(item.Value))
+ {
+ JsonSerializer.Serialize(writer, document.RootElement);
+ }
+#endif
+ }
+ }
+ writer.WriteEndObject();
+ }
+
+ AdvancedNetworkingObservability IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+ if (format != "J")
+ {
+ throw new FormatException($"The model {nameof(AdvancedNetworkingObservability)} does not support reading '{format}' format.");
+ }
+
+ using JsonDocument document = JsonDocument.ParseValue(ref reader);
+ return DeserializeAdvancedNetworkingObservability(document.RootElement, options);
+ }
+
+ internal static AdvancedNetworkingObservability DeserializeAdvancedNetworkingObservability(JsonElement element, ModelReaderWriterOptions options = null)
+ {
+ options ??= ModelSerializationExtensions.WireOptions;
+
+ if (element.ValueKind == JsonValueKind.Null)
+ {
+ return null;
+ }
+ bool? enabled = default;
+ IDictionary serializedAdditionalRawData = default;
+ Dictionary rawDataDictionary = new Dictionary();
+ foreach (var property in element.EnumerateObject())
+ {
+ if (property.NameEquals("enabled"u8))
+ {
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ continue;
+ }
+ enabled = property.Value.GetBoolean();
+ continue;
+ }
+ if (options.Format != "W")
+ {
+ rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText()));
+ }
+ }
+ serializedAdditionalRawData = rawDataDictionary;
+ return new AdvancedNetworkingObservability(enabled, serializedAdditionalRawData);
+ }
+
+ BinaryData IPersistableModel.Write(ModelReaderWriterOptions options)
+ {
+ var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format;
+
+ switch (format)
+ {
+ case "J":
+ return ModelReaderWriter.Write(this, options);
+ default:
+ throw new FormatException($"The model {nameof(AdvancedNetworkingObservability)} does not support writing '{options.Format}' format.");
+ }
+ }
+
+ AdvancedNetworkingObservability IPersistableModel