From 9f2ac06f653043ffdf626bf57ff3d942afb90126 Mon Sep 17 00:00:00 2001 From: Minghao Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 16 Jan 2026 14:16:12 +0800 Subject: [PATCH 1/3] regen --- .../AgentPoolSnapshotData.Serialization.cs | 4 +- .../src/Generated/AgentPoolSnapshotData.cs | 4 +- ...entPoolUpgradeProfileData.Serialization.cs | 2 +- .../Generated/AgentPoolUpgradeProfileData.cs | 12 +- .../ArmContainerServiceModelFactory.cs | 1107 +++++------- ...ainerServiceAgentPoolData.Serialization.cs | 4 +- .../ContainerServiceAgentPoolData.cs | 16 +- .../ContainerServiceAgentPoolResource.cs | 12 +- .../ContainerServiceMachineCollection.cs | 12 +- ...ntainerServiceMachineData.Serialization.cs | 62 +- .../Generated/ContainerServiceMachineData.cs | 24 +- ...ntenanceConfigurationData.Serialization.cs | 24 +- ...inerServiceMaintenanceConfigurationData.cs | 18 +- .../ContainerServiceManagedClusterData.cs | 4 +- .../ContainerServiceManagedClusterResource.cs | 702 ++++---- .../Extensions/ContainerServiceExtensions.cs | 198 +-- .../MockableContainerServiceArmClient.cs | 108 +- ...bleContainerServiceSubscriptionResource.cs | 92 +- .../ManagedClusterNamespaceCollection.cs | 4 +- ...nagedClusterNamespaceData.Serialization.cs | 42 +- .../Generated/ManagedClusterNamespaceData.cs | 24 +- ...ClusterUpgradeProfileData.Serialization.cs | 2 +- .../ManagedClusterUpgradeProfileData.cs | 8 +- ...gentPoolAvailableVersions.Serialization.cs | 8 +- .../Models/AgentPoolAvailableVersions.cs | 6 +- ...iesAgentPoolVersionsItem.Serialization.cs} | 48 +- ...ersionsPropertiesAgentPoolVersionsItem.cs} | 32 +- ...entPoolSnapshotListResult.Serialization.cs | 41 +- .../Models/AgentPoolSnapshotListResult.cs | 31 +- ...oolUpgradeProfilePropertiesUpgradesItem.cs | 6 +- ...eResourceManagerContainerServiceContext.cs | 2 +- ...erviceAgentPoolListResult.Serialization.cs | 41 +- .../ContainerServiceAgentPoolListResult.cs | 31 +- .../Models/ContainerServiceIPFamily.cs | 60 - ...erServiceMachineIPAddress.Serialization.cs | 4 +- .../ContainerServiceMachineIPAddress.cs | 4 +- .../ContainerServiceMachineProperties.cs | 2 +- ...ceConfigurationListResult.Serialization.cs | 41 +- ...rviceMaintenanceConfigurationListResult.cs | 31 +- ...inerServiceNetworkProfile.Serialization.cs | 8 +- .../Models/ContainerServiceNetworkProfile.cs | 6 +- ...cePrivateLinkResourceData.Serialization.cs | 18 +- ...ContainerServicePrivateLinkResourceData.cs | 4 +- .../ContainerServicePublicNetworkAccess.cs | 4 +- .../src/Generated/Models/IPFamily.cs | 20 + .../Models/MachineListResult.Serialization.cs | 71 +- .../src/Generated/Models/MachineListResult.cs | 45 +- .../ManagedClusterAadProfile.Serialization.cs | 23 +- .../Models/ManagedClusterAadProfile.cs | 6 +- ...edClusterAgentPoolProfile.Serialization.cs | 4 +- .../Models/ManagedClusterAgentPoolProfile.cs | 8 +- ...gentPoolProfileProperties.Serialization.cs | 4 +- ...anagedClusterAgentPoolProfileProperties.cs | 16 +- ...dClusterAutoScalerProfile.Serialization.cs | 14 +- .../Models/ManagedClusterAutoScalerProfile.cs | 8 +- .../ManagedClusterListResult.Serialization.cs | 41 +- .../Models/ManagedClusterListResult.cs | 31 +- ...ClusterPoolUpgradeProfile.Serialization.cs | 2 +- .../ManagedClusterPoolUpgradeProfile.cs | 12 +- ...edClusterPoolUpgradeProfileUpgradesItem.cs | 6 +- ...agedClusterWindowsProfile.Serialization.cs | 10 +- .../Models/ManagedClusterWindowsProfile.cs | 8 +- ...anagedNamespaceListResult.Serialization.cs | 39 +- .../Models/ManagedNamespaceListResult.cs | 31 +- .../MeshRevisionProfileList.Serialization.cs | 41 +- .../Models/MeshRevisionProfileList.cs | 29 +- .../MeshUpgradeProfileList.Serialization.cs | 41 +- .../Models/MeshUpgradeProfileList.cs | 29 +- .../Models/NamespaceNetworkPolicies.cs | 8 +- .../{ContainerServiceOSSku.cs => Ossku.cs} | 58 +- ...ronmentEndpointListResult.Serialization.cs | 22 +- .../OutboundEnvironmentEndpointListResult.cs | 14 +- ...cessRoleBindingListResult.Serialization.cs | 41 +- .../TrustedAccessRoleBindingListResult.cs | 31 +- ...ustedAccessRoleListResult.Serialization.cs | 41 +- .../Models/TrustedAccessRoleListResult.cs | 29 +- .../AgentPoolsRestOperations.cs | 336 ++-- .../RestOperations/MachinesRestOperations.cs | 4 +- .../ManagedClustersRestOperations.cs | 1506 +++++++++-------- .../ManagedNamespacesRestOperations.cs | 100 +- ...rivateEndpointConnectionsRestOperations.cs | 2 + .../src/autorest.md | 2 +- ...ple_ContainerServiceAgentPoolCollection.cs | 6 +- ...ample_ContainerServiceAgentPoolResource.cs | 6 +- ...ontainerServiceManagedClusterCollection.cs | 56 +- ..._ContainerServiceManagedClusterResource.cs | 182 +- .../Sample_SubscriptionResourceExtensions.cs | 30 +- 87 files changed, 2857 insertions(+), 3069 deletions(-) rename sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/{AgentPoolAvailableVersion.Serialization.cs => AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.Serialization.cs} (72%) rename sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/{AgentPoolAvailableVersion.cs => AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs} (68%) delete mode 100644 sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPFamily.cs create mode 100644 sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IPFamily.cs rename sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/{ContainerServiceOSSku.cs => Ossku.cs} (58%) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs index 273719999862..e435a4637ecd 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs @@ -115,7 +115,7 @@ internal static AgentPoolSnapshotData DeserializeAgentPoolSnapshotData(JsonEleme string kubernetesVersion = default; string nodeImageVersion = default; ContainerServiceOSType? osType = default; - ContainerServiceOSSku? osSku = default; + Ossku? osSku = default; string vmSize = default; bool? enableFIPS = default; IDictionary serializedAdditionalRawData = default; @@ -217,7 +217,7 @@ internal static AgentPoolSnapshotData DeserializeAgentPoolSnapshotData(JsonEleme { continue; } - osSku = new ContainerServiceOSSku(property0.Value.GetString()); + osSku = new Ossku(property0.Value.GetString()); continue; } if (property0.NameEquals("vmSize"u8)) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs index d728ee75d98e..da360c0aebb8 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs @@ -98,7 +98,7 @@ public AgentPoolSnapshotData(AzureLocation location) : base(location) /// Serialized Name: Snapshot.properties.enableFIPS /// /// Keeps track of any properties unknown to the library. - internal AgentPoolSnapshotData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerServiceCreationData creationData, SnapshotType? snapshotType, string kubernetesVersion, string nodeImageVersion, ContainerServiceOSType? osType, ContainerServiceOSSku? osSku, string vmSize, bool? enableFips, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal AgentPoolSnapshotData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerServiceCreationData creationData, SnapshotType? snapshotType, string kubernetesVersion, string nodeImageVersion, ContainerServiceOSType? osType, Ossku? osSku, string vmSize, bool? enableFips, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { CreationData = creationData; SnapshotType = snapshotType; @@ -166,7 +166,7 @@ public ResourceIdentifier CreationDataSourceResourceId /// Serialized Name: Snapshot.properties.osSku /// [WirePath("properties.osSku")] - public ContainerServiceOSSku? OSSku { get; } + public Ossku? OSSku { get; } /// /// The size of the VM. /// Serialized Name: Snapshot.properties.vmSize 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 330edbc772f4..84b1933731b6 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs @@ -89,7 +89,7 @@ internal static AgentPoolUpgradeProfileData DeserializeAgentPoolUpgradeProfileDa SystemData systemData = default; string kubernetesVersion = default; ContainerServiceOSType osType = default; - IReadOnlyList upgrades = default; + IList upgrades = default; string latestNodeImageVersion = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs index e006ffa28938..1335fde010c4 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs @@ -62,7 +62,7 @@ public partial class AgentPoolUpgradeProfileData : ResourceData /// Serialized Name: AgentPoolUpgradeProfile.properties.osType /// /// is null. - internal AgentPoolUpgradeProfileData(string kubernetesVersion, ContainerServiceOSType osType) + public AgentPoolUpgradeProfileData(string kubernetesVersion, ContainerServiceOSType osType) { Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); @@ -93,7 +93,7 @@ internal AgentPoolUpgradeProfileData(string kubernetesVersion, ContainerServiceO /// Serialized Name: AgentPoolUpgradeProfile.properties.latestNodeImageVersion /// /// 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, IList upgrades, string latestNodeImageVersion, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { KubernetesVersion = kubernetesVersion; OSType = osType; @@ -112,24 +112,24 @@ internal AgentPoolUpgradeProfileData() /// Serialized Name: AgentPoolUpgradeProfile.properties.kubernetesVersion /// [WirePath("properties.kubernetesVersion")] - public string KubernetesVersion { get; } + public string KubernetesVersion { get; set; } /// /// The operating system type. The default is Linux. /// Serialized Name: AgentPoolUpgradeProfile.properties.osType /// [WirePath("properties.osType")] - public ContainerServiceOSType OSType { get; } + public ContainerServiceOSType OSType { get; set; } /// /// List of orchestrator types and versions available for upgrade. /// Serialized Name: AgentPoolUpgradeProfile.properties.upgrades /// [WirePath("properties.upgrades")] - public IReadOnlyList Upgrades { get; } + public IList Upgrades { get; } /// /// The latest AKS supported node image version. /// Serialized Name: AgentPoolUpgradeProfile.properties.latestNodeImageVersion /// [WirePath("properties.latestNodeImageVersion")] - public string LatestNodeImageVersion { get; } + public string LatestNodeImageVersion { get; set; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs index 900e82641f35..dd3a1aaceb5e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs @@ -81,6 +81,89 @@ public static KubernetesPatchVersion KubernetesPatchVersion(IEnumerable return new KubernetesPatchVersion(upgrades?.ToList(), serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// Mesh revision profile properties for a mesh + /// Serialized Name: MeshRevisionProfile.properties + /// + /// A new instance for mocking. + public static MeshRevisionProfileData MeshRevisionProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable meshRevisions = null) + { + meshRevisions ??= new List(); + + return new MeshRevisionProfileData( + id, + name, + resourceType, + systemData, + meshRevisions != null ? new MeshRevisionProfileProperties(meshRevisions?.ToList(), serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// Resource type of Azure resource + /// Serialized Name: TrustedAccessRole.sourceResourceType + /// + /// + /// Name of role, name is unique under a source resource type + /// Serialized Name: TrustedAccessRole.name + /// + /// + /// 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). + /// Serialized Name: TrustedAccessRole.rules + /// + /// 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 + /// Serialized Name: TrustedAccessRoleRule.verbs + /// + /// + /// List of allowed apiGroups + /// Serialized Name: TrustedAccessRoleRule.apiGroups + /// + /// + /// List of allowed resources + /// Serialized Name: TrustedAccessRoleRule.resources + /// + /// + /// List of allowed names + /// Serialized Name: TrustedAccessRoleRule.resourceNames + /// + /// + /// List of allowed nonResourceURLs + /// Serialized Name: TrustedAccessRoleRule.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. @@ -89,7 +172,7 @@ public static KubernetesPatchVersion KubernetesPatchVersion(IEnumerable /// 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. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. /// Serialized Name: ManagedCluster.eTag /// /// @@ -475,11 +558,11 @@ public static ContainerServiceManagedClusterData ContainerServiceManagedClusterD /// Serialized Name: ManagedClusterAgentPoolProfileProperties.nodePublicIPPrefixID /// /// - /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// The Virtual Machine Scale Set priority. /// Serialized Name: ManagedClusterAgentPoolProfileProperties.scaleSetPriority /// /// - /// The Virtual Machine Scale Set eviction policy to use. This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.scaleSetEvictionPolicy /// /// @@ -531,7 +614,7 @@ public static ContainerServiceManagedClusterData ContainerServiceManagedClusterD /// Serialized Name: ManagedClusterAgentPoolProfileProperties.creationData /// /// - /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved group of Virtual Machines. This is of the form: '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' Customers use it to create an agentpool with a specified CRG. For more information see [Capacity Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.capacityReservationGroupID /// /// @@ -579,7 +662,7 @@ public static ContainerServiceManagedClusterData ContainerServiceManagedClusterD /// Serialized Name: ManagedClusterAgentPoolProfile.name /// /// A new instance for mocking. - 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, 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = 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, Ossku? 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = null, string name = null) { availabilityZones ??= new List(); tags ??= new Dictionary(); @@ -765,11 +848,11 @@ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(ETag /// Serialized Name: ManagedClusterAgentPoolProfileProperties.nodePublicIPPrefixID /// /// - /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// The Virtual Machine Scale Set priority. /// Serialized Name: ManagedClusterAgentPoolProfileProperties.scaleSetPriority /// /// - /// The Virtual Machine Scale Set eviction policy to use. This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.scaleSetEvictionPolicy /// /// @@ -821,7 +904,7 @@ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(ETag /// Serialized Name: ManagedClusterAgentPoolProfileProperties.creationData /// /// - /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved group of Virtual Machines. This is of the form: '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' Customers use it to create an agentpool with a specified CRG. For more information see [Capacity Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.capacityReservationGroupID /// /// @@ -865,7 +948,7 @@ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(ETag /// Serialized Name: ManagedClusterAgentPoolProfileProperties.localDNSProfile /// /// A new instance for mocking. - 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, 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = 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, Ossku? 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = null) { availabilityZones ??= new List(); tags ??= new Dictionary(); @@ -1055,7 +1138,7 @@ public static ManagedClusterOidcIssuerProfile ManagedClusterOidcIssuerProfile(st /// Serialized Name: PrivateLinkResource.privateLinkServiceID /// /// A new instance for mocking. - public static ContainerServicePrivateLinkResourceData ContainerServicePrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string groupId = null, IEnumerable requiredMembers = null, ResourceIdentifier privateLinkServiceId = null) + public static ContainerServicePrivateLinkResourceData ContainerServicePrivateLinkResourceData(string id = null, string name = null, ResourceType? resourceType = null, string groupId = null, IEnumerable requiredMembers = null, ResourceIdentifier privateLinkServiceId = null) { requiredMembers ??= new List(); @@ -1094,72 +1177,66 @@ public static ManagedClusterIngressProfileWebAppRouting ManagedClusterIngressPro return new ManagedClusterIngressProfileWebAppRouting(isEnabled, dnsZoneResourceIds?.ToList(), nginxDefaultIngressControllerType != null ? new ManagedClusterIngressProfileNginx(nginxDefaultIngressControllerType, serializedAdditionalRawData: null) : null, identity, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// The list of available upgrade versions for the control plane. - /// Serialized Name: ManagedClusterUpgradeProfile.properties.controlPlaneProfile + /// The tags. + /// The location. + /// + /// CreationData to be used to specify the source agent pool resource ID to create this snapshot. + /// Serialized Name: Snapshot.properties.creationData /// - /// - /// The list of available upgrade versions for agent pools. - /// Serialized Name: ManagedClusterUpgradeProfile.properties.agentPoolProfiles + /// + /// The type of a snapshot. The default is NodePool. + /// Serialized Name: Snapshot.properties.snapshotType /// - /// A new instance for mocking. - public static ManagedClusterUpgradeProfileData ManagedClusterUpgradeProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedClusterPoolUpgradeProfile controlPlaneProfile = null, IEnumerable agentPoolProfiles = null) - { - agentPoolProfiles ??= new List(); - - return new ManagedClusterUpgradeProfileData( - id, - name, - resourceType, - systemData, - controlPlaneProfile, - agentPoolProfiles?.ToList(), - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . /// - /// The Kubernetes version (major.minor.patch). - /// Serialized Name: ManagedClusterPoolUpgradeProfile.kubernetesVersion + /// The version of Kubernetes. + /// Serialized Name: Snapshot.properties.kubernetesVersion /// - /// - /// The Agent Pool name. - /// Serialized Name: ManagedClusterPoolUpgradeProfile.name + /// + /// The version of node image. + /// Serialized Name: Snapshot.properties.nodeImageVersion /// /// /// The operating system type. The default is Linux. - /// Serialized Name: ManagedClusterPoolUpgradeProfile.osType + /// Serialized Name: Snapshot.properties.osType /// - /// - /// List of orchestrator types and versions available for upgrade. - /// Serialized Name: ManagedClusterPoolUpgradeProfile.upgrades + /// + /// 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. + /// Serialized Name: Snapshot.properties.osSku /// - /// A new instance for mocking. - public static ManagedClusterPoolUpgradeProfile ManagedClusterPoolUpgradeProfile(string kubernetesVersion = null, string name = null, ContainerServiceOSType osType = default, IEnumerable upgrades = null) - { - upgrades ??= new List(); - - return new ManagedClusterPoolUpgradeProfile(kubernetesVersion, name, osType, upgrades?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// The Kubernetes version (major.minor.patch). - /// Serialized Name: ManagedClusterPoolUpgradeProfileUpgradesItem.kubernetesVersion + /// + /// The size of the VM. + /// Serialized Name: Snapshot.properties.vmSize /// - /// - /// Whether the Kubernetes version is currently in preview. - /// Serialized Name: ManagedClusterPoolUpgradeProfileUpgradesItem.isPreview + /// + /// Whether to use a FIPS-enabled OS. + /// Serialized Name: Snapshot.properties.enableFIPS /// - /// A new instance for mocking. - public static ManagedClusterPoolUpgradeProfileUpgradesItem ManagedClusterPoolUpgradeProfileUpgradesItem(string kubernetesVersion = null, bool? isPreview = null) + /// A new instance for mocking. + public static AgentPoolSnapshotData AgentPoolSnapshotData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier creationDataSourceResourceId = null, SnapshotType? snapshotType = null, string kubernetesVersion = null, string nodeImageVersion = null, ContainerServiceOSType? osType = null, Ossku? osSku = null, string vmSize = null, bool? enableFips = null) { - return new ManagedClusterPoolUpgradeProfileUpgradesItem(kubernetesVersion, isPreview, serializedAdditionalRawData: null); + tags ??= new Dictionary(); + + return new AgentPoolSnapshotData( + id, + name, + resourceType, + systemData, + tags, + location, + creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null, + snapshotType, + kubernetesVersion, + nodeImageVersion, + osType, + osSku, + vmSize, + enableFips, + serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -1189,171 +1266,26 @@ public static ManagedClusterAccessProfile ManagedClusterAccessProfile(ResourceId serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// Base64-encoded Kubernetes configuration file. - /// Serialized Name: CredentialResults.kubeconfigs - /// - /// A new instance for mocking. - public static ManagedClusterCredentials ManagedClusterCredentials(IEnumerable kubeconfigs = null) - { - kubeconfigs ??= new List(); - - return new ManagedClusterCredentials(kubeconfigs?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// The name of the credential. - /// Serialized Name: CredentialResult.name - /// - /// - /// Base64-encoded Kubernetes configuration file. - /// Serialized Name: CredentialResult.value - /// - /// A new instance for mocking. - public static ManagedClusterCredential ManagedClusterCredential(string name = null, byte[] value = null) - { - return new ManagedClusterCredential(name, value, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// Time slots during the week when planned maintenance is allowed to proceed. If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. - /// Serialized Name: MaintenanceConfiguration.properties.timeInWeek - /// - /// - /// Time slots on which upgrade is not allowed. - /// Serialized Name: MaintenanceConfiguration.properties.notAllowedTime - /// - /// - /// Maintenance window for the maintenance configuration. - /// Serialized Name: MaintenanceConfiguration.properties.maintenanceWindow - /// - /// A new instance for mocking. - public static ContainerServiceMaintenanceConfigurationData ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable timesInWeek = null, IEnumerable notAllowedTimes = null, ContainerServiceMaintenanceWindow maintenanceWindow = null) - { - timesInWeek ??= new List(); - notAllowedTimes ??= new List(); - - return new ContainerServiceMaintenanceConfigurationData( - id, - name, - resourceType, - systemData, - timesInWeek?.ToList(), - notAllowedTimes?.ToList(), - maintenanceWindow, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// 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. - /// Serialized Name: ManagedNamespace.eTag + /// Serialized Name: AgentPool.properties.eTag /// - /// - /// Properties of a namespace. - /// Serialized Name: ManagedNamespace.properties + /// + /// 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. + /// Serialized Name: AgentPool.properties.count /// - /// A new instance for mocking. - public static ManagedClusterNamespaceData ManagedClusterNamespaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ETag? etag = null, ManagedClusterNamespaceProperties properties = null) - { - tags ??= new Dictionary(); - - return new ManagedClusterNamespaceData( - id, - name, - resourceType, - systemData, - tags, - location, - etag, - properties, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// The current provisioning state of the namespace. - /// Serialized Name: NamespaceProperties.provisioningState + /// + /// The size of the agent pool VMs. 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 + /// Serialized Name: AgentPool.properties.vmSize /// - /// - /// The labels of managed namespace. - /// Serialized Name: NamespaceProperties.labels - /// - /// - /// The annotations of managed namespace. - /// Serialized Name: NamespaceProperties.annotations - /// - /// - /// The special FQDN used by the Azure Portal to access the Managed Cluster. This FQDN is for use only by the Azure Portal and should not be used by other clients. The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. - /// Serialized Name: NamespaceProperties.portalFqdn - /// - /// - /// The default resource quota enforced upon the namespace. Customers can have other Kubernetes resource quota objects under the namespace. Resource quotas are additive; if multiple resource quotas are applied to a given namespace, then the effective limit will be one such that all quotas on the namespace can be satisfied. - /// Serialized Name: NamespaceProperties.defaultResourceQuota - /// - /// - /// The default network policy enforced upon the namespace. Customers can have other Kubernetes network policy objects under the namespace. Network policies are additive; if a policy or policies apply to a given pod for a given direction, the connections allowed in that direction for the pod is the union of what all applicable policies allow. - /// Serialized Name: NamespaceProperties.defaultNetworkPolicy - /// - /// - /// Action if Kubernetes namespace with same name already exists. - /// Serialized Name: NamespaceProperties.adoptionPolicy - /// - /// - /// Delete options of a namespace. - /// Serialized Name: NamespaceProperties.deletePolicy - /// - /// A new instance for mocking. - public static ManagedClusterNamespaceProperties ManagedClusterNamespaceProperties(ManagedClusterNamespaceProvisioningState? provisioningState = null, IDictionary labels = null, IDictionary annotations = null, string portalFqdn = null, NamespaceResourceQuota defaultResourceQuota = null, NamespaceNetworkPolicies defaultNetworkPolicy = null, NamespaceAdoptionPolicy? adoptionPolicy = null, NamespaceDeletePolicy? deletePolicy = null) - { - labels ??= new Dictionary(); - annotations ??= new Dictionary(); - - return new ManagedClusterNamespaceProperties( - provisioningState, - labels, - annotations, - portalFqdn, - defaultResourceQuota, - defaultNetworkPolicy, - adoptionPolicy, - deletePolicy, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// 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. - /// Serialized Name: AgentPool.properties.eTag - /// - /// - /// 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. - /// Serialized Name: AgentPool.properties.count - /// - /// - /// The size of the agent pool VMs. 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 - /// Serialized Name: AgentPool.properties.vmSize - /// - /// - /// 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. - /// Serialized Name: AgentPool.properties.osDiskSizeGB + /// + /// 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. + /// Serialized Name: AgentPool.properties.osDiskSizeGB /// /// /// The OS disk type to be used for machines in the agent pool. 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). @@ -1456,11 +1388,11 @@ public static ManagedClusterNamespaceProperties ManagedClusterNamespacePropertie /// Serialized Name: AgentPool.properties.nodePublicIPPrefixID /// /// - /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// The Virtual Machine Scale Set priority. /// Serialized Name: AgentPool.properties.scaleSetPriority /// /// - /// The Virtual Machine Scale Set eviction policy to use. This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// Serialized Name: AgentPool.properties.scaleSetEvictionPolicy /// /// @@ -1512,7 +1444,7 @@ public static ManagedClusterNamespaceProperties ManagedClusterNamespacePropertie /// Serialized Name: AgentPool.properties.creationData /// /// - /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved group of Virtual Machines. This is of the form: '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' Customers use it to create an agentpool with a specified CRG. For more information see [Capacity Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview) /// Serialized Name: AgentPool.properties.capacityReservationGroupID /// /// @@ -1556,7 +1488,7 @@ public static ManagedClusterNamespaceProperties ManagedClusterNamespacePropertie /// Serialized Name: AgentPool.properties.localDNSProfile /// /// A new instance for mocking. - 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, 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = 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, Ossku? 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = null) { availabilityZones ??= new List(); tags ??= new Dictionary(); @@ -1627,6 +1559,66 @@ public static ContainerServiceAgentPoolData ContainerServiceAgentPoolData(Resour serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// The properties of the machine + /// Serialized Name: Machine.properties + /// + /// + /// The Availability zone in which machine is located. + /// Serialized Name: Machine.zones + /// + /// A new instance for mocking. + public static ContainerServiceMachineData ContainerServiceMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContainerServiceMachineProperties properties = null, IEnumerable zones = null) + { + zones ??= new List(); + + return new ContainerServiceMachineData( + id, + name, + resourceType, + systemData, + properties, + zones?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// network properties of the machine + /// Serialized Name: MachineProperties.network + /// + /// + /// Azure resource id of the machine. It can be used to GET underlying VM Instance + /// Serialized Name: MachineProperties.resourceId + /// + /// A new instance for mocking. + public static ContainerServiceMachineProperties ContainerServiceMachineProperties(IEnumerable networkIPAddresses = null, ResourceIdentifier resourceId = null) + { + networkIPAddresses ??= new List(); + + return new ContainerServiceMachineProperties(networkIPAddresses != null ? new MachineNetworkProperties(networkIPAddresses?.ToList(), serializedAdditionalRawData: null) : null, resourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// To determine if address belongs IPv4 or IPv6 family + /// Serialized Name: MachineIpAddress.family + /// + /// + /// IPv4 or IPv6 address of the machine + /// Serialized Name: MachineIpAddress.ip + /// + /// A new instance for mocking. + public static ContainerServiceMachineIPAddress ContainerServiceMachineIPAddress(IPFamily? family = null, string ip = null) + { + return new ContainerServiceMachineIPAddress(family, ip, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -1665,21 +1657,6 @@ public static AgentPoolUpgradeProfileData AgentPoolUpgradeProfileData(ResourceId serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// The Kubernetes version (major.minor.patch). - /// Serialized Name: AgentPoolUpgradeProfilePropertiesUpgradesItem.kubernetesVersion - /// - /// - /// Whether the Kubernetes version is currently in preview. - /// Serialized Name: AgentPoolUpgradeProfilePropertiesUpgradesItem.isPreview - /// - /// A new instance for mocking. - public static AgentPoolUpgradeProfilePropertiesUpgradesItem AgentPoolUpgradeProfilePropertiesUpgradesItem(string kubernetesVersion = null, bool? isPreview = null) - { - return new AgentPoolUpgradeProfilePropertiesUpgradesItem(kubernetesVersion, isPreview, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -1690,9 +1667,9 @@ public static AgentPoolUpgradeProfilePropertiesUpgradesItem AgentPoolUpgradeProf /// Serialized Name: AgentPoolAvailableVersions.properties.agentPoolVersions /// /// A new instance for mocking. - public static AgentPoolAvailableVersions AgentPoolAvailableVersions(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable agentPoolVersions = null) + public static AgentPoolAvailableVersions AgentPoolAvailableVersions(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable agentPoolVersions = null) { - agentPoolVersions ??= new List(); + agentPoolVersions ??= new List(); return new AgentPoolAvailableVersions( id, @@ -1703,73 +1680,23 @@ public static AgentPoolAvailableVersions AgentPoolAvailableVersions(ResourceIden serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// + /// Initializes a new instance of . + /// /// Whether this version is the default agent pool version. - /// Serialized Name: AgentPoolAvailableVersion.default + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.default /// /// /// The Kubernetes version (major.minor.patch). - /// Serialized Name: AgentPoolAvailableVersion.kubernetesVersion + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.kubernetesVersion /// /// /// Whether Kubernetes version is currently in preview. - /// Serialized Name: AgentPoolAvailableVersion.isPreview - /// - /// A new instance for mocking. - public static AgentPoolAvailableVersion AgentPoolAvailableVersion(bool? isDefault = null, string kubernetesVersion = null, bool? isPreview = null) - { - return new AgentPoolAvailableVersion(isDefault, kubernetesVersion, isPreview, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// - /// The current provisioning state. - /// Serialized Name: PrivateEndpointConnection.properties.provisioningState - /// - /// - /// The resource of private endpoint. - /// Serialized Name: PrivateEndpointConnection.properties.privateEndpoint - /// - /// - /// A collection of information about the state of the connection between service consumer and provider. - /// Serialized Name: PrivateEndpointConnection.properties.privateLinkServiceConnectionState - /// - /// A new instance for mocking. - public static ContainerServicePrivateEndpointConnectionData ContainerServicePrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContainerServicePrivateEndpointConnectionProvisioningState? provisioningState = null, ResourceIdentifier privateEndpointId = null, ContainerServicePrivateLinkServiceConnectionState connectionState = null) - { - return new ContainerServicePrivateEndpointConnectionData( - id, - name, - resourceType, - systemData, - provisioningState, - privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, - connectionState, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// The command to run. - /// Serialized Name: RunCommandRequest.command - /// - /// - /// A base64 encoded zip file containing the files required by the command. - /// Serialized Name: RunCommandRequest.context - /// - /// - /// AuthToken issued for AKS AAD Server App. - /// Serialized Name: RunCommandRequest.clusterToken + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.isPreview /// - /// A new instance for mocking. - public static ManagedClusterRunCommandContent ManagedClusterRunCommandContent(string command = null, string context = null, string clusterToken = null) + /// A new instance for mocking. + public static AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(bool? @default = null, string kubernetesVersion = null, bool? isPreview = null) { - return new ManagedClusterRunCommandContent(command, context, clusterToken, serializedAdditionalRawData: null); + return new AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(@default, kubernetesVersion, isPreview, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -1815,145 +1742,148 @@ public static ManagedClusterRunCommandResult ManagedClusterRunCommandResult(stri serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. - /// Serialized Name: OutboundEnvironmentEndpoint.category - /// - /// - /// The endpoints that AKS agent nodes connect to - /// Serialized Name: OutboundEnvironmentEndpoint.endpoints - /// - /// A new instance for mocking. - public static ContainerServiceOutboundEnvironmentEndpoint ContainerServiceOutboundEnvironmentEndpoint(string category = null, IEnumerable endpoints = null) - { - endpoints ??= new List(); - - return new ContainerServiceOutboundEnvironmentEndpoint(category, endpoints?.ToList(), serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// The domain name of the dependency. - /// Serialized Name: EndpointDependency.domainName - /// - /// - /// The Ports and Protocols used when connecting to domainName. - /// Serialized Name: EndpointDependency.endpointDetails + /// Initializes a new instance of . + /// + /// Base64-encoded Kubernetes configuration file. + /// Serialized Name: CredentialResults.kubeconfigs /// - /// A new instance for mocking. - public static ContainerServiceEndpointDependency ContainerServiceEndpointDependency(string domainName = null, IEnumerable endpointDetails = null) + /// A new instance for mocking. + public static ManagedClusterCredentials ManagedClusterCredentials(IEnumerable kubeconfigs = null) { - endpointDetails ??= new List(); + kubeconfigs ??= new List(); - return new ContainerServiceEndpointDependency(domainName, endpointDetails?.ToList(), serializedAdditionalRawData: null); + return new ManagedClusterCredentials(kubeconfigs?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// An IP Address that Domain Name currently resolves to. - /// Serialized Name: EndpointDetail.ipAddress - /// - /// - /// The port an endpoint is connected to. - /// Serialized Name: EndpointDetail.port - /// - /// - /// The protocol used for connection - /// Serialized Name: EndpointDetail.protocol + /// Initializes a new instance of . + /// + /// The name of the credential. + /// Serialized Name: CredentialResult.name /// - /// - /// Description of the detail - /// Serialized Name: EndpointDetail.description + /// + /// Base64-encoded Kubernetes configuration file. + /// Serialized Name: CredentialResult.value /// - /// A new instance for mocking. - public static ContainerServiceEndpointDetail ContainerServiceEndpointDetail(IPAddress ipAddress = null, int? port = null, string protocol = null, string description = null) + /// A new instance for mocking. + public static ManagedClusterCredential ManagedClusterCredential(string name = null, byte[] value = null) { - return new ContainerServiceEndpointDetail(ipAddress, port, protocol, description, serializedAdditionalRawData: null); + return new ManagedClusterCredential(name, value, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// 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 agent pool resource ID to create this snapshot. - /// Serialized Name: Snapshot.properties.creationData + /// + /// Time slots during the week when planned maintenance is allowed to proceed. If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + /// Serialized Name: MaintenanceConfiguration.properties.timeInWeek /// - /// - /// The type of a snapshot. The default is NodePool. - /// Serialized Name: Snapshot.properties.snapshotType - /// - /// - /// The version of Kubernetes. - /// Serialized Name: Snapshot.properties.kubernetesVersion - /// - /// - /// The version of node image. - /// Serialized Name: Snapshot.properties.nodeImageVersion - /// - /// - /// The operating system type. The default is Linux. - /// Serialized Name: Snapshot.properties.osType - /// - /// - /// 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. - /// Serialized Name: Snapshot.properties.osSku - /// - /// - /// The size of the VM. - /// Serialized Name: Snapshot.properties.vmSize + /// + /// Time slots on which upgrade is not allowed. + /// Serialized Name: MaintenanceConfiguration.properties.notAllowedTime /// - /// - /// Whether to use a FIPS-enabled OS. - /// Serialized Name: Snapshot.properties.enableFIPS + /// + /// Maintenance window for the maintenance configuration. + /// Serialized Name: MaintenanceConfiguration.properties.maintenanceWindow /// - /// A new instance for mocking. - public static AgentPoolSnapshotData AgentPoolSnapshotData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier creationDataSourceResourceId = null, SnapshotType? snapshotType = null, string kubernetesVersion = null, string nodeImageVersion = null, ContainerServiceOSType? osType = null, ContainerServiceOSSku? osSku = null, string vmSize = null, bool? enableFips = null) + /// A new instance for mocking. + public static ContainerServiceMaintenanceConfigurationData ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable timeInWeek = null, IEnumerable notAllowedTime = null, ContainerServiceMaintenanceWindow maintenanceWindow = null) { - tags ??= new Dictionary(); + timeInWeek ??= new List(); + notAllowedTime ??= new List(); - return new AgentPoolSnapshotData( + return new ContainerServiceMaintenanceConfigurationData( id, name, resourceType, systemData, - tags, - location, - creationDataSourceResourceId != null ? new ContainerServiceCreationData(creationDataSourceResourceId, serializedAdditionalRawData: null) : null, - snapshotType, - kubernetesVersion, - nodeImageVersion, - osType, - osSku, - vmSize, - enableFips, + timeInWeek?.ToList(), + notAllowedTime?.ToList(), + maintenanceWindow, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// Mesh revision profile properties for a mesh - /// Serialized Name: MeshRevisionProfile.properties + /// The tags. + /// The location. + /// + /// Properties of a namespace. + /// Serialized Name: ManagedNamespace.properties /// - /// A new instance for mocking. - public static MeshRevisionProfileData MeshRevisionProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable meshRevisions = null) + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Serialized Name: ManagedNamespace.eTag + /// + /// A new instance for mocking. + public static ManagedClusterNamespaceData ManagedClusterNamespaceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedClusterNamespaceProperties properties = null, ETag? etag = null) { - meshRevisions ??= new List(); + tags ??= new Dictionary(); - return new MeshRevisionProfileData( + return new ManagedClusterNamespaceData( id, name, resourceType, systemData, - meshRevisions != null ? new MeshRevisionProfileProperties(meshRevisions?.ToList(), serializedAdditionalRawData: null) : null, + tags, + location, + properties, + etag, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The current provisioning state of the namespace. + /// Serialized Name: NamespaceProperties.provisioningState + /// + /// + /// The labels of managed namespace. + /// Serialized Name: NamespaceProperties.labels + /// + /// + /// The annotations of managed namespace. + /// Serialized Name: NamespaceProperties.annotations + /// + /// + /// The special FQDN used by the Azure Portal to access the Managed Cluster. This FQDN is for use only by the Azure Portal and should not be used by other clients. The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. This special FQDN supports CORS, allowing the Azure Portal to function properly. + /// Serialized Name: NamespaceProperties.portalFqdn + /// + /// + /// The default resource quota enforced upon the namespace. Customers can have other Kubernetes resource quota objects under the namespace. Resource quotas are additive; if multiple resource quotas are applied to a given namespace, then the effective limit will be one such that all quotas on the namespace can be satisfied. + /// Serialized Name: NamespaceProperties.defaultResourceQuota + /// + /// + /// The default network policy enforced upon the namespace. Customers can have other Kubernetes network policy objects under the namespace. Network policies are additive; if a policy or policies apply to a given pod for a given direction, the connections allowed in that direction for the pod is the union of what all applicable policies allow. + /// Serialized Name: NamespaceProperties.defaultNetworkPolicy + /// + /// + /// Action if Kubernetes namespace with same name already exists. + /// Serialized Name: NamespaceProperties.adoptionPolicy + /// + /// + /// Delete options of a namespace. + /// Serialized Name: NamespaceProperties.deletePolicy + /// + /// A new instance for mocking. + public static ManagedClusterNamespaceProperties ManagedClusterNamespaceProperties(ManagedClusterNamespaceProvisioningState? provisioningState = null, IDictionary labels = null, IDictionary annotations = null, string portalFqdn = null, NamespaceResourceQuota defaultResourceQuota = null, NamespaceNetworkPolicies defaultNetworkPolicy = null, NamespaceAdoptionPolicy? adoptionPolicy = null, NamespaceDeletePolicy? deletePolicy = null) + { + labels ??= new Dictionary(); + annotations ??= new Dictionary(); + + return new ManagedClusterNamespaceProperties( + provisioningState, + labels, + annotations, + portalFqdn, + defaultResourceQuota, + defaultNetworkPolicy, + adoptionPolicy, + deletePolicy, serializedAdditionalRawData: null); } @@ -1978,6 +1908,113 @@ public static MeshUpgradeProfileData MeshUpgradeProfileData(ResourceIdentifier i serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// + /// The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. + /// Serialized Name: OutboundEnvironmentEndpoint.category + /// + /// + /// The endpoints that AKS agent nodes connect to + /// Serialized Name: OutboundEnvironmentEndpoint.endpoints + /// + /// A new instance for mocking. + public static ContainerServiceOutboundEnvironmentEndpoint ContainerServiceOutboundEnvironmentEndpoint(string category = null, IEnumerable endpoints = null) + { + endpoints ??= new List(); + + return new ContainerServiceOutboundEnvironmentEndpoint(category, endpoints?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The domain name of the dependency. + /// Serialized Name: EndpointDependency.domainName + /// + /// + /// The Ports and Protocols used when connecting to domainName. + /// Serialized Name: EndpointDependency.endpointDetails + /// + /// A new instance for mocking. + public static ContainerServiceEndpointDependency ContainerServiceEndpointDependency(string domainName = null, IEnumerable endpointDetails = null) + { + endpointDetails ??= new List(); + + return new ContainerServiceEndpointDependency(domainName, endpointDetails?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// An IP Address that Domain Name currently resolves to. + /// Serialized Name: EndpointDetail.ipAddress + /// + /// + /// The port an endpoint is connected to. + /// Serialized Name: EndpointDetail.port + /// + /// + /// The protocol used for connection + /// Serialized Name: EndpointDetail.protocol + /// + /// + /// Description of the detail + /// Serialized Name: EndpointDetail.description + /// + /// A new instance for mocking. + public static ContainerServiceEndpointDetail ContainerServiceEndpointDetail(IPAddress ipAddress = null, int? port = null, string protocol = null, string description = null) + { + return new ContainerServiceEndpointDetail(ipAddress, port, protocol, description, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// + /// The current provisioning state. + /// Serialized Name: PrivateEndpointConnection.properties.provisioningState + /// + /// + /// The resource of private endpoint. + /// Serialized Name: PrivateEndpointConnection.properties.privateEndpoint + /// + /// + /// A collection of information about the state of the connection between service consumer and provider. + /// Serialized Name: PrivateEndpointConnection.properties.privateLinkServiceConnectionState + /// + /// A new instance for mocking. + public static ContainerServicePrivateEndpointConnectionData ContainerServicePrivateEndpointConnectionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ContainerServicePrivateEndpointConnectionProvisioningState? provisioningState = null, ResourceIdentifier privateEndpointId = null, ContainerServicePrivateLinkServiceConnectionState connectionState = null) + { + return new ContainerServicePrivateEndpointConnectionData( + id, + name, + resourceType, + systemData, + provisioningState, + privateEndpointId != null ? ResourceManagerModelFactory.WritableSubResource(privateEndpointId) : null, + connectionState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The command to run. + /// Serialized Name: RunCommandRequest.command + /// + /// + /// A base64 encoded zip file containing the files required by the command. + /// Serialized Name: RunCommandRequest.context + /// + /// + /// AuthToken issued for AKS AAD Server App. + /// Serialized Name: RunCommandRequest.clusterToken + /// + /// A new instance for mocking. + public static ManagedClusterRunCommandContent ManagedClusterRunCommandContent(string command = null, string context = null, string clusterToken = null) + { + return new ManagedClusterRunCommandContent(command, context, clusterToken, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -2011,126 +2048,34 @@ public static ContainerServiceTrustedAccessRoleBindingData ContainerServiceTrust serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// Resource type of Azure resource - /// Serialized Name: TrustedAccessRole.sourceResourceType - /// - /// - /// Name of role, name is unique under a source resource type - /// Serialized Name: TrustedAccessRole.name - /// - /// - /// 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). - /// Serialized Name: TrustedAccessRole.rules - /// - /// 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 - /// Serialized Name: TrustedAccessRoleRule.verbs - /// - /// - /// List of allowed apiGroups - /// Serialized Name: TrustedAccessRoleRule.apiGroups - /// - /// - /// List of allowed resources - /// Serialized Name: TrustedAccessRoleRule.resources - /// - /// - /// List of allowed names - /// Serialized Name: TrustedAccessRoleRule.resourceNames - /// - /// - /// List of allowed nonResourceURLs - /// Serialized Name: TrustedAccessRoleRule.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 . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// - /// The Availability zone in which machine is located. - /// Serialized Name: Machine.zones + /// + /// The list of available upgrade versions for the control plane. + /// Serialized Name: ManagedClusterUpgradeProfile.properties.controlPlaneProfile /// - /// - /// The properties of the machine - /// Serialized Name: Machine.properties + /// + /// The list of available upgrade versions for agent pools. + /// Serialized Name: ManagedClusterUpgradeProfile.properties.agentPoolProfiles /// - /// A new instance for mocking. - public static ContainerServiceMachineData ContainerServiceMachineData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable zones = null, ContainerServiceMachineProperties properties = null) + /// A new instance for mocking. + public static ManagedClusterUpgradeProfileData ManagedClusterUpgradeProfileData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ManagedClusterPoolUpgradeProfile controlPlaneProfile = null, IEnumerable agentPoolProfiles = null) { - zones ??= new List(); + agentPoolProfiles ??= new List(); - return new ContainerServiceMachineData( + return new ManagedClusterUpgradeProfileData( id, name, resourceType, systemData, - zones?.ToList(), - properties, + controlPlaneProfile, + agentPoolProfiles?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// network properties of the machine - /// Serialized Name: MachineProperties.network - /// - /// - /// Azure resource id of the machine. It can be used to GET underlying VM Instance - /// Serialized Name: MachineProperties.resourceId - /// - /// A new instance for mocking. - public static ContainerServiceMachineProperties ContainerServiceMachineProperties(IEnumerable networkIPAddresses = null, ResourceIdentifier resourceId = null) - { - networkIPAddresses ??= new List(); - - return new ContainerServiceMachineProperties(networkIPAddresses != null ? new MachineNetworkProperties(networkIPAddresses?.ToList(), serializedAdditionalRawData: null) : null, resourceId, serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// - /// To determine if address belongs IPv4 or IPv6 family - /// Serialized Name: MachineIpAddress.family - /// - /// - /// IPv4 or IPv6 address of the machine - /// Serialized Name: MachineIpAddress.ip - /// - /// A new instance for mocking. - public static ContainerServiceMachineIPAddress ContainerServiceMachineIPAddress(ContainerServiceIPFamily? family = null, string ip = null) - { - return new ContainerServiceMachineIPAddress(family, ip, serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// major.minor version of Kubernetes release. /// Capabilities on this Kubernetes version. @@ -2142,163 +2087,5 @@ public static KubernetesVersion KubernetesVersion(string version, IEnumerable 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, nodePublicIPPrefixId: nodePublicIPPrefixId, scaleSetPriority: scaleSetPriority, scaleSetEvictionPolicy: scaleSetEvictionPolicy, spotMaxPrice: spotMaxPrice, tags: tags, nodeLabels: nodeLabels, nodeTaints: nodeTaints, proximityPlacementGroupId: proximityPlacementGroupId, kubeletConfig: kubeletConfig, linuxOSConfig: linuxOSConfig, enableEncryptionAtHost: enableEncryptionAtHost, enableUltraSsd: enableUltraSsd, enableFips: enableFips, gpuInstanceProfile: gpuInstanceProfile, creationDataSourceResourceId: creationDataSourceResourceId, capacityReservationGroupId: capacityReservationGroupId, hostGroupId: hostGroupId, networkProfile: networkProfile, isOutboundNatDisabled: default, securityProfile: default, gpuDriver: default, gatewayPublicIPPrefixSize: default, scaleManual: default, virtualMachineNodesStatus: default, statusProvisioningError: default, localDnsProfile: default, name: name); - } - - /// 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) - { - 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, nodePublicIPPrefixId: nodePublicIPPrefixId, scaleSetPriority: scaleSetPriority, scaleSetEvictionPolicy: scaleSetEvictionPolicy, spotMaxPrice: spotMaxPrice, tags: tags, nodeLabels: nodeLabels, nodeTaints: nodeTaints, proximityPlacementGroupId: proximityPlacementGroupId, kubeletConfig: kubeletConfig, linuxOSConfig: linuxOSConfig, enableEncryptionAtHost: enableEncryptionAtHost, enableUltraSsd: enableUltraSsd, enableFips: enableFips, gpuInstanceProfile: gpuInstanceProfile, creationDataSourceResourceId: creationDataSourceResourceId, capacityReservationGroupId: capacityReservationGroupId, hostGroupId: hostGroupId, networkProfile: networkProfile, isOutboundNatDisabled: default, securityProfile: default, gpuDriver: default, gatewayPublicIPPrefixSize: default, scaleManual: default, virtualMachineNodesStatus: default, statusProvisioningError: default, localDnsProfile: 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, nodePublicIPPrefixId: nodePublicIPPrefixId, scaleSetPriority: scaleSetPriority, scaleSetEvictionPolicy: scaleSetEvictionPolicy, spotMaxPrice: spotMaxPrice, tags: tags, nodeLabels: nodeLabels, nodeTaints: nodeTaints, proximityPlacementGroupId: proximityPlacementGroupId, kubeletConfig: kubeletConfig, linuxOSConfig: linuxOSConfig, enableEncryptionAtHost: enableEncryptionAtHost, enableUltraSsd: enableUltraSsd, enableFips: enableFips, gpuInstanceProfile: gpuInstanceProfile, creationDataSourceResourceId: creationDataSourceResourceId, capacityReservationGroupId: capacityReservationGroupId, hostGroupId: hostGroupId, networkProfile: networkProfile, isOutboundNatDisabled: default, securityProfile: default, gpuDriver: default, gatewayPublicIPPrefixSize: default, scaleManual: default, virtualMachineNodesStatus: default, statusProvisioningError: default, localDnsProfile: default); - } } } 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 9cc1c065410a..708e63785de4 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs @@ -378,7 +378,7 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo PodIPAllocationMode? podIPAllocationMode = default; int? maxPods = default; ContainerServiceOSType? osType = default; - ContainerServiceOSSku? osSku = default; + Ossku? osSku = default; int? maxCount = default; int? minCount = default; bool? enableAutoScaling = default; @@ -571,7 +571,7 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo { continue; } - osSku = new ContainerServiceOSSku(property0.Value.GetString()); + osSku = new Ossku(property0.Value.GetString()); continue; } if (property0.NameEquals("maxCount"u8)) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs index 9194fea74558..2b6c4a7cd44f 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs @@ -184,11 +184,11 @@ public ContainerServiceAgentPoolData() /// Serialized Name: AgentPool.properties.nodePublicIPPrefixID /// /// - /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// The Virtual Machine Scale Set priority. /// Serialized Name: AgentPool.properties.scaleSetPriority /// /// - /// The Virtual Machine Scale Set eviction policy to use. This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// Serialized Name: AgentPool.properties.scaleSetEvictionPolicy /// /// @@ -240,7 +240,7 @@ public ContainerServiceAgentPoolData() /// Serialized Name: AgentPool.properties.creationData /// /// - /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved group of Virtual Machines. This is of the form: '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' Customers use it to create an agentpool with a specified CRG. For more information see [Capacity Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview) /// Serialized Name: AgentPool.properties.capacityReservationGroupID /// /// @@ -284,7 +284,7 @@ public ContainerServiceAgentPoolData() /// Serialized Name: AgentPool.properties.localDNSProfile /// /// Keeps track of any properties unknown to the library. - 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, 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, 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, Ossku? 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ETag = etag; Count = count; @@ -426,7 +426,7 @@ internal ContainerServiceAgentPoolData(ResourceIdentifier id, string name, Resou /// Serialized Name: AgentPool.properties.osSKU /// [WirePath("properties.osSKU")] - public ContainerServiceOSSku? OSSku { get; set; } + public Ossku? OSSku { get; set; } /// /// The maximum number of nodes for auto-scaling /// Serialized Name: AgentPool.properties.maxCount @@ -533,13 +533,13 @@ public ContainerServiceStateCode? PowerStateCode [WirePath("properties.nodePublicIPPrefixID")] public ResourceIdentifier NodePublicIPPrefixId { get; set; } /// - /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// The Virtual Machine Scale Set priority. /// Serialized Name: AgentPool.properties.scaleSetPriority /// [WirePath("properties.scaleSetPriority")] public ScaleSetPriority? ScaleSetPriority { get; set; } /// - /// The Virtual Machine Scale Set eviction policy to use. This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// Serialized Name: AgentPool.properties.scaleSetEvictionPolicy /// [WirePath("properties.scaleSetEvictionPolicy")] @@ -632,7 +632,7 @@ public ResourceIdentifier CreationDataSourceResourceId } /// - /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved group of Virtual Machines. This is of the form: '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' Customers use it to create an agentpool with a specified CRG. For more information see [Capacity Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview) /// Serialized Name: AgentPool.properties.capacityReservationGroupID /// [WirePath("properties.capacityReservationGroupID")] diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.cs index 0a3009fa85fc..9b95a4f84048 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolResource.cs @@ -125,7 +125,7 @@ public virtual ContainerServiceMachineCollection GetContainerServiceMachines() /// /// /// - /// host name of the machine. + /// Host name of the machine. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -156,7 +156,7 @@ public virtual async Task> GetContaine /// /// /// - /// host name of the machine. + /// Host name of the machine. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -435,7 +435,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/abort /// /// /// Operation Id @@ -477,7 +477,7 @@ public virtual async Task AbortLatestOperationAsync(WaitUntil wait /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/abort /// /// /// Operation Id @@ -636,7 +636,7 @@ public virtual async Task UpgradeNodeImageVersionAsync(WaitUntil w try { var response = await _containerServiceAgentPoolAgentPoolsRestClient.UpgradeNodeImageVersionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceArmOperation(_containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateUpgradeNodeImageVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerServiceArmOperation(_containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateUpgradeNodeImageVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -678,7 +678,7 @@ public virtual ArmOperation UpgradeNodeImageVersion(WaitUntil waitUntil, Cancell try { var response = _containerServiceAgentPoolAgentPoolsRestClient.UpgradeNodeImageVersion(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ContainerServiceArmOperation(_containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateUpgradeNodeImageVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerServiceArmOperation(_containerServiceAgentPoolAgentPoolsClientDiagnostics, Pipeline, _containerServiceAgentPoolAgentPoolsRestClient.CreateUpgradeNodeImageVersionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineCollection.cs index 42b2a66794e7..f967bd9a805b 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineCollection.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineCollection.cs @@ -72,7 +72,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// host name of the machine. + /// Host name of the machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -117,7 +117,7 @@ public virtual async Task> GetAsync(st /// /// /// - /// host name of the machine. + /// Host name of the machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -222,7 +222,7 @@ public virtual Pageable GetAll(CancellationToke /// /// /// - /// host name of the machine. + /// Host name of the machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -265,7 +265,7 @@ public virtual async Task> ExistsAsync(string machineName, Cancel /// /// /// - /// host name of the machine. + /// Host name of the machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -308,7 +308,7 @@ public virtual Response Exists(string machineName, CancellationToken cance /// /// /// - /// host name of the machine. + /// Host name of the machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -353,7 +353,7 @@ public virtual async Task> Get /// /// /// - /// host name of the machine. + /// Host name of the machine. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineData.Serialization.cs index 7ff16eeef6b1..d5360e816209 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineData.Serialization.cs @@ -39,6 +39,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } if (options.Format != "W" && Optional.IsCollectionDefined(Zones)) { writer.WritePropertyName("zones"u8); @@ -49,11 +54,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } - if (options.Format != "W" && Optional.IsDefined(Properties)) - { - writer.WritePropertyName("properties"u8); - writer.WriteObjectValue(Properties, options); - } } ContainerServiceMachineData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -76,8 +76,8 @@ internal static ContainerServiceMachineData DeserializeContainerServiceMachineDa { return null; } - IReadOnlyList zones = default; ContainerServiceMachineProperties properties = default; + IReadOnlyList zones = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -86,27 +86,27 @@ internal static ContainerServiceMachineData DeserializeContainerServiceMachineDa Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("zones"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - zones = array; + properties = ContainerServiceMachineProperties.DeserializeContainerServiceMachineProperties(property.Value, options); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("zones"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - properties = ContainerServiceMachineProperties.DeserializeContainerServiceMachineProperties(property.Value, options); + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; continue; } if (property.NameEquals("id"u8)) @@ -144,8 +144,8 @@ internal static ContainerServiceMachineData DeserializeContainerServiceMachineDa name, type, systemData, - zones ?? new ChangeTrackingList(), properties, + zones ?? new ChangeTrackingList(), serializedAdditionalRawData); } @@ -183,6 +183,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" properties: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(Properties)) + { + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + } + } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Zones), out propertyOverride); if (hasPropertyOverride) { @@ -219,21 +234,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" properties: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(Properties)) - { - builder.Append(" properties: "); - BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Id), out propertyOverride); if (hasPropertyOverride) { diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineData.cs index f3e3ea8154df..4241d40c7e23 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMachineData.cs @@ -63,33 +63,33 @@ public ContainerServiceMachineData() /// The name. /// The resourceType. /// The systemData. - /// - /// The Availability zone in which machine is located. - /// Serialized Name: Machine.zones - /// /// /// The properties of the machine /// Serialized Name: Machine.properties /// + /// + /// The Availability zone in which machine is located. + /// Serialized Name: Machine.zones + /// /// Keeps track of any properties unknown to the library. - internal ContainerServiceMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList zones, ContainerServiceMachineProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ContainerServiceMachineData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ContainerServiceMachineProperties properties, IReadOnlyList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - Zones = zones; Properties = properties; + Zones = zones; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// + /// The properties of the machine + /// Serialized Name: Machine.properties + /// + [WirePath("properties")] + public ContainerServiceMachineProperties Properties { get; set; } /// /// The Availability zone in which machine is located. /// Serialized Name: Machine.zones /// [WirePath("zones")] public IReadOnlyList Zones { get; } - /// - /// The properties of the machine - /// Serialized Name: Machine.properties - /// - [WirePath("properties")] - public ContainerServiceMachineProperties Properties { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs index fd791bba6cd2..c6b2b7192506 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs @@ -41,21 +41,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsCollectionDefined(TimesInWeek)) + if (Optional.IsCollectionDefined(TimeInWeek)) { writer.WritePropertyName("timeInWeek"u8); writer.WriteStartArray(); - foreach (var item in TimesInWeek) + foreach (var item in TimeInWeek) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(NotAllowedTimes)) + if (Optional.IsCollectionDefined(NotAllowedTime)) { writer.WritePropertyName("notAllowedTime"u8); writer.WriteStartArray(); - foreach (var item in NotAllowedTimes) + foreach (var item in NotAllowedTime) { writer.WriteObjectValue(item, options); } @@ -256,7 +256,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.Append(" properties:"); builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimesInWeek), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeInWeek), out propertyOverride); if (hasPropertyOverride) { builder.Append(" timeInWeek: "); @@ -264,13 +264,13 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsCollectionDefined(TimesInWeek)) + if (Optional.IsCollectionDefined(TimeInWeek)) { - if (TimesInWeek.Any()) + if (TimeInWeek.Any()) { builder.Append(" timeInWeek: "); builder.AppendLine("["); - foreach (var item in TimesInWeek) + foreach (var item in TimeInWeek) { BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " timeInWeek: "); } @@ -279,7 +279,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NotAllowedTimes), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NotAllowedTime), out propertyOverride); if (hasPropertyOverride) { builder.Append(" notAllowedTime: "); @@ -287,13 +287,13 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsCollectionDefined(NotAllowedTimes)) + if (Optional.IsCollectionDefined(NotAllowedTime)) { - if (NotAllowedTimes.Any()) + if (NotAllowedTime.Any()) { builder.Append(" notAllowedTime: "); builder.AppendLine("["); - foreach (var item in NotAllowedTimes) + foreach (var item in NotAllowedTime) { BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " notAllowedTime: "); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.cs index 1d714f6dd3dc..daee1103de93 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.cs @@ -55,8 +55,8 @@ public partial class ContainerServiceMaintenanceConfigurationData : ResourceData /// Initializes a new instance of . public ContainerServiceMaintenanceConfigurationData() { - TimesInWeek = new ChangeTrackingList(); - NotAllowedTimes = new ChangeTrackingList(); + TimeInWeek = new ChangeTrackingList(); + NotAllowedTime = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -64,11 +64,11 @@ public ContainerServiceMaintenanceConfigurationData() /// The name. /// The resourceType. /// The systemData. - /// + /// /// Time slots during the week when planned maintenance is allowed to proceed. If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. /// Serialized Name: MaintenanceConfiguration.properties.timeInWeek /// - /// + /// /// Time slots on which upgrade is not allowed. /// Serialized Name: MaintenanceConfiguration.properties.notAllowedTime /// @@ -77,10 +77,10 @@ public ContainerServiceMaintenanceConfigurationData() /// Serialized Name: MaintenanceConfiguration.properties.maintenanceWindow /// /// Keeps track of any properties unknown to the library. - internal ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList timesInWeek, IList notAllowedTimes, ContainerServiceMaintenanceWindow maintenanceWindow, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList timeInWeek, IList notAllowedTime, ContainerServiceMaintenanceWindow maintenanceWindow, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - TimesInWeek = timesInWeek; - NotAllowedTimes = notAllowedTimes; + TimeInWeek = timeInWeek; + NotAllowedTime = notAllowedTime; MaintenanceWindow = maintenanceWindow; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -90,13 +90,13 @@ internal ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id, str /// Serialized Name: MaintenanceConfiguration.properties.timeInWeek /// [WirePath("properties.timeInWeek")] - public IList TimesInWeek { get; } + public IList TimeInWeek { get; } /// /// Time slots on which upgrade is not allowed. /// Serialized Name: MaintenanceConfiguration.properties.notAllowedTime /// [WirePath("properties.notAllowedTime")] - public IList NotAllowedTimes { get; } + public IList NotAllowedTime { get; } /// /// Maintenance window for the maintenance configuration. /// Serialized Name: MaintenanceConfiguration.properties.maintenanceWindow diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.cs index e452718dd307..1747d8988205 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterData.cs @@ -71,7 +71,7 @@ public ContainerServiceManagedClusterData(AzureLocation location) : base(locatio /// 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. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. /// Serialized Name: ManagedCluster.eTag /// /// @@ -332,7 +332,7 @@ 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. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. /// Serialized Name: ManagedCluster.eTag /// [WirePath("eTag")] diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.cs index 3ef53fa7bf07..f0d6cdb2d074 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceManagedClusterResource.cs @@ -103,13 +103,6 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets an object representing a ManagedClusterUpgradeProfileResource along with the instance operations that can be performed on it in the ContainerServiceManagedCluster. - /// Returns a object. - public virtual ManagedClusterUpgradeProfileResource GetManagedClusterUpgradeProfile() - { - return new ManagedClusterUpgradeProfileResource(Client, Id.AppendChildResource("upgradeProfiles", "default")); - } - /// Gets a collection of MeshUpgradeProfileResources in the ContainerServiceManagedCluster. /// An object representing collection of MeshUpgradeProfileResources and their operations over a MeshUpgradeProfileResource. public virtual MeshUpgradeProfileCollection GetMeshUpgradeProfiles() @@ -179,23 +172,30 @@ public virtual Response GetMeshUpgradeProfile(string return GetMeshUpgradeProfiles().Get(mode, cancellationToken); } - /// Gets a collection of ContainerServiceMaintenanceConfigurationResources in the ContainerServiceManagedCluster. - /// An object representing collection of ContainerServiceMaintenanceConfigurationResources and their operations over a ContainerServiceMaintenanceConfigurationResource. - public virtual ContainerServiceMaintenanceConfigurationCollection GetContainerServiceMaintenanceConfigurations() + /// Gets an object representing a ManagedClusterUpgradeProfileResource along with the instance operations that can be performed on it in the ContainerServiceManagedCluster. + /// Returns a object. + public virtual ManagedClusterUpgradeProfileResource GetManagedClusterUpgradeProfile() { - return GetCachedClient(client => new ContainerServiceMaintenanceConfigurationCollection(client, Id)); + return new ManagedClusterUpgradeProfileResource(Client, Id.AppendChildResource("upgradeProfiles", "default")); + } + + /// Gets a collection of ContainerServiceAgentPoolResources in the ContainerServiceManagedCluster. + /// An object representing collection of ContainerServiceAgentPoolResources and their operations over a ContainerServiceAgentPoolResource. + public virtual ContainerServiceAgentPoolCollection GetContainerServiceAgentPools() + { + return GetCachedClient(client => new ContainerServiceAgentPoolCollection(client, Id)); } /// - /// Gets the specified maintenance configuration of a managed cluster. + /// Gets the specified managed cluster agent pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName} /// /// /// Operation Id - /// MaintenanceConfigurations_Get + /// AgentPools_Get /// /// /// Default Api Version @@ -203,30 +203,30 @@ public virtual ContainerServiceMaintenanceConfigurationCollection GetContainerSe /// /// /// Resource - /// + /// /// /// /// - /// The name of the maintenance configuration. Supported values are 'default', 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + /// The name of the agent pool. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetContainerServiceMaintenanceConfigurationAsync(string configName, CancellationToken cancellationToken = default) + public virtual async Task> GetContainerServiceAgentPoolAsync(string agentPoolName, CancellationToken cancellationToken = default) { - return await GetContainerServiceMaintenanceConfigurations().GetAsync(configName, cancellationToken).ConfigureAwait(false); + return await GetContainerServiceAgentPools().GetAsync(agentPoolName, cancellationToken).ConfigureAwait(false); } /// - /// Gets the specified maintenance configuration of a managed cluster. + /// Gets the specified managed cluster agent pool. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName} /// /// /// Operation Id - /// MaintenanceConfigurations_Get + /// AgentPools_Get /// /// /// Default Api Version @@ -234,37 +234,37 @@ public virtual async Task /// /// Resource - /// + /// /// /// /// - /// The name of the maintenance configuration. Supported values are 'default', 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. + /// The name of the agent pool. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetContainerServiceMaintenanceConfiguration(string configName, CancellationToken cancellationToken = default) + public virtual Response GetContainerServiceAgentPool(string agentPoolName, CancellationToken cancellationToken = default) { - return GetContainerServiceMaintenanceConfigurations().Get(configName, cancellationToken); + return GetContainerServiceAgentPools().Get(agentPoolName, cancellationToken); } - /// Gets a collection of ManagedClusterNamespaceResources in the ContainerServiceManagedCluster. - /// An object representing collection of ManagedClusterNamespaceResources and their operations over a ManagedClusterNamespaceResource. - public virtual ManagedClusterNamespaceCollection GetManagedClusterNamespaces() + /// Gets a collection of ContainerServiceMaintenanceConfigurationResources in the ContainerServiceManagedCluster. + /// An object representing collection of ContainerServiceMaintenanceConfigurationResources and their operations over a ContainerServiceMaintenanceConfigurationResource. + public virtual ContainerServiceMaintenanceConfigurationCollection GetContainerServiceMaintenanceConfigurations() { - return GetCachedClient(client => new ManagedClusterNamespaceCollection(client, Id)); + return GetCachedClient(client => new ContainerServiceMaintenanceConfigurationCollection(client, Id)); } /// - /// Gets the specified namespace of a managed cluster. + /// Gets the specified maintenance configuration of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName} /// /// /// Operation Id - /// ManagedNamespaces_Get + /// MaintenanceConfigurations_Get /// /// /// Default Api Version @@ -272,30 +272,30 @@ public virtual ManagedClusterNamespaceCollection GetManagedClusterNamespaces() /// /// /// Resource - /// + /// /// /// /// - /// The name of the managed namespace. + /// The name of the maintenance configuration. Supported values are 'default', 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetManagedClusterNamespaceAsync(string managedNamespaceName, CancellationToken cancellationToken = default) + public virtual async Task> GetContainerServiceMaintenanceConfigurationAsync(string configName, CancellationToken cancellationToken = default) { - return await GetManagedClusterNamespaces().GetAsync(managedNamespaceName, cancellationToken).ConfigureAwait(false); + return await GetContainerServiceMaintenanceConfigurations().GetAsync(configName, cancellationToken).ConfigureAwait(false); } /// - /// Gets the specified namespace of a managed cluster. + /// Gets the specified maintenance configuration of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName} /// /// /// Operation Id - /// ManagedNamespaces_Get + /// MaintenanceConfigurations_Get /// /// /// Default Api Version @@ -303,37 +303,37 @@ public virtual async Task> GetManagedC /// /// /// Resource - /// + /// /// /// /// - /// The name of the managed namespace. + /// The name of the maintenance configuration. Supported values are 'default', 'aksManagedAutoUpgradeSchedule', or 'aksManagedNodeOSUpgradeSchedule'. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetManagedClusterNamespace(string managedNamespaceName, CancellationToken cancellationToken = default) + public virtual Response GetContainerServiceMaintenanceConfiguration(string configName, CancellationToken cancellationToken = default) { - return GetManagedClusterNamespaces().Get(managedNamespaceName, cancellationToken); + return GetContainerServiceMaintenanceConfigurations().Get(configName, cancellationToken); } - /// Gets a collection of ContainerServiceAgentPoolResources in the ContainerServiceManagedCluster. - /// An object representing collection of ContainerServiceAgentPoolResources and their operations over a ContainerServiceAgentPoolResource. - public virtual ContainerServiceAgentPoolCollection GetContainerServiceAgentPools() + /// Gets a collection of ManagedClusterNamespaceResources in the ContainerServiceManagedCluster. + /// An object representing collection of ManagedClusterNamespaceResources and their operations over a ManagedClusterNamespaceResource. + public virtual ManagedClusterNamespaceCollection GetManagedClusterNamespaces() { - return GetCachedClient(client => new ContainerServiceAgentPoolCollection(client, Id)); + return GetCachedClient(client => new ManagedClusterNamespaceCollection(client, Id)); } /// - /// Gets the specified managed cluster agent pool. + /// Gets the specified namespace of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName} /// /// /// Operation Id - /// AgentPools_Get + /// ManagedNamespaces_Get /// /// /// Default Api Version @@ -341,30 +341,30 @@ public virtual ContainerServiceAgentPoolCollection GetContainerServiceAgentPools /// /// /// Resource - /// + /// /// /// /// - /// The name of the agent pool. + /// The name of the managed namespace. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetContainerServiceAgentPoolAsync(string agentPoolName, CancellationToken cancellationToken = default) + public virtual async Task> GetManagedClusterNamespaceAsync(string managedNamespaceName, CancellationToken cancellationToken = default) { - return await GetContainerServiceAgentPools().GetAsync(agentPoolName, cancellationToken).ConfigureAwait(false); + return await GetManagedClusterNamespaces().GetAsync(managedNamespaceName, cancellationToken).ConfigureAwait(false); } /// - /// Gets the specified managed cluster agent pool. + /// Gets the specified namespace of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/managedNamespaces/{managedNamespaceName} /// /// /// Operation Id - /// AgentPools_Get + /// ManagedNamespaces_Get /// /// /// Default Api Version @@ -372,18 +372,18 @@ public virtual async Task> GetContai /// /// /// Resource - /// + /// /// /// /// - /// The name of the agent pool. + /// The name of the managed namespace. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetContainerServiceAgentPool(string agentPoolName, CancellationToken cancellationToken = default) + public virtual Response GetManagedClusterNamespace(string managedNamespaceName, CancellationToken cancellationToken = default) { - return GetContainerServiceAgentPools().Get(agentPoolName, cancellationToken); + return GetManagedClusterNamespaces().Get(managedNamespaceName, cancellationToken); } /// Gets a collection of ContainerServicePrivateEndpointConnectionResources in the ContainerServiceManagedCluster. @@ -785,36 +785,39 @@ public virtual ArmOperation Update(WaitU } /// - /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . + /// 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. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/abort /// /// /// Operation Id - /// ManagedClusters_GetAccessProfile + /// ManagedClusters_AbortLatestOperation /// /// /// Default Api Version /// 2025-10-01 /// + /// + /// Resource + /// + /// /// /// - /// The name of the role for managed cluster accessProfile 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. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAccessProfileAsync(string roleName, CancellationToken cancellationToken = default) + public virtual async Task AbortLatestOperationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(roleName, nameof(roleName)); - - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetAccessProfile"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.AbortLatestOperation"); scope.Start(); try { - var response = await _containerServiceManagedClusterManagedClustersRestClient.GetAccessProfileAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, cancellationToken).ConfigureAwait(false); - return response; + 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; } catch (Exception e) { @@ -824,36 +827,39 @@ public virtual async Task> GetAccessProfil } /// - /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . + /// 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. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/abort /// /// /// Operation Id - /// ManagedClusters_GetAccessProfile + /// ManagedClusters_AbortLatestOperation /// /// /// Default Api Version /// 2025-10-01 /// + /// + /// Resource + /// + /// /// /// - /// The name of the role for managed cluster accessProfile 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. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetAccessProfile(string roleName, CancellationToken cancellationToken = default) + public virtual ArmOperation AbortLatestOperation(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(roleName, nameof(roleName)); - - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetAccessProfile"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.AbortLatestOperation"); scope.Start(); try { - var response = _containerServiceManagedClusterManagedClustersRestClient.GetAccessProfile(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, cancellationToken); - return response; + 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; } catch (Exception e) { @@ -863,35 +869,35 @@ public virtual Response GetAccessProfile(string rol } /// - /// Lists the admin credentials of a managed cluster. + /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential /// /// /// Operation Id - /// ManagedClusters_ListClusterAdminCredentials + /// ManagedClusters_GetAccessProfile /// /// /// Default Api Version /// 2025-10-01 /// - /// - /// Resource - /// - /// /// /// - /// server fqdn type for credentials to be returned. + /// The name of the role for managed cluster accessProfile resource. /// The cancellation token to use. - public virtual async Task> GetClusterAdminCredentialsAsync(string serverFqdn = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAccessProfileAsync(string roleName, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterAdminCredentials"); + Argument.AssertNotNullOrEmpty(roleName, nameof(roleName)); + + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetAccessProfile"); scope.Start(); try { - var response = await _containerServiceManagedClusterManagedClustersRestClient.ListClusterAdminCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, cancellationToken).ConfigureAwait(false); + var response = await _containerServiceManagedClusterManagedClustersRestClient.GetAccessProfileAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -902,35 +908,35 @@ public virtual async Task> GetClusterAdminCr } /// - /// Lists the admin credentials of a managed cluster. + /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential /// /// /// Operation Id - /// ManagedClusters_ListClusterAdminCredentials + /// ManagedClusters_GetAccessProfile /// /// /// Default Api Version /// 2025-10-01 /// - /// - /// Resource - /// - /// /// /// - /// server fqdn type for credentials to be returned. + /// The name of the role for managed cluster accessProfile resource. /// The cancellation token to use. - public virtual Response GetClusterAdminCredentials(string serverFqdn = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetAccessProfile(string roleName, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterAdminCredentials"); + Argument.AssertNotNullOrEmpty(roleName, nameof(roleName)); + + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetAccessProfile"); scope.Start(); try { - var response = _containerServiceManagedClusterManagedClustersRestClient.ListClusterAdminCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, cancellationToken); + var response = _containerServiceManagedClusterManagedClustersRestClient.GetAccessProfile(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, roleName, cancellationToken); return response; } catch (Exception e) @@ -941,36 +947,35 @@ public virtual Response GetClusterAdminCredentials(st } /// - /// Lists the user credentials of a managed cluster. + /// Gets the results of a command which has been run on the Managed Cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId} /// /// /// Operation Id - /// ManagedClusters_ListClusterUserCredentials + /// ManagedClusters_GetCommandResult /// /// /// Default Api Version /// 2025-10-01 /// - /// - /// Resource - /// - /// /// /// - /// server fqdn type for credentials to be returned. - /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. + /// Id of the command. /// The cancellation token to use. - public virtual async Task> GetClusterUserCredentialsAsync(string serverFqdn = null, KubeConfigFormat? format = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetCommandResultAsync(string commandId, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterUserCredentials"); + Argument.AssertNotNullOrEmpty(commandId, nameof(commandId)); + + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetCommandResult"); scope.Start(); try { - var response = await _containerServiceManagedClusterManagedClustersRestClient.ListClusterUserCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, format, cancellationToken).ConfigureAwait(false); + var response = await _containerServiceManagedClusterManagedClustersRestClient.GetCommandResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, commandId, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -981,36 +986,35 @@ public virtual async Task> GetClusterUserCre } /// - /// Lists the user credentials of a managed cluster. + /// Gets the results of a command which has been run on the Managed Cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId} /// /// /// Operation Id - /// ManagedClusters_ListClusterUserCredentials + /// ManagedClusters_GetCommandResult /// /// /// Default Api Version /// 2025-10-01 /// - /// - /// Resource - /// - /// /// /// - /// server fqdn type for credentials to be returned. - /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. + /// Id of the command. /// The cancellation token to use. - public virtual Response GetClusterUserCredentials(string serverFqdn = null, KubeConfigFormat? format = null, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetCommandResult(string commandId, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterUserCredentials"); + Argument.AssertNotNullOrEmpty(commandId, nameof(commandId)); + + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetCommandResult"); scope.Start(); try { - var response = _containerServiceManagedClusterManagedClustersRestClient.ListClusterUserCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, format, cancellationToken); + var response = _containerServiceManagedClusterManagedClustersRestClient.GetCommandResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, commandId, cancellationToken); return response; } catch (Exception e) @@ -1021,15 +1025,15 @@ public virtual Response GetClusterUserCredentials(str } /// - /// Lists the cluster monitoring user credentials of a managed cluster. + /// Lists the admin credentials of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential /// /// /// Operation Id - /// ManagedClusters_ListClusterMonitoringUserCredentials + /// ManagedClusters_ListClusterAdminCredentials /// /// /// Default Api Version @@ -1043,13 +1047,13 @@ public virtual Response GetClusterUserCredentials(str /// /// server fqdn type for credentials to be returned. /// The cancellation token to use. - public virtual async Task> GetClusterMonitoringUserCredentialsAsync(string serverFqdn = null, CancellationToken cancellationToken = default) + public virtual async Task> GetClusterAdminCredentialsAsync(string serverFqdn = null, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterMonitoringUserCredentials"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterAdminCredentials"); scope.Start(); try { - var response = await _containerServiceManagedClusterManagedClustersRestClient.ListClusterMonitoringUserCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, cancellationToken).ConfigureAwait(false); + var response = await _containerServiceManagedClusterManagedClustersRestClient.ListClusterAdminCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -1060,15 +1064,15 @@ public virtual async Task> GetClusterMonitor } /// - /// Lists the cluster monitoring user credentials of a managed cluster. + /// Lists the admin credentials of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential /// /// /// Operation Id - /// ManagedClusters_ListClusterMonitoringUserCredentials + /// ManagedClusters_ListClusterAdminCredentials /// /// /// Default Api Version @@ -1082,13 +1086,13 @@ public virtual async Task> GetClusterMonitor /// /// server fqdn type for credentials to be returned. /// The cancellation token to use. - public virtual Response GetClusterMonitoringUserCredentials(string serverFqdn = null, CancellationToken cancellationToken = default) + public virtual Response GetClusterAdminCredentials(string serverFqdn = null, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterMonitoringUserCredentials"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterAdminCredentials"); scope.Start(); try { - var response = _containerServiceManagedClusterManagedClustersRestClient.ListClusterMonitoringUserCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, cancellationToken); + var response = _containerServiceManagedClusterManagedClustersRestClient.ListClusterAdminCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, cancellationToken); return response; } catch (Exception e) @@ -1099,15 +1103,15 @@ public virtual Response GetClusterMonitoringUserCrede } /// - /// This action cannot be performed on a cluster that is not using a service principal + /// Lists the cluster monitoring user credentials of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential /// /// /// Operation Id - /// ManagedClusters_ResetServicePrincipalProfile + /// ManagedClusters_ListClusterMonitoringUserCredentials /// /// /// Default Api Version @@ -1119,23 +1123,16 @@ public virtual Response GetClusterMonitoringUserCrede /// /// /// - /// 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 service principal profile to set on the managed cluster. + /// server fqdn type for credentials to be returned. /// The cancellation token to use. - /// is null. - public virtual async Task ResetServicePrincipalProfileAsync(WaitUntil waitUntil, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile, CancellationToken cancellationToken = default) + public virtual async Task> GetClusterMonitoringUserCredentialsAsync(string serverFqdn = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(managedClusterServicePrincipalProfile, nameof(managedClusterServicePrincipalProfile)); - - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.ResetServicePrincipalProfile"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterMonitoringUserCredentials"); scope.Start(); try { - var response = await _containerServiceManagedClusterManagedClustersRestClient.ResetServicePrincipalProfileAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterServicePrincipalProfile, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateResetServicePrincipalProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterServicePrincipalProfile).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _containerServiceManagedClusterManagedClustersRestClient.ListClusterMonitoringUserCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1145,15 +1142,15 @@ public virtual async Task ResetServicePrincipalProfileAsync(WaitUn } /// - /// This action cannot be performed on a cluster that is not using a service principal + /// Lists the cluster monitoring user credentials of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential /// /// /// Operation Id - /// ManagedClusters_ResetServicePrincipalProfile + /// ManagedClusters_ListClusterMonitoringUserCredentials /// /// /// Default Api Version @@ -1165,23 +1162,16 @@ public virtual async Task ResetServicePrincipalProfileAsync(WaitUn /// /// /// - /// 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 service principal profile to set on the managed cluster. + /// server fqdn type for credentials to be returned. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ResetServicePrincipalProfile(WaitUntil waitUntil, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile, CancellationToken cancellationToken = default) + public virtual Response GetClusterMonitoringUserCredentials(string serverFqdn = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(managedClusterServicePrincipalProfile, nameof(managedClusterServicePrincipalProfile)); - - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.ResetServicePrincipalProfile"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterMonitoringUserCredentials"); scope.Start(); try { - var response = _containerServiceManagedClusterManagedClustersRestClient.ResetServicePrincipalProfile(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterServicePrincipalProfile, cancellationToken); - var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateResetServicePrincipalProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterServicePrincipalProfile).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; + var response = _containerServiceManagedClusterManagedClustersRestClient.ListClusterMonitoringUserCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, cancellationToken); + return response; } catch (Exception e) { @@ -1191,15 +1181,15 @@ public virtual ArmOperation ResetServicePrincipalProfile(WaitUntil waitUntil, Ma } /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + /// Lists the user credentials of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential /// /// /// Operation Id - /// ManagedClusters_ResetAadProfile + /// ManagedClusters_ListClusterUserCredentials /// /// /// Default Api Version @@ -1211,23 +1201,17 @@ public virtual ArmOperation ResetServicePrincipalProfile(WaitUntil waitUntil, Ma /// /// /// - /// 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 AAD profile to set on the Managed Cluster. + /// server fqdn type for credentials to be returned. + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. /// The cancellation token to use. - /// is null. - public virtual async Task ResetAadProfileAsync(WaitUntil waitUntil, ManagedClusterAadProfile managedClusterAadProfile, CancellationToken cancellationToken = default) + public virtual async Task> GetClusterUserCredentialsAsync(string serverFqdn = null, KubeConfigFormat? format = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(managedClusterAadProfile, nameof(managedClusterAadProfile)); - - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.ResetAadProfile"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterUserCredentials"); scope.Start(); try { - var response = await _containerServiceManagedClusterManagedClustersRestClient.ResetAadProfileAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterAadProfile, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateResetAadProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterAadProfile).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; + var response = await _containerServiceManagedClusterManagedClustersRestClient.ListClusterUserCredentialsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, format, cancellationToken).ConfigureAwait(false); + return response; } catch (Exception e) { @@ -1237,15 +1221,15 @@ public virtual async Task ResetAadProfileAsync(WaitUntil waitUntil } /// - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + /// Lists the user credentials of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential /// /// /// Operation Id - /// ManagedClusters_ResetAadProfile + /// ManagedClusters_ListClusterUserCredentials /// /// /// Default Api Version @@ -1257,23 +1241,17 @@ public virtual async Task ResetAadProfileAsync(WaitUntil 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 AAD profile to set on the Managed Cluster. + /// server fqdn type for credentials to be returned. + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ResetAadProfile(WaitUntil waitUntil, ManagedClusterAadProfile managedClusterAadProfile, CancellationToken cancellationToken = default) + public virtual Response GetClusterUserCredentials(string serverFqdn = null, KubeConfigFormat? format = null, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(managedClusterAadProfile, nameof(managedClusterAadProfile)); - - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.ResetAadProfile"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetClusterUserCredentials"); scope.Start(); try { - var response = _containerServiceManagedClusterManagedClustersRestClient.ResetAadProfile(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterAadProfile, cancellationToken); - var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateResetAadProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterAadProfile).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; + var response = _containerServiceManagedClusterManagedClustersRestClient.ListClusterUserCredentials(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, serverFqdn, format, cancellationToken); + return response; } catch (Exception e) { @@ -1283,15 +1261,15 @@ 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. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints /// /// /// Operation Id - /// ManagedClusters_RotateClusterCertificates + /// ManagedClusters_ListOutboundNetworkDependenciesEndpoints /// /// /// Default Api Version @@ -1303,37 +1281,25 @@ 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) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateClusterCertificates"); - 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); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerServiceManagedClusterManagedClustersRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerServiceManagedClusterManagedClustersRestClient.CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ContainerServiceOutboundEnvironmentEndpoint.DeserializeContainerServiceOutboundEnvironmentEndpoint(e), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, "ContainerServiceManagedClusterResource.GetOutboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken); } /// - /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints /// /// /// Operation Id - /// ManagedClusters_RotateClusterCertificates + /// ManagedClusters_ListOutboundNetworkDependenciesEndpoints /// /// /// Default Api Version @@ -1345,37 +1311,25 @@ 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) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetOutboundNetworkDependenciesEndpoints(CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateClusterCertificates"); - 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); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } + HttpMessage FirstPageRequest(int? pageSizeHint) => _containerServiceManagedClusterManagedClustersRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerServiceManagedClusterManagedClustersRestClient.CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ContainerServiceOutboundEnvironmentEndpoint.DeserializeContainerServiceOutboundEnvironmentEndpoint(e), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, "ContainerServiceManagedClusterResource.GetOutboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken); } /// - /// 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. + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile /// /// /// Operation Id - /// ManagedClusters_AbortLatestOperation + /// ManagedClusters_ResetAadProfile /// /// /// Default Api Version @@ -1388,15 +1342,19 @@ 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 AAD profile to set on the Managed Cluster. /// The cancellation token to use. - public virtual async Task AbortLatestOperationAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task ResetAadProfileAsync(WaitUntil waitUntil, ManagedClusterAadProfile managedClusterAadProfile, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.AbortLatestOperation"); + Argument.AssertNotNull(managedClusterAadProfile, nameof(managedClusterAadProfile)); + + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.ResetAadProfile"); 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.ResetAadProfileAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterAadProfile, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateResetAadProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterAadProfile).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -1409,15 +1367,15 @@ 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. + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile /// /// /// Operation Id - /// ManagedClusters_AbortLatestOperation + /// ManagedClusters_ResetAadProfile /// /// /// Default Api Version @@ -1430,15 +1388,19 @@ 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 AAD profile to set on the Managed Cluster. /// The cancellation token to use. - public virtual ArmOperation AbortLatestOperation(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ResetAadProfile(WaitUntil waitUntil, ManagedClusterAadProfile managedClusterAadProfile, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.AbortLatestOperation"); + Argument.AssertNotNull(managedClusterAadProfile, nameof(managedClusterAadProfile)); + + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.ResetAadProfile"); 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.ResetAadProfile(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterAadProfile, cancellationToken); + var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateResetAadProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterAadProfile).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -1451,15 +1413,15 @@ public virtual ArmOperation AbortLatestOperation(WaitUntil waitUntil, Cancellati } /// - /// Rotates the service account signing keys of a managed cluster. + /// This action cannot be performed on a cluster that is not using a service principal /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile /// /// /// Operation Id - /// ManagedClusters_RotateServiceAccountSigningKeys + /// ManagedClusters_ResetServicePrincipalProfile /// /// /// Default Api Version @@ -1472,15 +1434,19 @@ public virtual ArmOperation AbortLatestOperation(WaitUntil waitUntil, Cancellati /// /// /// 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 service principal profile to set on the managed cluster. /// The cancellation token to use. - public virtual async Task RotateServiceAccountSigningKeysAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task ResetServicePrincipalProfileAsync(WaitUntil waitUntil, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateServiceAccountSigningKeys"); + Argument.AssertNotNull(managedClusterServicePrincipalProfile, nameof(managedClusterServicePrincipalProfile)); + + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.ResetServicePrincipalProfile"); scope.Start(); try { - var response = await _containerServiceManagedClusterManagedClustersRestClient.RotateServiceAccountSigningKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateRotateServiceAccountSigningKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _containerServiceManagedClusterManagedClustersRestClient.ResetServicePrincipalProfileAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterServicePrincipalProfile, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateResetServicePrincipalProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterServicePrincipalProfile).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -1493,15 +1459,15 @@ public virtual async Task RotateServiceAccountSigningKeysAsync(Wai } /// - /// Rotates the service account signing keys of a managed cluster. + /// This action cannot be performed on a cluster that is not using a service principal /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile /// /// /// Operation Id - /// ManagedClusters_RotateServiceAccountSigningKeys + /// ManagedClusters_ResetServicePrincipalProfile /// /// /// Default Api Version @@ -1514,15 +1480,19 @@ public virtual async Task RotateServiceAccountSigningKeysAsync(Wai /// /// /// 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 service principal profile to set on the managed cluster. /// The cancellation token to use. - public virtual ArmOperation RotateServiceAccountSigningKeys(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ResetServicePrincipalProfile(WaitUntil waitUntil, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateServiceAccountSigningKeys"); + Argument.AssertNotNull(managedClusterServicePrincipalProfile, nameof(managedClusterServicePrincipalProfile)); + + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.ResetServicePrincipalProfile"); scope.Start(); try { - var response = _containerServiceManagedClusterManagedClustersRestClient.RotateServiceAccountSigningKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateRotateServiceAccountSigningKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _containerServiceManagedClusterManagedClustersRestClient.ResetServicePrincipalProfile(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterServicePrincipalProfile, cancellationToken); + var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateResetServicePrincipalProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedClusterServicePrincipalProfile).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -1535,15 +1505,15 @@ public virtual ArmOperation RotateServiceAccountSigningKeys(WaitUntil waitUntil, } /// - /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. + /// 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}/stop + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates /// /// /// Operation Id - /// ManagedClusters_Stop + /// ManagedClusters_RotateClusterCertificates /// /// /// Default Api Version @@ -1557,14 +1527,14 @@ public virtual ArmOperation RotateServiceAccountSigningKeys(WaitUntil 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 async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task RotateClusterCertificatesAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.Stop"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateClusterCertificates"); scope.Start(); try { - var response = await _containerServiceManagedClusterManagedClustersRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateStopRequest(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); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -1577,15 +1547,15 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat } /// - /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. + /// 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}/stop + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates /// /// /// Operation Id - /// ManagedClusters_Stop + /// ManagedClusters_RotateClusterCertificates /// /// /// Default Api Version @@ -1599,14 +1569,14 @@ public virtual async Task StopAsync(WaitUntil waitUntil, Cancellat /// /// 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 Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation RotateClusterCertificates(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.Stop"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateClusterCertificates"); scope.Start(); try { - var response = _containerServiceManagedClusterManagedClustersRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateStopRequest(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); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -1619,15 +1589,15 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella } /// - /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// Rotates the service account signing keys of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys /// /// /// Operation Id - /// ManagedClusters_Start + /// ManagedClusters_RotateServiceAccountSigningKeys /// /// /// Default Api Version @@ -1641,14 +1611,14 @@ public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancella /// /// 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 StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual async Task RotateServiceAccountSigningKeysAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.Start"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateServiceAccountSigningKeys"); scope.Start(); try { - var response = await _containerServiceManagedClusterManagedClustersRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _containerServiceManagedClusterManagedClustersRestClient.RotateServiceAccountSigningKeysAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateRotateServiceAccountSigningKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -1661,15 +1631,15 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella } /// - /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// Rotates the service account signing keys of a managed cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys /// /// /// Operation Id - /// ManagedClusters_Start + /// ManagedClusters_RotateServiceAccountSigningKeys /// /// /// Default Api Version @@ -1683,14 +1653,14 @@ public virtual async Task StartAsync(WaitUntil waitUntil, Cancella /// /// 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 Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) + public virtual ArmOperation RotateServiceAccountSigningKeys(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.Start"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.RotateServiceAccountSigningKeys"); scope.Start(); try { - var response = _containerServiceManagedClusterManagedClustersRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _containerServiceManagedClusterManagedClustersRestClient.RotateServiceAccountSigningKeys(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateRotateServiceAccountSigningKeysRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -1795,36 +1765,39 @@ public virtual ArmOperation RunCommand(WaitUntil } /// - /// Gets the results of a command which has been run on the Managed Cluster. + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start /// /// /// Operation Id - /// ManagedClusters_GetCommandResult + /// ManagedClusters_Start /// /// /// Default Api Version /// 2025-10-01 /// + /// + /// Resource + /// + /// /// /// - /// Id of the command. + /// 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. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetCommandResultAsync(string commandId, CancellationToken cancellationToken = default) + public virtual async Task StartAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(commandId, nameof(commandId)); - - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetCommandResult"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.Start"); scope.Start(); try { - var response = await _containerServiceManagedClusterManagedClustersRestClient.GetCommandResultAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, commandId, cancellationToken).ConfigureAwait(false); - return response; + var response = await _containerServiceManagedClusterManagedClustersRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; } catch (Exception e) { @@ -1834,36 +1807,39 @@ public virtual async Task> GetCommandRe } /// - /// Gets the results of a command which has been run on the Managed Cluster. + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start /// /// /// Operation Id - /// ManagedClusters_GetCommandResult + /// ManagedClusters_Start /// /// /// Default Api Version /// 2025-10-01 /// + /// + /// Resource + /// + /// /// /// - /// Id of the command. + /// 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. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetCommandResult(string commandId, CancellationToken cancellationToken = default) + public virtual ArmOperation Start(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(commandId, nameof(commandId)); - - using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.GetCommandResult"); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.Start"); scope.Start(); try { - var response = _containerServiceManagedClusterManagedClustersRestClient.GetCommandResult(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, commandId, cancellationToken); - return response; + var response = _containerServiceManagedClusterManagedClustersRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; } catch (Exception e) { @@ -1873,15 +1849,15 @@ public virtual Response GetCommandResult(string } /// - /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop /// /// /// Operation Id - /// ManagedClusters_ListOutboundNetworkDependenciesEndpoints + /// ManagedClusters_Stop /// /// /// Default Api Version @@ -1893,25 +1869,37 @@ public virtual Response GetCommandResult(string /// /// /// + /// 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. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetOutboundNetworkDependenciesEndpointsAsync(CancellationToken cancellationToken = default) + public virtual async Task StopAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerServiceManagedClusterManagedClustersRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerServiceManagedClusterManagedClustersRestClient.CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ContainerServiceOutboundEnvironmentEndpoint.DeserializeContainerServiceOutboundEnvironmentEndpoint(e), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, "ContainerServiceManagedClusterResource.GetOutboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.Stop"); + scope.Start(); + try + { + var response = await _containerServiceManagedClusterManagedClustersRestClient.StopAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, 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; + } } /// - /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop /// /// /// Operation Id - /// ManagedClusters_ListOutboundNetworkDependenciesEndpoints + /// ManagedClusters_Stop /// /// /// Default Api Version @@ -1923,13 +1911,25 @@ public virtual AsyncPageable GetOut /// /// /// + /// 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. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetOutboundNetworkDependenciesEndpoints(CancellationToken cancellationToken = default) + public virtual ArmOperation Stop(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _containerServiceManagedClusterManagedClustersRestClient.CreateListOutboundNetworkDependenciesEndpointsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _containerServiceManagedClusterManagedClustersRestClient.CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ContainerServiceOutboundEnvironmentEndpoint.DeserializeContainerServiceOutboundEnvironmentEndpoint(e), _containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, "ContainerServiceManagedClusterResource.GetOutboundNetworkDependenciesEndpoints", "value", "nextLink", cancellationToken); + using var scope = _containerServiceManagedClusterManagedClustersClientDiagnostics.CreateScope("ContainerServiceManagedClusterResource.Stop"); + scope.Start(); + try + { + var response = _containerServiceManagedClusterManagedClustersRestClient.Stop(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new ContainerServiceArmOperation(_containerServiceManagedClusterManagedClustersClientDiagnostics, Pipeline, _containerServiceManagedClusterManagedClustersRestClient.CreateStopRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// 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 80a431d52fc1..d0210d1a1502 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/ContainerServiceExtensions.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/ContainerServiceExtensions.cs @@ -34,22 +34,22 @@ private static MockableContainerServiceSubscriptionResource GetMockableContainer } /// - /// 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. + /// 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. + /// 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 ManagedClusterUpgradeProfileResource GetManagedClusterUpgradeProfileResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static MeshRevisionProfileResource GetMeshRevisionProfileResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerServiceArmClient(client).GetManagedClusterUpgradeProfileResource(id); + return GetMockableContainerServiceArmClient(client).GetMeshRevisionProfileResource(id); } /// @@ -71,25 +71,6 @@ 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 MeshRevisionProfileResource GetMeshRevisionProfileResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableContainerServiceArmClient(client).GetMeshRevisionProfileResource(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. @@ -110,41 +91,41 @@ public static MeshUpgradeProfileResource GetMeshUpgradeProfileResource(this ArmC } /// - /// 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. + /// 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. + /// 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 ContainerServiceMaintenanceConfigurationResource GetContainerServiceMaintenanceConfigurationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedClusterUpgradeProfileResource GetManagedClusterUpgradeProfileResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerServiceArmClient(client).GetContainerServiceMaintenanceConfigurationResource(id); + return GetMockableContainerServiceArmClient(client).GetManagedClusterUpgradeProfileResource(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. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// Mocking - /// To mock this method, please mock instead. + /// 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 ManagedClusterNamespaceResource GetManagedClusterNamespaceResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AgentPoolSnapshotResource GetAgentPoolSnapshotResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerServiceArmClient(client).GetManagedClusterNamespaceResource(id); + return GetMockableContainerServiceArmClient(client).GetAgentPoolSnapshotResource(id); } /// @@ -186,79 +167,98 @@ public static AgentPoolUpgradeProfileResource GetAgentPoolUpgradeProfileResource } /// - /// 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. + /// 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. + /// 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 ContainerServicePrivateEndpointConnectionResource GetContainerServicePrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerServiceMachineResource GetContainerServiceMachineResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerServiceArmClient(client).GetContainerServicePrivateEndpointConnectionResource(id); + return GetMockableContainerServiceArmClient(client).GetContainerServiceMachineResource(id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// 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. + /// 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 AgentPoolSnapshotResource GetAgentPoolSnapshotResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerServiceMaintenanceConfigurationResource GetContainerServiceMaintenanceConfigurationResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerServiceArmClient(client).GetAgentPoolSnapshotResource(id); + return GetMockableContainerServiceArmClient(client).GetContainerServiceMaintenanceConfigurationResource(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. + /// 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. + /// 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 ContainerServiceTrustedAccessRoleBindingResource GetContainerServiceTrustedAccessRoleBindingResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ManagedClusterNamespaceResource GetManagedClusterNamespaceResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerServiceArmClient(client).GetContainerServiceTrustedAccessRoleBindingResource(id); + return GetMockableContainerServiceArmClient(client).GetManagedClusterNamespaceResource(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. + /// 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. + /// 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 ContainerServiceMachineResource GetContainerServiceMachineResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ContainerServicePrivateEndpointConnectionResource GetContainerServicePrivateEndpointConnectionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableContainerServiceArmClient(client).GetContainerServiceMachineResource(id); + return GetMockableContainerServiceArmClient(client).GetContainerServicePrivateEndpointConnectionResource(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 ContainerServiceTrustedAccessRoleBindingResource GetContainerServiceTrustedAccessRoleBindingResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableContainerServiceArmClient(client).GetContainerServiceTrustedAccessRoleBindingResource(id); } /// @@ -680,141 +680,141 @@ public static Pageable GetContainerServi } /// - /// Gets a list of snapshots in the specified subscription. + /// List supported trusted access roles. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles /// /// /// Operation Id - /// Snapshots_List + /// TrustedAccessRoles_List /// /// /// Default Api Version /// 2025-10-01 /// - /// - /// Resource - /// - /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The name of the Azure region. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetAgentPoolSnapshotsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetTrustedAccessRolesAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetAgentPoolSnapshotsAsync(cancellationToken); + return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetTrustedAccessRolesAsync(location, cancellationToken); } /// - /// Gets a list of snapshots in the specified subscription. + /// List supported trusted access roles. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles /// /// /// Operation Id - /// Snapshots_List + /// TrustedAccessRoles_List /// /// /// Default Api Version /// 2025-10-01 /// - /// - /// Resource - /// - /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The name of the Azure region. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetAgentPoolSnapshots(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetTrustedAccessRoles(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetAgentPoolSnapshots(cancellationToken); + return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetTrustedAccessRoles(location, cancellationToken); } /// - /// List supported trusted access roles. + /// Gets a list of snapshots in the specified subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots /// /// /// Operation Id - /// TrustedAccessRoles_List + /// Snapshots_List /// /// /// Default Api Version /// 2025-10-01 /// + /// + /// Resource + /// + /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the Azure region. /// The cancellation token to use. /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetTrustedAccessRolesAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAgentPoolSnapshotsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetTrustedAccessRolesAsync(location, cancellationToken); + return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetAgentPoolSnapshotsAsync(cancellationToken); } /// - /// List supported trusted access roles. + /// Gets a list of snapshots in the specified subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots /// /// /// Operation Id - /// TrustedAccessRoles_List + /// Snapshots_List /// /// /// Default Api Version /// 2025-10-01 /// + /// + /// Resource + /// + /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The name of the Azure region. /// The cancellation token to use. /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetTrustedAccessRoles(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAgentPoolSnapshots(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetTrustedAccessRoles(location, cancellationToken); + return GetMockableContainerServiceSubscriptionResource(subscriptionResource).GetAgentPoolSnapshots(cancellationToken); } } } 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 18c73d62f297..4e65fce2975b 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceArmClient.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceArmClient.cs @@ -35,15 +35,15 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// 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. + /// 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 ManagedClusterUpgradeProfileResource GetManagedClusterUpgradeProfileResource(ResourceIdentifier id) + /// Returns a object. + public virtual MeshRevisionProfileResource GetMeshRevisionProfileResource(ResourceIdentifier id) { - ManagedClusterUpgradeProfileResource.ValidateResourceId(id); - return new ManagedClusterUpgradeProfileResource(Client, id); + MeshRevisionProfileResource.ValidateResourceId(id); + return new MeshRevisionProfileResource(Client, id); } /// @@ -58,18 +58,6 @@ 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 MeshRevisionProfileResource GetMeshRevisionProfileResource(ResourceIdentifier id) - { - MeshRevisionProfileResource.ValidateResourceId(id); - return new MeshRevisionProfileResource(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. @@ -83,27 +71,27 @@ public virtual MeshUpgradeProfileResource GetMeshUpgradeProfileResource(Resource } /// - /// 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. + /// 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 ContainerServiceMaintenanceConfigurationResource GetContainerServiceMaintenanceConfigurationResource(ResourceIdentifier id) + /// Returns a object. + public virtual ManagedClusterUpgradeProfileResource GetManagedClusterUpgradeProfileResource(ResourceIdentifier id) { - ContainerServiceMaintenanceConfigurationResource.ValidateResourceId(id); - return new ContainerServiceMaintenanceConfigurationResource(Client, id); + ManagedClusterUpgradeProfileResource.ValidateResourceId(id); + return new ManagedClusterUpgradeProfileResource(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. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The resource ID of the resource to get. - /// Returns a object. - public virtual ManagedClusterNamespaceResource GetManagedClusterNamespaceResource(ResourceIdentifier id) + /// Returns a object. + public virtual AgentPoolSnapshotResource GetAgentPoolSnapshotResource(ResourceIdentifier id) { - ManagedClusterNamespaceResource.ValidateResourceId(id); - return new ManagedClusterNamespaceResource(Client, id); + AgentPoolSnapshotResource.ValidateResourceId(id); + return new AgentPoolSnapshotResource(Client, id); } /// @@ -131,51 +119,63 @@ public virtual AgentPoolUpgradeProfileResource GetAgentPoolUpgradeProfileResourc } /// - /// 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. + /// 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 ContainerServicePrivateEndpointConnectionResource GetContainerServicePrivateEndpointConnectionResource(ResourceIdentifier id) + /// Returns a object. + public virtual ContainerServiceMachineResource GetContainerServiceMachineResource(ResourceIdentifier id) { - ContainerServicePrivateEndpointConnectionResource.ValidateResourceId(id); - return new ContainerServicePrivateEndpointConnectionResource(Client, id); + ContainerServiceMachineResource.ValidateResourceId(id); + return new ContainerServiceMachineResource(Client, id); } /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// 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 AgentPoolSnapshotResource GetAgentPoolSnapshotResource(ResourceIdentifier id) + /// Returns a object. + public virtual ContainerServiceMaintenanceConfigurationResource GetContainerServiceMaintenanceConfigurationResource(ResourceIdentifier id) { - AgentPoolSnapshotResource.ValidateResourceId(id); - return new AgentPoolSnapshotResource(Client, id); + ContainerServiceMaintenanceConfigurationResource.ValidateResourceId(id); + return new ContainerServiceMaintenanceConfigurationResource(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. + /// 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 ContainerServiceTrustedAccessRoleBindingResource GetContainerServiceTrustedAccessRoleBindingResource(ResourceIdentifier id) + /// Returns a object. + public virtual ManagedClusterNamespaceResource GetManagedClusterNamespaceResource(ResourceIdentifier id) { - ContainerServiceTrustedAccessRoleBindingResource.ValidateResourceId(id); - return new ContainerServiceTrustedAccessRoleBindingResource(Client, id); + ManagedClusterNamespaceResource.ValidateResourceId(id); + return new ManagedClusterNamespaceResource(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. + /// 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 ContainerServiceMachineResource GetContainerServiceMachineResource(ResourceIdentifier id) + /// Returns a object. + public virtual ContainerServicePrivateEndpointConnectionResource GetContainerServicePrivateEndpointConnectionResource(ResourceIdentifier id) { - ContainerServiceMachineResource.ValidateResourceId(id); - return new ContainerServiceMachineResource(Client, id); + ContainerServicePrivateEndpointConnectionResource.ValidateResourceId(id); + return new ContainerServicePrivateEndpointConnectionResource(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 ContainerServiceTrustedAccessRoleBindingResource GetContainerServiceTrustedAccessRoleBindingResource(ResourceIdentifier id) + { + ContainerServiceTrustedAccessRoleBindingResource.ValidateResourceId(id); + return new ContainerServiceTrustedAccessRoleBindingResource(Client, id); } } } 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 d12460ebad66..98307c56302d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceSubscriptionResource.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Extensions/MockableContainerServiceSubscriptionResource.cs @@ -22,10 +22,10 @@ public partial class MockableContainerServiceSubscriptionResource : ArmResource private ManagedClustersRestOperations _managedClustersRestClient; private ClientDiagnostics _containerServiceManagedClusterManagedClustersClientDiagnostics; private ManagedClustersRestOperations _containerServiceManagedClusterManagedClustersRestClient; - private ClientDiagnostics _agentPoolSnapshotSnapshotsClientDiagnostics; - private SnapshotsRestOperations _agentPoolSnapshotSnapshotsRestClient; private ClientDiagnostics _trustedAccessRolesClientDiagnostics; private TrustedAccessRolesRestOperations _trustedAccessRolesRestClient; + private ClientDiagnostics _agentPoolSnapshotSnapshotsClientDiagnostics; + private SnapshotsRestOperations _agentPoolSnapshotSnapshotsRestClient; /// Initializes a new instance of the class for mocking. protected MockableContainerServiceSubscriptionResource() @@ -43,10 +43,10 @@ internal MockableContainerServiceSubscriptionResource(ArmClient client, Resource private ManagedClustersRestOperations ManagedClustersRestClient => _managedClustersRestClient ??= new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics ContainerServiceManagedClusterManagedClustersClientDiagnostics => _containerServiceManagedClusterManagedClustersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ContainerService", ContainerServiceManagedClusterResource.ResourceType.Namespace, Diagnostics); 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 TrustedAccessRolesClientDiagnostics => _trustedAccessRolesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ContainerService", ProviderConstants.DefaultProviderNamespace, Diagnostics); private TrustedAccessRolesRestOperations TrustedAccessRolesRestClient => _trustedAccessRolesRestClient ??= new TrustedAccessRolesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + 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 string GetApiVersionOrNull(ResourceType resourceType) { @@ -257,117 +257,117 @@ public virtual Pageable GetContainerServ } /// - /// Gets a list of snapshots in the specified subscription. + /// List supported trusted access roles. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles /// /// /// Operation Id - /// Snapshots_List + /// TrustedAccessRoles_List /// /// /// Default Api Version /// 2025-10-01 /// - /// - /// Resource - /// - /// /// /// + /// The name of the Azure region. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAgentPoolSnapshotsAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetTrustedAccessRolesAsync(AzureLocation location, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => AgentPoolSnapshotSnapshotsRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AgentPoolSnapshotSnapshotsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AgentPoolSnapshotResource(Client, AgentPoolSnapshotData.DeserializeAgentPoolSnapshotData(e)), AgentPoolSnapshotSnapshotsClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetAgentPoolSnapshots", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => TrustedAccessRolesRestClient.CreateListRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => TrustedAccessRolesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ContainerServiceTrustedAccessRole.DeserializeContainerServiceTrustedAccessRole(e), TrustedAccessRolesClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetTrustedAccessRoles", "value", "nextLink", cancellationToken); } /// - /// Gets a list of snapshots in the specified subscription. + /// List supported trusted access roles. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles /// /// /// Operation Id - /// Snapshots_List + /// TrustedAccessRoles_List /// /// /// Default Api Version /// 2025-10-01 /// - /// - /// Resource - /// - /// /// /// + /// The name of the Azure region. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAgentPoolSnapshots(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetTrustedAccessRoles(AzureLocation location, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => AgentPoolSnapshotSnapshotsRestClient.CreateListRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AgentPoolSnapshotSnapshotsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AgentPoolSnapshotResource(Client, AgentPoolSnapshotData.DeserializeAgentPoolSnapshotData(e)), AgentPoolSnapshotSnapshotsClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetAgentPoolSnapshots", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => TrustedAccessRolesRestClient.CreateListRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => TrustedAccessRolesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ContainerServiceTrustedAccessRole.DeserializeContainerServiceTrustedAccessRole(e), TrustedAccessRolesClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetTrustedAccessRoles", "value", "nextLink", cancellationToken); } /// - /// List supported trusted access roles. + /// Gets a list of snapshots in the specified subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots /// /// /// Operation Id - /// TrustedAccessRoles_List + /// Snapshots_List /// /// /// Default Api Version /// 2025-10-01 /// + /// + /// Resource + /// + /// /// /// - /// The name of the Azure region. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetTrustedAccessRolesAsync(AzureLocation location, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAgentPoolSnapshotsAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => TrustedAccessRolesRestClient.CreateListRequest(Id.SubscriptionId, location); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => TrustedAccessRolesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ContainerServiceTrustedAccessRole.DeserializeContainerServiceTrustedAccessRole(e), TrustedAccessRolesClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetTrustedAccessRoles", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => AgentPoolSnapshotSnapshotsRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AgentPoolSnapshotSnapshotsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AgentPoolSnapshotResource(Client, AgentPoolSnapshotData.DeserializeAgentPoolSnapshotData(e)), AgentPoolSnapshotSnapshotsClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetAgentPoolSnapshots", "value", "nextLink", cancellationToken); } /// - /// List supported trusted access roles. + /// Gets a list of snapshots in the specified subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/trustedAccessRoles + /// /subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots /// /// /// Operation Id - /// TrustedAccessRoles_List + /// Snapshots_List /// /// /// Default Api Version /// 2025-10-01 /// + /// + /// Resource + /// + /// /// /// - /// The name of the Azure region. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetTrustedAccessRoles(AzureLocation location, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAgentPoolSnapshots(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => TrustedAccessRolesRestClient.CreateListRequest(Id.SubscriptionId, location); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => TrustedAccessRolesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ContainerServiceTrustedAccessRole.DeserializeContainerServiceTrustedAccessRole(e), TrustedAccessRolesClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetTrustedAccessRoles", "value", "nextLink", cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => AgentPoolSnapshotSnapshotsRestClient.CreateListRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => AgentPoolSnapshotSnapshotsRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AgentPoolSnapshotResource(Client, AgentPoolSnapshotData.DeserializeAgentPoolSnapshotData(e)), AgentPoolSnapshotSnapshotsClientDiagnostics, Pipeline, "MockableContainerServiceSubscriptionResource.GetAgentPoolSnapshots", "value", "nextLink", cancellationToken); } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceCollection.cs index 7997bb12c90a..2e2b40f24de5 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceCollection.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceCollection.cs @@ -88,7 +88,7 @@ public virtual async Task> CreateO try { var response = await _managedClusterNamespaceManagedNamespacesRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedNamespaceName, data, cancellationToken).ConfigureAwait(false); - var operation = new ContainerServiceArmOperation(new ManagedClusterNamespaceOperationSource(Client), _managedClusterNamespaceManagedNamespacesClientDiagnostics, Pipeline, _managedClusterNamespaceManagedNamespacesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedNamespaceName, data).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerServiceArmOperation(new ManagedClusterNamespaceOperationSource(Client), _managedClusterNamespaceManagedNamespacesClientDiagnostics, Pipeline, _managedClusterNamespaceManagedNamespacesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedNamespaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -137,7 +137,7 @@ public virtual ArmOperation CreateOrUpdate(Wait try { var response = _managedClusterNamespaceManagedNamespacesRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedNamespaceName, data, cancellationToken); - var operation = new ContainerServiceArmOperation(new ManagedClusterNamespaceOperationSource(Client), _managedClusterNamespaceManagedNamespacesClientDiagnostics, Pipeline, _managedClusterNamespaceManagedNamespacesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedNamespaceName, data).Request, response, OperationFinalStateVia.Location); + var operation = new ContainerServiceArmOperation(new ManagedClusterNamespaceOperationSource(Client), _managedClusterNamespaceManagedNamespacesClientDiagnostics, Pipeline, _managedClusterNamespaceManagedNamespacesRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, managedNamespaceName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); return operation; diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceData.Serialization.cs index ade79265c36d..74e77d19d22b 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceData.Serialization.cs @@ -39,16 +39,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (options.Format != "W" && Optional.IsDefined(ETag)) - { - writer.WritePropertyName("eTag"u8); - writer.WriteStringValue(ETag.Value.ToString()); - } if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } + if (options.Format != "W" && Optional.IsDefined(ETag)) + { + writer.WritePropertyName("eTag"u8); + writer.WriteStringValue(ETag.Value.ToString()); + } } ManagedClusterNamespaceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -71,8 +71,8 @@ internal static ManagedClusterNamespaceData DeserializeManagedClusterNamespaceDa { return null; } - ETag? etag = default; ManagedClusterNamespaceProperties properties = default; + ETag? etag = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -83,22 +83,22 @@ internal static ManagedClusterNamespaceData DeserializeManagedClusterNamespaceDa Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("eTag"u8)) + if (property.NameEquals("properties"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - etag = new ETag(property.Value.GetString()); + properties = ManagedClusterNamespaceProperties.DeserializeManagedClusterNamespaceProperties(property.Value, options); continue; } - if (property.NameEquals("properties"u8)) + if (property.NameEquals("eTag"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - properties = ManagedClusterNamespaceProperties.DeserializeManagedClusterNamespaceProperties(property.Value, options); + etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("tags"u8)) @@ -157,8 +157,8 @@ internal static ManagedClusterNamespaceData DeserializeManagedClusterNamespaceDa systemData, tags ?? new ChangeTrackingDictionary(), location, - etag, properties, + etag, serializedAdditionalRawData); } @@ -245,33 +245,33 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ETag), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" eTag: "); + builder.Append(" properties: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(ETag)) + if (Optional.IsDefined(Properties)) { - builder.Append(" eTag: "); - builder.AppendLine($"'{ETag.Value.ToString()}'"); + builder.Append(" properties: "); + BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Properties), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ETag), out propertyOverride); if (hasPropertyOverride) { - builder.Append(" properties: "); + builder.Append(" eTag: "); builder.AppendLine(propertyOverride); } else { - if (Optional.IsDefined(Properties)) + if (Optional.IsDefined(ETag)) { - builder.Append(" properties: "); - BicepSerializationHelpers.AppendChildObject(builder, Properties, options, 2, false, " properties: "); + builder.Append(" eTag: "); + builder.AppendLine($"'{ETag.Value.ToString()}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceData.cs index 32a578d32908..59d19e64ec47 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterNamespaceData.cs @@ -65,19 +65,19 @@ public ManagedClusterNamespaceData(AzureLocation location) : base(location) /// 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. - /// Serialized Name: ManagedNamespace.eTag - /// /// /// Properties of a namespace. /// Serialized Name: ManagedNamespace.properties /// + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Serialized Name: ManagedNamespace.eTag + /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterNamespaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ETag? etag, ManagedClusterNamespaceProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ManagedClusterNamespaceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedClusterNamespaceProperties properties, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - ETag = etag; Properties = properties; + ETag = etag; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -86,17 +86,17 @@ internal ManagedClusterNamespaceData() { } - /// - /// 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. - /// Serialized Name: ManagedNamespace.eTag - /// - [WirePath("eTag")] - public ETag? ETag { get; } /// /// Properties of a namespace. /// Serialized Name: ManagedNamespace.properties /// [WirePath("properties")] public ManagedClusterNamespaceProperties Properties { get; set; } + /// + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + /// Serialized Name: ManagedNamespace.eTag + /// + [WirePath("eTag")] + public ETag? ETag { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs index b9cd87034ea8..e8f4080acf32 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs @@ -78,7 +78,7 @@ internal static ManagedClusterUpgradeProfileData DeserializeManagedClusterUpgrad ResourceType type = default; SystemData systemData = default; ManagedClusterPoolUpgradeProfile controlPlaneProfile = default; - IReadOnlyList agentPoolProfiles = default; + IList agentPoolProfiles = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.cs index d308bcddf016..f173251f5b2e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.cs @@ -63,7 +63,7 @@ public partial class ManagedClusterUpgradeProfileData : ResourceData /// Serialized Name: ManagedClusterUpgradeProfile.properties.agentPoolProfiles /// /// or is null. - internal ManagedClusterUpgradeProfileData(ManagedClusterPoolUpgradeProfile controlPlaneProfile, IEnumerable agentPoolProfiles) + public ManagedClusterUpgradeProfileData(ManagedClusterPoolUpgradeProfile controlPlaneProfile, IEnumerable agentPoolProfiles) { Argument.AssertNotNull(controlPlaneProfile, nameof(controlPlaneProfile)); Argument.AssertNotNull(agentPoolProfiles, nameof(agentPoolProfiles)); @@ -86,7 +86,7 @@ internal ManagedClusterUpgradeProfileData(ManagedClusterPoolUpgradeProfile contr /// Serialized Name: ManagedClusterUpgradeProfile.properties.agentPoolProfiles /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedClusterPoolUpgradeProfile controlPlaneProfile, IReadOnlyList agentPoolProfiles, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ManagedClusterUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedClusterPoolUpgradeProfile controlPlaneProfile, IList agentPoolProfiles, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ControlPlaneProfile = controlPlaneProfile; AgentPoolProfiles = agentPoolProfiles; @@ -103,12 +103,12 @@ internal ManagedClusterUpgradeProfileData() /// Serialized Name: ManagedClusterUpgradeProfile.properties.controlPlaneProfile /// [WirePath("properties.controlPlaneProfile")] - public ManagedClusterPoolUpgradeProfile ControlPlaneProfile { get; } + public ManagedClusterPoolUpgradeProfile ControlPlaneProfile { get; set; } /// /// The list of available upgrade versions for agent pools. /// Serialized Name: ManagedClusterUpgradeProfile.properties.agentPoolProfiles /// [WirePath("properties.agentPoolProfiles")] - public IReadOnlyList AgentPoolProfiles { get; } + public IList AgentPoolProfiles { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs index c347c97e7795..20cd7ffd2469 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs @@ -77,7 +77,7 @@ internal static AgentPoolAvailableVersions DeserializeAgentPoolAvailableVersions string name = default; ResourceType type = default; SystemData systemData = default; - IReadOnlyList agentPoolVersions = default; + IReadOnlyList agentPoolVersions = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -121,10 +121,10 @@ internal static AgentPoolAvailableVersions DeserializeAgentPoolAvailableVersions { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(AgentPoolAvailableVersion.DeserializeAgentPoolAvailableVersion(item, options)); + array.Add(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.DeserializeAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(item, options)); } agentPoolVersions = array; continue; @@ -143,7 +143,7 @@ internal static AgentPoolAvailableVersions DeserializeAgentPoolAvailableVersions name, type, systemData, - agentPoolVersions ?? new ChangeTrackingList(), + agentPoolVersions ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs index 0ee47a69034d..a87ae4310237 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs @@ -53,7 +53,7 @@ public partial class AgentPoolAvailableVersions : ResourceData /// Initializes a new instance of . internal AgentPoolAvailableVersions() { - AgentPoolVersions = new ChangeTrackingList(); + AgentPoolVersions = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -66,7 +66,7 @@ internal AgentPoolAvailableVersions() /// Serialized Name: AgentPoolAvailableVersions.properties.agentPoolVersions /// /// Keeps track of any properties unknown to the library. - internal AgentPoolAvailableVersions(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList agentPoolVersions, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AgentPoolAvailableVersions(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList agentPoolVersions, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { AgentPoolVersions = agentPoolVersions; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -77,6 +77,6 @@ internal AgentPoolAvailableVersions(ResourceIdentifier id, string name, Resource /// Serialized Name: AgentPoolAvailableVersions.properties.agentPoolVersions /// [WirePath("properties.agentPoolVersions")] - public IReadOnlyList AgentPoolVersions { get; } + public IReadOnlyList AgentPoolVersions { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.Serialization.cs similarity index 72% rename from sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.Serialization.cs rename to sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.Serialization.cs index 05b6634cdb4c..546877f92e47 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.Serialization.cs @@ -14,11 +14,11 @@ namespace Azure.ResourceManager.ContainerService.Models { - public partial class AgentPoolAvailableVersion : IUtf8JsonSerializable, IJsonModel + public partial class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -29,16 +29,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AgentPoolAvailableVersion)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem)} does not support writing '{format}' format."); } - if (Optional.IsDefined(IsDefault)) + if (Optional.IsDefined(Default)) { writer.WritePropertyName("default"u8); - writer.WriteBooleanValue(IsDefault.Value); + writer.WriteBooleanValue(Default.Value); } if (Optional.IsDefined(KubernetesVersion)) { @@ -67,19 +67,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AgentPoolAvailableVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AgentPoolAvailableVersion)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentPoolAvailableVersion(document.RootElement, options); + return DeserializeAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(document.RootElement, options); } - internal static AgentPoolAvailableVersion DeserializeAgentPoolAvailableVersion(JsonElement element, ModelReaderWriterOptions options = null) + internal static AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem DeserializeAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -123,7 +123,7 @@ internal static AgentPoolAvailableVersion DeserializeAgentPoolAvailableVersion(J } } serializedAdditionalRawData = rawDataDictionary; - return new AgentPoolAvailableVersion(@default, kubernetesVersion, isPreview, serializedAdditionalRawData); + return new AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(@default, kubernetesVersion, isPreview, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -137,7 +137,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDefault), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Default), out propertyOverride); if (hasPropertyOverride) { builder.Append(" default: "); @@ -145,10 +145,10 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsDefined(IsDefault)) + if (Optional.IsDefined(Default)) { builder.Append(" default: "); - var boolValue = IsDefault.Value == true ? "true" : "false"; + var boolValue = Default.Value == true ? "true" : "false"; builder.AppendLine($"{boolValue}"); } } @@ -196,9 +196,9 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) return BinaryData.FromString(builder.ToString()); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { @@ -207,26 +207,26 @@ BinaryData IPersistableModel.Write(ModelReaderWriterO case "bicep": return SerializeBicep(options); default: - throw new FormatException($"The model {nameof(AgentPoolAvailableVersion)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem)} does not support writing '{options.Format}' format."); } } - AgentPoolAvailableVersion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAgentPoolAvailableVersion(document.RootElement, options); + return DeserializeAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AgentPoolAvailableVersion)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs similarity index 68% rename from sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.cs rename to sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs index faf6373131ea..c6e50b014b0e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs @@ -11,10 +11,10 @@ namespace Azure.ResourceManager.ContainerService.Models { /// - /// The AgentPoolAvailableVersion. - /// Serialized Name: AgentPoolAvailableVersion + /// The AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem /// - public partial class AgentPoolAvailableVersion + public partial class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem { /// /// Keeps track of any properties unknown to the library. @@ -48,28 +48,28 @@ public partial class AgentPoolAvailableVersion /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal AgentPoolAvailableVersion() + /// Initializes a new instance of . + internal AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() { } - /// Initializes a new instance of . - /// + /// Initializes a new instance of . + /// /// Whether this version is the default agent pool version. - /// Serialized Name: AgentPoolAvailableVersion.default + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.default /// /// /// The Kubernetes version (major.minor.patch). - /// Serialized Name: AgentPoolAvailableVersion.kubernetesVersion + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.kubernetesVersion /// /// /// Whether Kubernetes version is currently in preview. - /// Serialized Name: AgentPoolAvailableVersion.isPreview + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.isPreview /// /// Keeps track of any properties unknown to the library. - internal AgentPoolAvailableVersion(bool? isDefault, string kubernetesVersion, bool? isPreview, IDictionary serializedAdditionalRawData) + internal AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(bool? @default, string kubernetesVersion, bool? isPreview, IDictionary serializedAdditionalRawData) { - IsDefault = isDefault; + Default = @default; KubernetesVersion = kubernetesVersion; IsPreview = isPreview; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -77,19 +77,19 @@ internal AgentPoolAvailableVersion(bool? isDefault, string kubernetesVersion, bo /// /// Whether this version is the default agent pool version. - /// Serialized Name: AgentPoolAvailableVersion.default + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.default /// [WirePath("default")] - public bool? IsDefault { get; } + public bool? Default { get; } /// /// The Kubernetes version (major.minor.patch). - /// Serialized Name: AgentPoolAvailableVersion.kubernetesVersion + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.kubernetesVersion /// [WirePath("kubernetesVersion")] public string KubernetesVersion { get; } /// /// Whether Kubernetes version is currently in preview. - /// Serialized Name: AgentPoolAvailableVersion.isPreview + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.isPreview /// [WirePath("isPreview")] public bool? IsPreview { get; } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.Serialization.cs index 4b7e5ec8f50d..b6556e28eb1e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AgentPoolSnapshotListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static AgentPoolSnapshotListResult DeserializeAgentPoolSnapshotListResu return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static AgentPoolSnapshotListResult DeserializeAgentPoolSnapshotListResu } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static AgentPoolSnapshotListResult DeserializeAgentPoolSnapshotListResu } } serializedAdditionalRawData = rawDataDictionary; - return new AgentPoolSnapshotListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new AgentPoolSnapshotListResult(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.cs index 7990a0418c1d..b3c546b86368 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolSnapshotListResult.cs @@ -7,11 +7,12 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ContainerService.Models { /// - /// The response from the List Snapshots operation. + /// The response of a Snapshot list operation. /// Serialized Name: SnapshotListResult /// internal partial class AgentPoolSnapshotListResult @@ -49,37 +50,49 @@ internal partial class AgentPoolSnapshotListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AgentPoolSnapshotListResult() + /// + /// The Snapshot items on this page + /// Serialized Name: SnapshotListResult.value + /// + /// is null. + internal AgentPoolSnapshotListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . /// - /// The list of snapshots. + /// The Snapshot items on this page /// Serialized Name: SnapshotListResult.value /// /// - /// The URL to get the next set of snapshot results. + /// The link to the next page of items /// Serialized Name: SnapshotListResult.nextLink /// /// Keeps track of any properties unknown to the library. - internal AgentPoolSnapshotListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal AgentPoolSnapshotListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal AgentPoolSnapshotListResult() + { + } + /// - /// The list of snapshots. + /// The Snapshot items on this page /// Serialized Name: SnapshotListResult.value /// public IReadOnlyList Value { get; } /// - /// The URL to get the next set of snapshot results. + /// The link to the next page of items /// Serialized Name: SnapshotListResult.nextLink /// - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs index 8eb822491987..6945b5c7bd53 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs @@ -49,7 +49,7 @@ public partial class AgentPoolUpgradeProfilePropertiesUpgradesItem private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal AgentPoolUpgradeProfilePropertiesUpgradesItem() + public AgentPoolUpgradeProfilePropertiesUpgradesItem() { } @@ -75,12 +75,12 @@ internal AgentPoolUpgradeProfilePropertiesUpgradesItem(string kubernetesVersion, /// Serialized Name: AgentPoolUpgradeProfilePropertiesUpgradesItem.kubernetesVersion /// [WirePath("kubernetesVersion")] - public string KubernetesVersion { get; } + public string KubernetesVersion { get; set; } /// /// Whether the Kubernetes version is currently in preview. /// Serialized Name: AgentPoolUpgradeProfilePropertiesUpgradesItem.isPreview /// [WirePath("isPreview")] - public bool? IsPreview { get; } + public bool? IsPreview { get; set; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AzureResourceManagerContainerServiceContext.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AzureResourceManagerContainerServiceContext.cs index 09643f632c08..50124dbb34ab 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AzureResourceManagerContainerServiceContext.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AzureResourceManagerContainerServiceContext.cs @@ -17,8 +17,8 @@ namespace Azure.ResourceManager.ContainerService /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' /// [ModelReaderWriterBuildable(typeof(AdvancedNetworkingObservability))] - [ModelReaderWriterBuildable(typeof(AgentPoolAvailableVersion))] [ModelReaderWriterBuildable(typeof(AgentPoolAvailableVersions))] + [ModelReaderWriterBuildable(typeof(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem))] [ModelReaderWriterBuildable(typeof(AgentPoolDeleteMachinesContent))] [ModelReaderWriterBuildable(typeof(AgentPoolGatewayProfile))] [ModelReaderWriterBuildable(typeof(AgentPoolGpuProfile))] diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.Serialization.cs index d36b190f918a..5d6fb4b05bc6 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceAgentPoolListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static ContainerServiceAgentPoolListResult DeserializeContainerServiceA return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static ContainerServiceAgentPoolListResult DeserializeContainerServiceA } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static ContainerServiceAgentPoolListResult DeserializeContainerServiceA } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerServiceAgentPoolListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ContainerServiceAgentPoolListResult(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.cs index 913bd766722a..0be28f507edc 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceAgentPoolListResult.cs @@ -7,11 +7,12 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ContainerService.Models { /// - /// The response from the List Agent Pools operation. + /// The response of a AgentPool list operation. /// Serialized Name: AgentPoolListResult /// internal partial class ContainerServiceAgentPoolListResult @@ -49,37 +50,49 @@ internal partial class ContainerServiceAgentPoolListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceAgentPoolListResult() + /// + /// The AgentPool items on this page + /// Serialized Name: AgentPoolListResult.value + /// + /// is null. + internal ContainerServiceAgentPoolListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . /// - /// The list of agent pools. + /// The AgentPool items on this page /// Serialized Name: AgentPoolListResult.value /// /// - /// The URL to get the next set of agent pool results. + /// The link to the next page of items /// Serialized Name: AgentPoolListResult.nextLink /// /// Keeps track of any properties unknown to the library. - internal ContainerServiceAgentPoolListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ContainerServiceAgentPoolListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceAgentPoolListResult() + { + } + /// - /// The list of agent pools. + /// The AgentPool items on this page /// Serialized Name: AgentPoolListResult.value /// public IReadOnlyList Value { get; } /// - /// The URL to get the next set of agent pool results. + /// The link to the next page of items /// Serialized Name: AgentPoolListResult.nextLink /// - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPFamily.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPFamily.cs deleted file mode 100644 index 70124695282a..000000000000 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPFamily.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerService.Models -{ - /// - /// The IP version to use for cluster networking and IP assignment. - /// Serialized Name: IpFamily - /// - public readonly partial struct ContainerServiceIPFamily : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ContainerServiceIPFamily(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string IPv4Value = "IPv4"; - private const string IPv6Value = "IPv6"; - - /// - /// IPv4 - /// Serialized Name: IpFamily.IPv4 - /// - public static ContainerServiceIPFamily IPv4 { get; } = new ContainerServiceIPFamily(IPv4Value); - /// - /// IPv6 - /// Serialized Name: IpFamily.IPv6 - /// - public static ContainerServiceIPFamily IPv6 { get; } = new ContainerServiceIPFamily(IPv6Value); - /// Determines if two values are the same. - public static bool operator ==(ContainerServiceIPFamily left, ContainerServiceIPFamily right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContainerServiceIPFamily left, ContainerServiceIPFamily right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ContainerServiceIPFamily(string value) => new ContainerServiceIPFamily(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContainerServiceIPFamily other && Equals(other); - /// - public bool Equals(ContainerServiceIPFamily other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.Serialization.cs index 52f4fe53051f..f5b74cac221e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.Serialization.cs @@ -82,7 +82,7 @@ internal static ContainerServiceMachineIPAddress DeserializeContainerServiceMach { return null; } - ContainerServiceIPFamily? family = default; + IPFamily? family = default; string ip = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -94,7 +94,7 @@ internal static ContainerServiceMachineIPAddress DeserializeContainerServiceMach { continue; } - family = new ContainerServiceIPFamily(property.Value.GetString()); + family = new IPFamily(property.Value.GetString()); continue; } if (property.NameEquals("ip"u8)) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.cs index f6736a5b3ee8..755b736f7ae0 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.cs @@ -63,7 +63,7 @@ internal ContainerServiceMachineIPAddress() /// Serialized Name: MachineIpAddress.ip /// /// Keeps track of any properties unknown to the library. - internal ContainerServiceMachineIPAddress(ContainerServiceIPFamily? family, string ip, IDictionary serializedAdditionalRawData) + internal ContainerServiceMachineIPAddress(IPFamily? family, string ip, IDictionary serializedAdditionalRawData) { Family = family; IP = ip; @@ -75,7 +75,7 @@ internal ContainerServiceMachineIPAddress(ContainerServiceIPFamily? family, stri /// Serialized Name: MachineIpAddress.family /// [WirePath("family")] - public ContainerServiceIPFamily? Family { get; } + public IPFamily? Family { get; } /// /// IPv4 or IPv6 address of the machine /// Serialized Name: MachineIpAddress.ip diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineProperties.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineProperties.cs index 32914e60c71e..c181a79a6932 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineProperties.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineProperties.cs @@ -50,7 +50,7 @@ public partial class ContainerServiceMachineProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceMachineProperties() + public ContainerServiceMachineProperties() { } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.Serialization.cs index 6552872eac39..a7394e663d95 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ContainerServiceMaintenanceConfigurationListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static ContainerServiceMaintenanceConfigurationListResult DeserializeCo return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static ContainerServiceMaintenanceConfigurationListResult DeserializeCo } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static ContainerServiceMaintenanceConfigurationListResult DeserializeCo } } serializedAdditionalRawData = rawDataDictionary; - return new ContainerServiceMaintenanceConfigurationListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ContainerServiceMaintenanceConfigurationListResult(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.cs index ea04891a9f42..953e48809e7b 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMaintenanceConfigurationListResult.cs @@ -7,11 +7,12 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ContainerService.Models { /// - /// The response from the List maintenance configurations operation. + /// The response of a MaintenanceConfiguration list operation. /// Serialized Name: MaintenanceConfigurationListResult /// internal partial class ContainerServiceMaintenanceConfigurationListResult @@ -49,37 +50,49 @@ internal partial class ContainerServiceMaintenanceConfigurationListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ContainerServiceMaintenanceConfigurationListResult() + /// + /// The MaintenanceConfiguration items on this page + /// Serialized Name: MaintenanceConfigurationListResult.value + /// + /// is null. + internal ContainerServiceMaintenanceConfigurationListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . /// - /// The list of maintenance configurations. + /// The MaintenanceConfiguration items on this page /// Serialized Name: MaintenanceConfigurationListResult.value /// /// - /// The URL to get the next set of maintenance configuration results. + /// The link to the next page of items /// Serialized Name: MaintenanceConfigurationListResult.nextLink /// /// Keeps track of any properties unknown to the library. - internal ContainerServiceMaintenanceConfigurationListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ContainerServiceMaintenanceConfigurationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ContainerServiceMaintenanceConfigurationListResult() + { + } + /// - /// The list of maintenance configurations. + /// The MaintenanceConfiguration items on this page /// Serialized Name: MaintenanceConfigurationListResult.value /// public IReadOnlyList Value { get; } /// - /// The URL to get the next set of maintenance configuration results. + /// The link to the next page of items /// Serialized Name: MaintenanceConfigurationListResult.nextLink /// - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs index 44391970e030..c2d98b6f1460 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs @@ -189,7 +189,7 @@ internal static ContainerServiceNetworkProfile DeserializeContainerServiceNetwor ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile = default; IList podCidrs = default; IList serviceCidrs = default; - IList ipFamilies = default; + IList ipFamilies = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -342,10 +342,10 @@ internal static ContainerServiceNetworkProfile DeserializeContainerServiceNetwor { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(new ContainerServiceIPFamily(item.GetString())); + array.Add(new IPFamily(item.GetString())); } ipFamilies = array; continue; @@ -373,7 +373,7 @@ internal static ContainerServiceNetworkProfile DeserializeContainerServiceNetwor staticEgressGatewayProfile, podCidrs ?? new ChangeTrackingList(), serviceCidrs ?? new ChangeTrackingList(), - ipFamilies ?? new ChangeTrackingList(), + ipFamilies ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs index c3ab64b980f4..470a43f35eba 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs @@ -53,7 +53,7 @@ public ContainerServiceNetworkProfile() { PodCidrs = new ChangeTrackingList(); ServiceCidrs = new ChangeTrackingList(); - NetworkIPFamilies = new ChangeTrackingList(); + NetworkIPFamilies = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -126,7 +126,7 @@ public ContainerServiceNetworkProfile() /// Serialized Name: ContainerServiceNetworkProfile.ipFamilies /// /// Keeps track of any properties unknown to the library. - internal ContainerServiceNetworkProfile(ContainerServiceNetworkPlugin? networkPlugin, ContainerServiceNetworkPluginMode? networkPluginMode, ContainerServiceNetworkPolicy? networkPolicy, ContainerServiceNetworkMode? networkMode, NetworkDataplane? networkDataplane, ManagedClusterAdvancedNetworking advancedNetworking, string podCidr, string serviceCidr, string dnsServiceIP, ContainerServiceOutboundType? outboundType, ContainerServiceLoadBalancerSku? loadBalancerSku, ManagedClusterLoadBalancerProfile loadBalancerProfile, ManagedClusterNatGatewayProfile natGatewayProfile, ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile, IList podCidrs, IList serviceCidrs, IList networkIPFamilies, IDictionary serializedAdditionalRawData) + internal ContainerServiceNetworkProfile(ContainerServiceNetworkPlugin? networkPlugin, ContainerServiceNetworkPluginMode? networkPluginMode, ContainerServiceNetworkPolicy? networkPolicy, ContainerServiceNetworkMode? networkMode, NetworkDataplane? networkDataplane, ManagedClusterAdvancedNetworking advancedNetworking, string podCidr, string serviceCidr, string dnsServiceIP, ContainerServiceOutboundType? outboundType, ContainerServiceLoadBalancerSku? loadBalancerSku, ManagedClusterLoadBalancerProfile loadBalancerProfile, ManagedClusterNatGatewayProfile natGatewayProfile, ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile, IList podCidrs, IList serviceCidrs, IList networkIPFamilies, IDictionary serializedAdditionalRawData) { NetworkPlugin = networkPlugin; NetworkPluginMode = networkPluginMode; @@ -264,6 +264,6 @@ public bool? IsStaticEgressGatewayAddonEnabled /// Serialized Name: ContainerServiceNetworkProfile.ipFamilies /// [WirePath("ipFamilies")] - public IList NetworkIPFamilies { get; } + public IList NetworkIPFamilies { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs index 10bd229f4450..28c8f390e1d2 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs @@ -108,7 +108,7 @@ internal static ContainerServicePrivateLinkResourceData DeserializeContainerServ { return null; } - ResourceIdentifier id = default; + string id = default; string name = default; ResourceType? type = default; string groupId = default; @@ -120,11 +120,7 @@ internal static ContainerServicePrivateLinkResourceData DeserializeContainerServ { if (property.NameEquals("id"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - id = new ResourceIdentifier(property.Value.GetString()); + id = property.Value.GetString(); continue; } if (property.NameEquals("name"u8)) @@ -230,7 +226,15 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(Id)) { builder.Append(" id: "); - builder.AppendLine($"'{Id.ToString()}'"); + if (Id.Contains(Environment.NewLine)) + { + builder.AppendLine("'''"); + builder.AppendLine($"{Id}'''"); + } + else + { + builder.AppendLine($"'{Id}'"); + } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs index 2f79670ce44b..94cf3184b361 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs @@ -81,7 +81,7 @@ public ContainerServicePrivateLinkResourceData() /// Serialized Name: PrivateLinkResource.privateLinkServiceID /// /// Keeps track of any properties unknown to the library. - internal ContainerServicePrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType? resourceType, string groupId, IList requiredMembers, ResourceIdentifier privateLinkServiceId, IDictionary serializedAdditionalRawData) + internal ContainerServicePrivateLinkResourceData(string id, string name, ResourceType? resourceType, string groupId, IList requiredMembers, ResourceIdentifier privateLinkServiceId, IDictionary serializedAdditionalRawData) { Id = id; Name = name; @@ -97,7 +97,7 @@ internal ContainerServicePrivateLinkResourceData(ResourceIdentifier id, string n /// Serialized Name: PrivateLinkResource.id /// [WirePath("id")] - public ResourceIdentifier Id { get; set; } + public string Id { get; set; } /// /// The name of the private link resource. /// Serialized Name: PrivateLinkResource.name diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePublicNetworkAccess.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePublicNetworkAccess.cs index 1581b69a8a9a..776a5d260973 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePublicNetworkAccess.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePublicNetworkAccess.cs @@ -29,12 +29,12 @@ public ContainerServicePublicNetworkAccess(string value) private const string DisabledValue = "Disabled"; /// - /// Enabled + /// Inbound/Outbound to the managedCluster is allowed. /// Serialized Name: PublicNetworkAccess.Enabled /// public static ContainerServicePublicNetworkAccess Enabled { get; } = new ContainerServicePublicNetworkAccess(EnabledValue); /// - /// Disabled + /// Inbound traffic to managedCluster is disabled, traffic from managedCluster is allowed. /// Serialized Name: PublicNetworkAccess.Disabled /// public static ContainerServicePublicNetworkAccess Disabled { get; } = new ContainerServicePublicNetworkAccess(DisabledValue); diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IPFamily.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IPFamily.cs new file mode 100644 index 000000000000..70c8ab7964a9 --- /dev/null +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IPFamily.cs @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerService.Models +{ + /// + /// To determine if address belongs IPv4 or IPv6 family + /// Serialized Name: IPFamily + /// + public readonly partial struct IPFamily : IEquatable + { + } +} diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MachineListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MachineListResult.Serialization.cs index 36f383f9d785..18f2f10ba719 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MachineListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MachineListResult.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MachineListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink.AbsoluteUri); + writer.WriteObjectValue(item, options); } - if (Optional.IsCollectionDefined(Value)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -88,33 +85,29 @@ internal static MachineListResult DeserializeMachineListResult(JsonElement eleme { return null; } - Uri nextLink = default; IReadOnlyList value = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("nextLink"u8)) + if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) { - continue; + array.Add(ContainerServiceMachineData.DeserializeContainerServiceMachineData(item, options)); } - nextLink = new Uri(property.Value.GetString()); + value = array; continue; } - if (property.NameEquals("value"u8)) + if (property.NameEquals("nextLink"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ContainerServiceMachineData.DeserializeContainerServiceMachineData(item, options)); - } - value = array; + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -123,7 +116,7 @@ internal static MachineListResult DeserializeMachineListResult(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new MachineListResult(nextLink, value ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new MachineListResult(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -137,21 +130,6 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); - if (hasPropertyOverride) - { - builder.Append(" nextLink: "); - builder.AppendLine(propertyOverride); - } - else - { - if (Optional.IsDefined(NextLink)) - { - builder.Append(" nextLink: "); - builder.AppendLine($"'{NextLink.AbsoluteUri}'"); - } - } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Value), out propertyOverride); if (hasPropertyOverride) { @@ -175,6 +153,21 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NextLink), out propertyOverride); + if (hasPropertyOverride) + { + builder.Append(" nextLink: "); + builder.AppendLine(propertyOverride); + } + else + { + if (Optional.IsDefined(NextLink)) + { + builder.Append(" nextLink: "); + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); + } + } + builder.AppendLine("}"); return BinaryData.FromString(builder.ToString()); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MachineListResult.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MachineListResult.cs index 96dddc76bac4..fd13c6811a92 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MachineListResult.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MachineListResult.cs @@ -7,11 +7,12 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ContainerService.Models { /// - /// The response from the List Machines operation. + /// The response of a Machine list operation. /// Serialized Name: MachineListResult /// internal partial class MachineListResult @@ -49,37 +50,49 @@ internal partial class MachineListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MachineListResult() + /// + /// The Machine items on this page + /// Serialized Name: MachineListResult.value + /// + /// is null. + internal MachineListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// The URL to get the next set of machine results. - /// Serialized Name: MachineListResult.nextLink - /// /// - /// The list of Machines in cluster. + /// The Machine items on this page /// Serialized Name: MachineListResult.value /// + /// + /// The link to the next page of items + /// Serialized Name: MachineListResult.nextLink + /// /// Keeps track of any properties unknown to the library. - internal MachineListResult(Uri nextLink, IReadOnlyList value, IDictionary serializedAdditionalRawData) + internal MachineListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { - NextLink = nextLink; Value = value; + NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal MachineListResult() + { + } + /// - /// The URL to get the next set of machine results. - /// Serialized Name: MachineListResult.nextLink - /// - public Uri NextLink { get; } - /// - /// The list of Machines in cluster. + /// The Machine items on this page /// Serialized Name: MachineListResult.value /// public IReadOnlyList Value { get; } + /// + /// The link to the next page of items + /// Serialized Name: MachineListResult.nextLink + /// + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs index 4dea782e9291..7dcd2ef27b1d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs @@ -115,7 +115,7 @@ internal static ManagedClusterAadProfile DeserializeManagedClusterAadProfile(Jso } bool? managed = default; bool? enableAzureRBAC = default; - IList adminGroupObjectIds = default; + IList adminGroupObjectIds = default; Guid? clientAppId = default; Guid? serverAppId = default; string serverAppSecret = default; @@ -148,10 +148,10 @@ internal static ManagedClusterAadProfile DeserializeManagedClusterAadProfile(Jso { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(item.GetGuid()); + array.Add(item.GetString()); } adminGroupObjectIds = array; continue; @@ -197,7 +197,7 @@ internal static ManagedClusterAadProfile DeserializeManagedClusterAadProfile(Jso return new ManagedClusterAadProfile( managed, enableAzureRBAC, - adminGroupObjectIds ?? new ChangeTrackingList(), + adminGroupObjectIds ?? new ChangeTrackingList(), clientAppId, serverAppId, serverAppSecret, @@ -264,7 +264,20 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("["); foreach (var item in AdminGroupObjectIds) { - builder.AppendLine($" '{item.ToString()}'"); + if (item == null) + { + builder.Append("null"); + continue; + } + if (item.Contains(Environment.NewLine)) + { + builder.AppendLine(" '''"); + builder.AppendLine($"{item}'''"); + } + else + { + builder.AppendLine($" '{item}'"); + } } builder.AppendLine(" ]"); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs index 72ad53098e83..93b6f9b24078 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs @@ -51,7 +51,7 @@ public partial class ManagedClusterAadProfile /// Initializes a new instance of . public ManagedClusterAadProfile() { - AdminGroupObjectIds = new ChangeTrackingList(); + AdminGroupObjectIds = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -84,7 +84,7 @@ public ManagedClusterAadProfile() /// Serialized Name: ManagedClusterAADProfile.tenantID /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterAadProfile(bool? isManagedAadEnabled, bool? isAzureRbacEnabled, IList adminGroupObjectIds, Guid? clientAppId, Guid? serverAppId, string serverAppSecret, Guid? tenantId, IDictionary serializedAdditionalRawData) + internal ManagedClusterAadProfile(bool? isManagedAadEnabled, bool? isAzureRbacEnabled, IList adminGroupObjectIds, Guid? clientAppId, Guid? serverAppId, string serverAppSecret, Guid? tenantId, IDictionary serializedAdditionalRawData) { IsManagedAadEnabled = isManagedAadEnabled; IsAzureRbacEnabled = isAzureRbacEnabled; @@ -113,7 +113,7 @@ internal ManagedClusterAadProfile(bool? isManagedAadEnabled, bool? isAzureRbacEn /// Serialized Name: ManagedClusterAADProfile.adminGroupObjectIDs /// [WirePath("adminGroupObjectIDs")] - public IList AdminGroupObjectIds { get; } + public IList AdminGroupObjectIds { get; } /// /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. /// Serialized Name: ManagedClusterAADProfile.clientAppID diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs index ec3349b67fb5..c93cad630a6e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs @@ -75,7 +75,7 @@ internal static ManagedClusterAgentPoolProfile DeserializeManagedClusterAgentPoo PodIPAllocationMode? podIPAllocationMode = default; int? maxPods = default; ContainerServiceOSType? osType = default; - ContainerServiceOSSku? osSku = default; + Ossku? osSku = default; int? maxCount = default; int? minCount = default; bool? enableAutoScaling = default; @@ -240,7 +240,7 @@ internal static ManagedClusterAgentPoolProfile DeserializeManagedClusterAgentPoo { continue; } - osSku = new ContainerServiceOSSku(property.Value.GetString()); + osSku = new Ossku(property.Value.GetString()); continue; } if (property.NameEquals("maxCount"u8)) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs index 7ff98fe000f9..11e6a7f6c8f8 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs @@ -148,11 +148,11 @@ public ManagedClusterAgentPoolProfile(string name) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.nodePublicIPPrefixID /// /// - /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// The Virtual Machine Scale Set priority. /// Serialized Name: ManagedClusterAgentPoolProfileProperties.scaleSetPriority /// /// - /// The Virtual Machine Scale Set eviction policy to use. This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.scaleSetEvictionPolicy /// /// @@ -204,7 +204,7 @@ public ManagedClusterAgentPoolProfile(string name) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.creationData /// /// - /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved group of Virtual Machines. This is of the form: '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' Customers use it to create an agentpool with a specified CRG. For more information see [Capacity Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.capacityReservationGroupID /// /// @@ -252,7 +252,7 @@ public ManagedClusterAgentPoolProfile(string name) /// Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool names must be 6 characters or less. /// Serialized Name: ManagedClusterAgentPoolProfile.name /// - internal ManagedClusterAgentPoolProfile(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? agentPoolType, 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, IDictionary serializedAdditionalRawData, string name) : base(etag, count, vmSize, osDiskSizeInGB, osDiskType, kubeletDiskType, workloadRuntime, messageOfTheDay, vnetSubnetId, podSubnetId, podIPAllocationMode, maxPods, osType, osSku, maxCount, minCount, enableAutoScaling, scaleDownMode, agentPoolType, mode, orchestratorVersion, currentOrchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, powerState, availabilityZones, enableNodePublicIP, nodePublicIPPrefixId, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupId, kubeletConfig, linuxOSConfig, enableEncryptionAtHost, enableUltraSsd, enableFips, gpuInstanceProfile, creationData, capacityReservationGroupId, hostGroupId, networkProfile, windowsProfile, securityProfile, gpuProfile, gatewayProfile, virtualMachinesProfile, virtualMachineNodesStatus, status, localDnsProfile, serializedAdditionalRawData) + internal ManagedClusterAgentPoolProfile(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, Ossku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, ScaleDownMode? scaleDownMode, AgentPoolType? agentPoolType, 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, IDictionary serializedAdditionalRawData, string name) : base(etag, count, vmSize, osDiskSizeInGB, osDiskType, kubeletDiskType, workloadRuntime, messageOfTheDay, vnetSubnetId, podSubnetId, podIPAllocationMode, maxPods, osType, osSku, maxCount, minCount, enableAutoScaling, scaleDownMode, agentPoolType, mode, orchestratorVersion, currentOrchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, powerState, availabilityZones, enableNodePublicIP, nodePublicIPPrefixId, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupId, kubeletConfig, linuxOSConfig, enableEncryptionAtHost, enableUltraSsd, enableFips, gpuInstanceProfile, creationData, capacityReservationGroupId, hostGroupId, networkProfile, windowsProfile, securityProfile, gpuProfile, gatewayProfile, virtualMachinesProfile, virtualMachineNodesStatus, status, localDnsProfile, serializedAdditionalRawData) { Name = name; } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs index 146ed5be6669..1a4d2b422b1d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs @@ -383,7 +383,7 @@ internal static ManagedClusterAgentPoolProfileProperties DeserializeManagedClust PodIPAllocationMode? podIPAllocationMode = default; int? maxPods = default; ContainerServiceOSType? osType = default; - ContainerServiceOSSku? osSku = default; + Ossku? osSku = default; int? maxCount = default; int? minCount = default; bool? enableAutoScaling = default; @@ -543,7 +543,7 @@ internal static ManagedClusterAgentPoolProfileProperties DeserializeManagedClust { continue; } - osSku = new ContainerServiceOSSku(property.Value.GetString()); + osSku = new Ossku(property.Value.GetString()); continue; } if (property.NameEquals("maxCount"u8)) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs index 95f16de4a699..390fde4a09d7 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs @@ -177,11 +177,11 @@ public ManagedClusterAgentPoolProfileProperties() /// Serialized Name: ManagedClusterAgentPoolProfileProperties.nodePublicIPPrefixID /// /// - /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// The Virtual Machine Scale Set priority. /// Serialized Name: ManagedClusterAgentPoolProfileProperties.scaleSetPriority /// /// - /// The Virtual Machine Scale Set eviction policy to use. This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.scaleSetEvictionPolicy /// /// @@ -233,7 +233,7 @@ public ManagedClusterAgentPoolProfileProperties() /// Serialized Name: ManagedClusterAgentPoolProfileProperties.creationData /// /// - /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved group of Virtual Machines. This is of the form: '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' Customers use it to create an agentpool with a specified CRG. For more information see [Capacity Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.capacityReservationGroupID /// /// @@ -277,7 +277,7 @@ public ManagedClusterAgentPoolProfileProperties() /// Serialized Name: ManagedClusterAgentPoolProfileProperties.localDNSProfile /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterAgentPoolProfileProperties(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? agentPoolType, 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, IDictionary serializedAdditionalRawData) + internal ManagedClusterAgentPoolProfileProperties(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, Ossku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, ScaleDownMode? scaleDownMode, AgentPoolType? agentPoolType, 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, IDictionary serializedAdditionalRawData) { ETag = etag; Count = count; @@ -419,7 +419,7 @@ internal ManagedClusterAgentPoolProfileProperties(ETag? etag, int? count, string /// Serialized Name: ManagedClusterAgentPoolProfileProperties.osSKU /// [WirePath("osSKU")] - public ContainerServiceOSSku? OSSku { get; set; } + public Ossku? OSSku { get; set; } /// /// The maximum number of nodes for auto-scaling /// Serialized Name: ManagedClusterAgentPoolProfileProperties.maxCount @@ -526,13 +526,13 @@ public ContainerServiceStateCode? PowerStateCode [WirePath("nodePublicIPPrefixID")] public ResourceIdentifier NodePublicIPPrefixId { get; set; } /// - /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// The Virtual Machine Scale Set priority. /// Serialized Name: ManagedClusterAgentPoolProfileProperties.scaleSetPriority /// [WirePath("scaleSetPriority")] public ScaleSetPriority? ScaleSetPriority { get; set; } /// - /// The Virtual Machine Scale Set eviction policy to use. This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// The Virtual Machine Scale Set eviction policy. The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.scaleSetEvictionPolicy /// [WirePath("scaleSetEvictionPolicy")] @@ -625,7 +625,7 @@ public ResourceIdentifier CreationDataSourceResourceId } /// - /// AKS will associate the specified agent pool with the Capacity Reservation Group. + /// The fully qualified resource ID of the Capacity Reservation Group to provide virtual machines from a reserved group of Virtual Machines. This is of the form: '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Compute/capacityreservationgroups/{capacityReservationGroupName}' Customers use it to create an agentpool with a specified CRG. For more information see [Capacity Reservation](https://learn.microsoft.com/en-us/azure/virtual-machines/capacity-reservation-overview) /// Serialized Name: ManagedClusterAgentPoolProfileProperties.capacityReservationGroupID /// [WirePath("capacityReservationGroupID")] diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs index df75628f2f20..548c3bc339bd 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs @@ -90,10 +90,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("ok-total-unready-count"u8); writer.WriteStringValue(OkTotalUnreadyCount); } - if (Optional.IsDefined(ScanIntervalInSeconds)) + if (Optional.IsDefined(ScanInterval)) { writer.WritePropertyName("scan-interval"u8); - writer.WriteStringValue(ScanIntervalInSeconds); + writer.WriteStringValue(ScanInterval); } if (Optional.IsDefined(ScaleDownDelayAfterAdd)) { @@ -577,7 +577,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScanIntervalInSeconds), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScanInterval), out propertyOverride); if (hasPropertyOverride) { builder.Append(" scan-interval: "); @@ -585,17 +585,17 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsDefined(ScanIntervalInSeconds)) + if (Optional.IsDefined(ScanInterval)) { builder.Append(" scan-interval: "); - if (ScanIntervalInSeconds.Contains(Environment.NewLine)) + if (ScanInterval.Contains(Environment.NewLine)) { builder.AppendLine("'''"); - builder.AppendLine($"{ScanIntervalInSeconds}'''"); + builder.AppendLine($"{ScanInterval}'''"); } else { - builder.AppendLine($"'{ScanIntervalInSeconds}'"); + builder.AppendLine($"'{ScanInterval}'"); } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs index f063299750d5..185328f97ed6 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs @@ -98,7 +98,7 @@ public ManagedClusterAutoScalerProfile() /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default is 3. /// Serialized Name: ManagedClusterPropertiesAutoScalerProfile.ok-total-unready-count /// - /// + /// /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. /// Serialized Name: ManagedClusterPropertiesAutoScalerProfile.scan-interval /// @@ -135,7 +135,7 @@ public ManagedClusterAutoScalerProfile() /// Serialized Name: ManagedClusterPropertiesAutoScalerProfile.skip-nodes-with-system-pods /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterAutoScalerProfile(string balanceSimilarNodeGroups, bool? daemonsetEvictionForEmptyNodes, bool? daemonsetEvictionForOccupiedNodes, bool? ignoreDaemonsetsUtilization, AutoScaleExpander? expander, string maxEmptyBulkDelete, string maxGracefulTerminationSec, string maxNodeProvisionTime, string maxTotalUnreadyPercentage, string newPodScaleUpDelay, string okTotalUnreadyCount, string scanIntervalInSeconds, string scaleDownDelayAfterAdd, string scaleDownDelayAfterDelete, string scaleDownDelayAfterFailure, string scaleDownUnneededTime, string scaleDownUnreadyTime, string scaleDownUtilizationThreshold, string skipNodesWithLocalStorage, string skipNodesWithSystemPods, IDictionary serializedAdditionalRawData) + internal ManagedClusterAutoScalerProfile(string balanceSimilarNodeGroups, bool? daemonsetEvictionForEmptyNodes, bool? daemonsetEvictionForOccupiedNodes, bool? ignoreDaemonsetsUtilization, AutoScaleExpander? expander, string maxEmptyBulkDelete, string maxGracefulTerminationSec, string maxNodeProvisionTime, string maxTotalUnreadyPercentage, string newPodScaleUpDelay, string okTotalUnreadyCount, string scanInterval, string scaleDownDelayAfterAdd, string scaleDownDelayAfterDelete, string scaleDownDelayAfterFailure, string scaleDownUnneededTime, string scaleDownUnreadyTime, string scaleDownUtilizationThreshold, string skipNodesWithLocalStorage, string skipNodesWithSystemPods, IDictionary serializedAdditionalRawData) { BalanceSimilarNodeGroups = balanceSimilarNodeGroups; DaemonsetEvictionForEmptyNodes = daemonsetEvictionForEmptyNodes; @@ -148,7 +148,7 @@ internal ManagedClusterAutoScalerProfile(string balanceSimilarNodeGroups, bool? MaxTotalUnreadyPercentage = maxTotalUnreadyPercentage; NewPodScaleUpDelay = newPodScaleUpDelay; OkTotalUnreadyCount = okTotalUnreadyCount; - ScanIntervalInSeconds = scanIntervalInSeconds; + ScanInterval = scanInterval; ScaleDownDelayAfterAdd = scaleDownDelayAfterAdd; ScaleDownDelayAfterDelete = scaleDownDelayAfterDelete; ScaleDownDelayAfterFailure = scaleDownDelayAfterFailure; @@ -231,7 +231,7 @@ internal ManagedClusterAutoScalerProfile(string balanceSimilarNodeGroups, bool? /// Serialized Name: ManagedClusterPropertiesAutoScalerProfile.scan-interval /// [WirePath("scan-interval")] - public string ScanIntervalInSeconds { get; set; } + public string ScanInterval { get; set; } /// /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// Serialized Name: ManagedClusterPropertiesAutoScalerProfile.scale-down-delay-after-add diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.Serialization.cs index fd775bc1c1ad..202635fc9588 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedClusterListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static ManagedClusterListResult DeserializeManagedClusterListResult(Jso return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static ManagedClusterListResult DeserializeManagedClusterListResult(Jso } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static ManagedClusterListResult DeserializeManagedClusterListResult(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedClusterListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ManagedClusterListResult(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.cs index 8f17f5871c4d..636debb6a6e9 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterListResult.cs @@ -7,11 +7,12 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ContainerService.Models { /// - /// The response from the List Managed Clusters operation. + /// The response of a ManagedCluster list operation. /// Serialized Name: ManagedClusterListResult /// internal partial class ManagedClusterListResult @@ -49,37 +50,49 @@ internal partial class ManagedClusterListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedClusterListResult() + /// + /// The ManagedCluster items on this page + /// Serialized Name: ManagedClusterListResult.value + /// + /// is null. + internal ManagedClusterListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . /// - /// The list of managed clusters. + /// The ManagedCluster items on this page /// Serialized Name: ManagedClusterListResult.value /// /// - /// The URL to get the next set of managed cluster results. + /// The link to the next page of items /// Serialized Name: ManagedClusterListResult.nextLink /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ManagedClusterListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ManagedClusterListResult() + { + } + /// - /// The list of managed clusters. + /// The ManagedCluster items on this page /// Serialized Name: ManagedClusterListResult.value /// public IReadOnlyList Value { get; } /// - /// The URL to get the next set of managed cluster results. + /// The link to the next page of items /// Serialized Name: ManagedClusterListResult.nextLink /// - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs index c31940a0dfa7..2c9bb17228f5 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs @@ -95,7 +95,7 @@ internal static ManagedClusterPoolUpgradeProfile DeserializeManagedClusterPoolUp string kubernetesVersion = default; string name = default; ContainerServiceOSType osType = default; - IReadOnlyList upgrades = default; + IList upgrades = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs index ab011460299f..fad311c4f6ac 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs @@ -58,7 +58,7 @@ public partial class ManagedClusterPoolUpgradeProfile /// Serialized Name: ManagedClusterPoolUpgradeProfile.osType /// /// is null. - internal ManagedClusterPoolUpgradeProfile(string kubernetesVersion, ContainerServiceOSType osType) + public ManagedClusterPoolUpgradeProfile(string kubernetesVersion, ContainerServiceOSType osType) { Argument.AssertNotNull(kubernetesVersion, nameof(kubernetesVersion)); @@ -85,7 +85,7 @@ internal ManagedClusterPoolUpgradeProfile(string kubernetesVersion, ContainerSer /// Serialized Name: ManagedClusterPoolUpgradeProfile.upgrades /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterPoolUpgradeProfile(string kubernetesVersion, string name, ContainerServiceOSType osType, IReadOnlyList upgrades, IDictionary serializedAdditionalRawData) + internal ManagedClusterPoolUpgradeProfile(string kubernetesVersion, string name, ContainerServiceOSType osType, IList upgrades, IDictionary serializedAdditionalRawData) { KubernetesVersion = kubernetesVersion; Name = name; @@ -104,24 +104,24 @@ internal ManagedClusterPoolUpgradeProfile() /// Serialized Name: ManagedClusterPoolUpgradeProfile.kubernetesVersion /// [WirePath("kubernetesVersion")] - public string KubernetesVersion { get; } + public string KubernetesVersion { get; set; } /// /// The Agent Pool name. /// Serialized Name: ManagedClusterPoolUpgradeProfile.name /// [WirePath("name")] - public string Name { get; } + public string Name { get; set; } /// /// The operating system type. The default is Linux. /// Serialized Name: ManagedClusterPoolUpgradeProfile.osType /// [WirePath("osType")] - public ContainerServiceOSType OSType { get; } + public ContainerServiceOSType OSType { get; set; } /// /// List of orchestrator types and versions available for upgrade. /// Serialized Name: ManagedClusterPoolUpgradeProfile.upgrades /// [WirePath("upgrades")] - public IReadOnlyList Upgrades { get; } + public IList Upgrades { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs index 092b812f3e7f..9c3ca36be71a 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs @@ -49,7 +49,7 @@ public partial class ManagedClusterPoolUpgradeProfileUpgradesItem private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedClusterPoolUpgradeProfileUpgradesItem() + public ManagedClusterPoolUpgradeProfileUpgradesItem() { } @@ -75,12 +75,12 @@ internal ManagedClusterPoolUpgradeProfileUpgradesItem(string kubernetesVersion, /// Serialized Name: ManagedClusterPoolUpgradeProfileUpgradesItem.kubernetesVersion /// [WirePath("kubernetesVersion")] - public string KubernetesVersion { get; } + public string KubernetesVersion { get; set; } /// /// Whether the Kubernetes version is currently in preview. /// Serialized Name: ManagedClusterPoolUpgradeProfileUpgradesItem.isPreview /// [WirePath("isPreview")] - public bool? IsPreview { get; } + public bool? IsPreview { get; set; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs index 9c9e5e9a87bb..ece0bf96a2ba 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs @@ -47,10 +47,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("licenseType"u8); writer.WriteStringValue(LicenseType.Value.ToString()); } - if (Optional.IsDefined(IsCsiProxyEnabled)) + if (Optional.IsDefined(EnableCsiProxy)) { writer.WritePropertyName("enableCSIProxy"u8); - writer.WriteBooleanValue(IsCsiProxyEnabled.Value); + writer.WriteBooleanValue(EnableCsiProxy.Value); } if (Optional.IsDefined(GmsaProfile)) { @@ -227,7 +227,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCsiProxyEnabled), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnableCsiProxy), out propertyOverride); if (hasPropertyOverride) { builder.Append(" enableCSIProxy: "); @@ -235,10 +235,10 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsDefined(IsCsiProxyEnabled)) + if (Optional.IsDefined(EnableCsiProxy)) { builder.Append(" enableCSIProxy: "); - var boolValue = IsCsiProxyEnabled.Value == true ? "true" : "false"; + var boolValue = EnableCsiProxy.Value == true ? "true" : "false"; builder.AppendLine($"{boolValue}"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs index 958e2ca41777..2b2f05b92c53 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs @@ -74,7 +74,7 @@ public ManagedClusterWindowsProfile(string adminUsername) /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. /// Serialized Name: ManagedClusterWindowsProfile.licenseType /// - /// + /// /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// Serialized Name: ManagedClusterWindowsProfile.enableCSIProxy /// @@ -83,12 +83,12 @@ public ManagedClusterWindowsProfile(string adminUsername) /// Serialized Name: ManagedClusterWindowsProfile.gmsaProfile /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterWindowsProfile(string adminUsername, string adminPassword, WindowsVmLicenseType? licenseType, bool? isCsiProxyEnabled, WindowsGmsaProfile gmsaProfile, IDictionary serializedAdditionalRawData) + internal ManagedClusterWindowsProfile(string adminUsername, string adminPassword, WindowsVmLicenseType? licenseType, bool? enableCsiProxy, WindowsGmsaProfile gmsaProfile, IDictionary serializedAdditionalRawData) { AdminUsername = adminUsername; AdminPassword = adminPassword; LicenseType = licenseType; - IsCsiProxyEnabled = isCsiProxyEnabled; + EnableCsiProxy = enableCsiProxy; GmsaProfile = gmsaProfile; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -121,7 +121,7 @@ internal ManagedClusterWindowsProfile() /// Serialized Name: ManagedClusterWindowsProfile.enableCSIProxy /// [WirePath("enableCSIProxy")] - public bool? IsCsiProxyEnabled { get; set; } + public bool? EnableCsiProxy { get; set; } /// /// The Windows gMSA Profile in the Managed Cluster. /// Serialized Name: ManagedClusterWindowsProfile.gmsaProfile diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedNamespaceListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedNamespaceListResult.Serialization.cs index 52d4ec0948b9..5041e22c0587 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedNamespaceListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedNamespaceListResult.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedNamespaceListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static ManagedNamespaceListResult DeserializeManagedNamespaceListResult return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static ManagedNamespaceListResult DeserializeManagedNamespaceListResult } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static ManagedNamespaceListResult DeserializeManagedNamespaceListResult } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedNamespaceListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ManagedNamespaceListResult(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedNamespaceListResult.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedNamespaceListResult.cs index 9d6bddc2e9c1..8517699df8ad 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedNamespaceListResult.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedNamespaceListResult.cs @@ -7,11 +7,12 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ContainerService.Models { /// - /// The result of a request to list managed namespaces in a managed cluster. + /// The response of a ManagedNamespace list operation. /// Serialized Name: ManagedNamespaceListResult /// internal partial class ManagedNamespaceListResult @@ -49,37 +50,49 @@ internal partial class ManagedNamespaceListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedNamespaceListResult() + /// + /// The ManagedNamespace items on this page + /// Serialized Name: ManagedNamespaceListResult.value + /// + /// is null. + internal ManagedNamespaceListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . /// - /// The list of managed namespaces. + /// The ManagedNamespace items on this page /// Serialized Name: ManagedNamespaceListResult.value /// /// - /// The URI to fetch the next page of results, if any. + /// The link to the next page of items /// Serialized Name: ManagedNamespaceListResult.nextLink /// /// Keeps track of any properties unknown to the library. - internal ManagedNamespaceListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ManagedNamespaceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ManagedNamespaceListResult() + { + } + /// - /// The list of managed namespaces. + /// The ManagedNamespace items on this page /// Serialized Name: ManagedNamespaceListResult.value /// public IReadOnlyList Value { get; } /// - /// The URI to fetch the next page of results, if any. + /// The link to the next page of items /// Serialized Name: ManagedNamespaceListResult.nextLink /// - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.Serialization.cs index 54eff8a035de..994cecd09c32 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MeshRevisionProfileList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static MeshRevisionProfileList DeserializeMeshRevisionProfileList(JsonE return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static MeshRevisionProfileList DeserializeMeshRevisionProfileList(JsonE } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static MeshRevisionProfileList DeserializeMeshRevisionProfileList(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new MeshRevisionProfileList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new MeshRevisionProfileList(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.cs index d0bf8d6e110f..8b02d4cb0602 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshRevisionProfileList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ContainerService.Models { @@ -49,37 +50,49 @@ internal partial class MeshRevisionProfileList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MeshRevisionProfileList() + /// + /// The MeshRevisionProfile items on this page + /// Serialized Name: MeshRevisionProfileList.value + /// + /// is null. + internal MeshRevisionProfileList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . /// - /// Array of service mesh add-on revision profiles for all supported mesh modes. + /// The MeshRevisionProfile items on this page /// Serialized Name: MeshRevisionProfileList.value /// /// - /// The URL to get the next set of mesh revision profile. + /// The link to the next page of items /// Serialized Name: MeshRevisionProfileList.nextLink /// /// Keeps track of any properties unknown to the library. - internal MeshRevisionProfileList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MeshRevisionProfileList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal MeshRevisionProfileList() + { + } + /// - /// Array of service mesh add-on revision profiles for all supported mesh modes. + /// The MeshRevisionProfile items on this page /// Serialized Name: MeshRevisionProfileList.value /// public IReadOnlyList Value { get; } /// - /// The URL to get the next set of mesh revision profile. + /// The link to the next page of items /// Serialized Name: MeshRevisionProfileList.nextLink /// - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.Serialization.cs index 0264dab0dfbe..f47406554337 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(MeshUpgradeProfileList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static MeshUpgradeProfileList DeserializeMeshUpgradeProfileList(JsonEle return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static MeshUpgradeProfileList DeserializeMeshUpgradeProfileList(JsonEle } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static MeshUpgradeProfileList DeserializeMeshUpgradeProfileList(JsonEle } } serializedAdditionalRawData = rawDataDictionary; - return new MeshUpgradeProfileList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new MeshUpgradeProfileList(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.cs index e0aa00b1bac3..e9f5eebf11b2 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/MeshUpgradeProfileList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ContainerService.Models { @@ -49,37 +50,49 @@ internal partial class MeshUpgradeProfileList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal MeshUpgradeProfileList() + /// + /// The MeshUpgradeProfile items on this page + /// Serialized Name: MeshUpgradeProfileList.value + /// + /// is null. + internal MeshUpgradeProfileList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . /// - /// Array of supported service mesh add-on upgrade profiles. + /// The MeshUpgradeProfile items on this page /// Serialized Name: MeshUpgradeProfileList.value /// /// - /// The URL to get the next set of mesh upgrade profile. + /// The link to the next page of items /// Serialized Name: MeshUpgradeProfileList.nextLink /// /// Keeps track of any properties unknown to the library. - internal MeshUpgradeProfileList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal MeshUpgradeProfileList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal MeshUpgradeProfileList() + { + } + /// - /// Array of supported service mesh add-on upgrade profiles. + /// The MeshUpgradeProfile items on this page /// Serialized Name: MeshUpgradeProfileList.value /// public IReadOnlyList Value { get; } /// - /// The URL to get the next set of mesh upgrade profile. + /// The link to the next page of items /// Serialized Name: MeshUpgradeProfileList.nextLink /// - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/NamespaceNetworkPolicies.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/NamespaceNetworkPolicies.cs index ad645bd6cda5..fba7898c0dbd 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/NamespaceNetworkPolicies.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/NamespaceNetworkPolicies.cs @@ -55,11 +55,11 @@ public NamespaceNetworkPolicies() /// Initializes a new instance of . /// - /// Ingress policy for the network. + /// Enum representing different network policy rules. /// Serialized Name: NetworkPolicies.ingress /// /// - /// Egress policy for the network. + /// Enum representing different network policy rules. /// Serialized Name: NetworkPolicies.egress /// /// Keeps track of any properties unknown to the library. @@ -71,13 +71,13 @@ internal NamespaceNetworkPolicies(NamespaceNetworkPolicyRule? ingress, Namespace } /// - /// Ingress policy for the network. + /// Enum representing different network policy rules. /// Serialized Name: NetworkPolicies.ingress /// [WirePath("ingress")] public NamespaceNetworkPolicyRule? Ingress { get; set; } /// - /// Egress policy for the network. + /// Enum representing different network policy rules. /// Serialized Name: NetworkPolicies.egress /// [WirePath("egress")] diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSSku.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/Ossku.cs similarity index 58% rename from sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSSku.cs rename to sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/Ossku.cs index 6882e982f370..ef8fe209ff3a 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSSku.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/Ossku.cs @@ -12,15 +12,15 @@ namespace Azure.ResourceManager.ContainerService.Models { /// /// 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. - /// Serialized Name: OSSku + /// Serialized Name: Ossku /// - public readonly partial struct ContainerServiceOSSku : IEquatable + public readonly partial struct Ossku : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public ContainerServiceOSSku(string value) + public Ossku(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -36,56 +36,56 @@ public ContainerServiceOSSku(string value) /// /// Use Ubuntu as the OS for node images. - /// Serialized Name: OSSku.Ubuntu + /// Serialized Name: Ossku.Ubuntu /// - public static ContainerServiceOSSku Ubuntu { get; } = new ContainerServiceOSSku(UbuntuValue); + public static Ossku Ubuntu { get; } = new Ossku(UbuntuValue); /// /// Use AzureLinux as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, visit https://aka.ms/azurelinux for more information. - /// Serialized Name: OSSku.AzureLinux + /// Serialized Name: Ossku.AzureLinux /// - public static ContainerServiceOSSku AzureLinux { get; } = new ContainerServiceOSSku(AzureLinuxValue); + public static Ossku AzureLinux { get; } = new Ossku(AzureLinuxValue); /// /// Use AzureLinux3 as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, visit https://aka.ms/azurelinux for more information. For limitations, visit https://aka.ms/aks/node-images. For OS migration guidance, see https://aka.ms/aks/upgrade-os-version. - /// Serialized Name: OSSku.AzureLinux3 + /// Serialized Name: Ossku.AzureLinux3 /// - public static ContainerServiceOSSku AzureLinux3 { get; } = new ContainerServiceOSSku(AzureLinux3Value); + public static Ossku AzureLinux3 { get; } = new Ossku(AzureLinux3Value); /// /// Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. - /// Serialized Name: OSSku.CBLMariner + /// Serialized Name: Ossku.CBLMariner /// - public static ContainerServiceOSSku CblMariner { get; } = new ContainerServiceOSSku(CblMarinerValue); + public static Ossku CblMariner { get; } = new Ossku(CblMarinerValue); /// /// Use Windows2019 as the OS for node images. Unsupported for system node pools. Windows2019 only supports Windows2019 containers; it cannot run Windows2022 containers and vice versa. - /// Serialized Name: OSSku.Windows2019 + /// Serialized Name: Ossku.Windows2019 /// - public static ContainerServiceOSSku Windows2019 { get; } = new ContainerServiceOSSku(Windows2019Value); + public static Ossku Windows2019 { get; } = new Ossku(Windows2019Value); /// /// Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports Windows2022 containers; it cannot run Windows2019 containers and vice versa. - /// Serialized Name: OSSku.Windows2022 + /// Serialized Name: Ossku.Windows2022 /// - public static ContainerServiceOSSku Windows2022 { get; } = new ContainerServiceOSSku(Windows2022Value); + public static Ossku Windows2022 { get; } = new Ossku(Windows2022Value); /// /// Use Ubuntu2204 as the OS for node images, however, Ubuntu 22.04 may not be supported for all nodepools. For limitations and supported kubernetes versions, see https://aka.ms/aks/supported-ubuntu-versions - /// Serialized Name: OSSku.Ubuntu2204 + /// Serialized Name: Ossku.Ubuntu2204 /// - public static ContainerServiceOSSku Ubuntu2204 { get; } = new ContainerServiceOSSku(Ubuntu2204Value); + public static Ossku Ubuntu2204 { get; } = new Ossku(Ubuntu2204Value); /// - /// Use Ubuntu2404 as the OS for node images, however, Ubuntu 24.04 may not be supported for all nodepools. For limitations and supported kubernetes versions, see https://aka.ms/aks/supported-ubuntu-versions - /// Serialized Name: OSSku.Ubuntu2404 + /// Use Ubuntu2404 as the OS for node images, however, Ubuntu 24.04 may not be supported for all nodepools. For limitations and supported kubernetes versions, see see https://aka.ms/aks/supported-ubuntu-versions + /// Serialized Name: Ossku.Ubuntu2404 /// - public static ContainerServiceOSSku Ubuntu2404 { get; } = new ContainerServiceOSSku(Ubuntu2404Value); - /// Determines if two values are the same. - public static bool operator ==(ContainerServiceOSSku left, ContainerServiceOSSku right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ContainerServiceOSSku left, ContainerServiceOSSku right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator ContainerServiceOSSku(string value) => new ContainerServiceOSSku(value); + public static Ossku Ubuntu2404 { get; } = new Ossku(Ubuntu2404Value); + /// Determines if two values are the same. + public static bool operator ==(Ossku left, Ossku right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Ossku left, Ossku right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator Ossku(string value) => new Ossku(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ContainerServiceOSSku other && Equals(other); + public override bool Equals(object obj) => obj is Ossku other && Equals(other); /// - public bool Equals(ContainerServiceOSSku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(Ossku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.Serialization.cs index 6173402a9da5..a0a9f1d561ff 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.Serialization.cs @@ -43,10 +43,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteObjectValue(item, options); } writer.WriteEndArray(); - if (options.Format != "W" && Optional.IsDefined(NextLink)) + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -86,7 +86,7 @@ internal static OutboundEnvironmentEndpointListResult DeserializeOutboundEnviron return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -103,7 +103,11 @@ internal static OutboundEnvironmentEndpointListResult DeserializeOutboundEnviron } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -160,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.cs index 9d97d0b0df22..6792864c4f5d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/OutboundEnvironmentEndpointListResult.cs @@ -51,7 +51,7 @@ internal partial class OutboundEnvironmentEndpointListResult /// Initializes a new instance of . /// - /// Collection of resources. + /// The OutboundEnvironmentEndpoint items on this page /// Serialized Name: OutboundEnvironmentEndpointCollection.value /// /// is null. @@ -64,15 +64,15 @@ internal OutboundEnvironmentEndpointListResult(IEnumerable Initializes a new instance of . /// - /// Collection of resources. + /// The OutboundEnvironmentEndpoint items on this page /// Serialized Name: OutboundEnvironmentEndpointCollection.value /// /// - /// Link to next page of resources. + /// The link to the next page of items /// Serialized Name: OutboundEnvironmentEndpointCollection.nextLink /// /// Keeps track of any properties unknown to the library. - internal OutboundEnvironmentEndpointListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal OutboundEnvironmentEndpointListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; @@ -85,14 +85,14 @@ internal OutboundEnvironmentEndpointListResult() } /// - /// Collection of resources. + /// The OutboundEnvironmentEndpoint items on this page /// Serialized Name: OutboundEnvironmentEndpointCollection.value /// public IReadOnlyList Value { get; } /// - /// Link to next page of resources. + /// The link to the next page of items /// Serialized Name: OutboundEnvironmentEndpointCollection.nextLink /// - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.Serialization.cs index 61f9dc65dccb..4cf600f0f2c4 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TrustedAccessRoleBindingListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static TrustedAccessRoleBindingListResult DeserializeTrustedAccessRoleB return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static TrustedAccessRoleBindingListResult DeserializeTrustedAccessRoleB } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static TrustedAccessRoleBindingListResult DeserializeTrustedAccessRoleB } } serializedAdditionalRawData = rawDataDictionary; - return new TrustedAccessRoleBindingListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new TrustedAccessRoleBindingListResult(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.cs index b8d4b3efbd94..eb9986627102 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleBindingListResult.cs @@ -7,11 +7,12 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ContainerService.Models { /// - /// List of trusted access role bindings + /// The response of a TrustedAccessRoleBinding list operation. /// Serialized Name: TrustedAccessRoleBindingListResult /// internal partial class TrustedAccessRoleBindingListResult @@ -49,37 +50,49 @@ internal partial class TrustedAccessRoleBindingListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal TrustedAccessRoleBindingListResult() + /// + /// The TrustedAccessRoleBinding items on this page + /// Serialized Name: TrustedAccessRoleBindingListResult.value + /// + /// is null. + internal TrustedAccessRoleBindingListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . /// - /// Role binding list + /// The TrustedAccessRoleBinding items on this page /// Serialized Name: TrustedAccessRoleBindingListResult.value /// /// - /// Link to next page of resources. + /// The link to the next page of items /// Serialized Name: TrustedAccessRoleBindingListResult.nextLink /// /// Keeps track of any properties unknown to the library. - internal TrustedAccessRoleBindingListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal TrustedAccessRoleBindingListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal TrustedAccessRoleBindingListResult() + { + } + /// - /// Role binding list + /// The TrustedAccessRoleBinding items on this page /// Serialized Name: TrustedAccessRoleBindingListResult.value /// public IReadOnlyList Value { get; } /// - /// Link to next page of resources. + /// The link to the next page of items /// Serialized Name: TrustedAccessRoleBindingListResult.nextLink /// - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.Serialization.cs index 11d670836a3d..88a70c0ded99 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.Serialization.cs @@ -36,20 +36,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(TrustedAccessRoleListResult)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -89,17 +86,13 @@ internal static TrustedAccessRoleListResult DeserializeTrustedAccessRoleListResu return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -110,7 +103,11 @@ internal static TrustedAccessRoleListResult DeserializeTrustedAccessRoleListResu } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -119,7 +116,7 @@ internal static TrustedAccessRoleListResult DeserializeTrustedAccessRoleListResu } } serializedAdditionalRawData = rawDataDictionary; - return new TrustedAccessRoleListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new TrustedAccessRoleListResult(value, nextLink, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -167,15 +164,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(NextLink)) { builder.Append(" nextLink: "); - if (NextLink.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{NextLink}'''"); - } - else - { - builder.AppendLine($"'{NextLink}'"); - } + builder.AppendLine($"'{NextLink.AbsoluteUri}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.cs index d324df6eb481..2a88eb622b59 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/TrustedAccessRoleListResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ContainerService.Models { @@ -49,37 +50,49 @@ internal partial class TrustedAccessRoleListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal TrustedAccessRoleListResult() + /// + /// The TrustedAccessRole items on this page + /// Serialized Name: TrustedAccessRoleListResult.value + /// + /// is null. + internal TrustedAccessRoleListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . /// - /// Role list + /// The TrustedAccessRole items on this page /// Serialized Name: TrustedAccessRoleListResult.value /// /// - /// Link to next page of resources. + /// The link to the next page of items /// Serialized Name: TrustedAccessRoleListResult.nextLink /// /// Keeps track of any properties unknown to the library. - internal TrustedAccessRoleListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal TrustedAccessRoleListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal TrustedAccessRoleListResult() + { + } + /// - /// Role list + /// The TrustedAccessRole items on this page /// Serialized Name: TrustedAccessRoleListResult.value /// public IReadOnlyList Value { get; } /// - /// Link to next page of resources. + /// The link to the next page of items /// Serialized Name: TrustedAccessRoleListResult.nextLink /// - public string NextLink { get; } + public Uri NextLink { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/AgentPoolsRestOperations.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/AgentPoolsRestOperations.cs index c4d562551aa9..c7e2f3841663 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/AgentPoolsRestOperations.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/AgentPoolsRestOperations.cs @@ -36,100 +36,6 @@ public AgentPoolsRestOperations(HttpPipeline pipeline, string applicationId, Uri _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateAbortLatestOperationRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) - { - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedclusters/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/agentPools/", false); - uri.AppendPath(agentPoolName, true); - uri.AppendPath("/abort", false); - uri.AppendQuery("api-version", _apiVersion, true); - return uri; - } - - internal HttpMessage CreateAbortLatestOperationRequest(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Post; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedclusters/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/agentPools/", false); - uri.AppendPath(agentPoolName, true); - uri.AppendPath("/abort", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// 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. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the agent pool. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task AbortLatestOperationAsync(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - - using var message = CreateAbortLatestOperationRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// 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. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the agent pool. - /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response AbortLatestOperation(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - - using var message = CreateAbortLatestOperationRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 202: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); @@ -363,11 +269,11 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r request.Uri = uri; if (ifMatch != null) { - request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("if-match", ifMatch); } if (ifNoneMatch != null) { - request.Headers.Add("If-None-Match", ifNoneMatch); + request.Headers.Add("if-none-match", ifNoneMatch); } request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); @@ -483,7 +389,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG request.Uri = uri; if (ifMatch != null) { - request.Headers.Add("If-Match", ifMatch); + request.Headers.Add("if-match", ifMatch); } request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); @@ -548,7 +454,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r } } - internal RequestUriBuilder CreateGetUpgradeProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) + internal RequestUriBuilder CreateAbortLatestOperationRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -560,16 +466,16 @@ internal RequestUriBuilder CreateGetUpgradeProfileRequestUri(string subscription uri.AppendPath(resourceName, true); uri.AppendPath("/agentPools/", false); uri.AppendPath(agentPoolName, true); - uri.AppendPath("/upgradeProfiles/default", false); + uri.AppendPath("/abort", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetUpgradeProfileRequest(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) + internal HttpMessage CreateAbortLatestOperationRequest(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -580,7 +486,7 @@ internal HttpMessage CreateGetUpgradeProfileRequest(string subscriptionId, strin uri.AppendPath(resourceName, true); uri.AppendPath("/agentPools/", false); uri.AppendPath(agentPoolName, true); - uri.AppendPath("/upgradeProfiles/default", false); + uri.AppendPath("/abort", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -588,7 +494,7 @@ internal HttpMessage CreateGetUpgradeProfileRequest(string subscriptionId, strin return message; } - /// Gets the upgrade profile for an agent pool. + /// 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. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. @@ -596,32 +502,26 @@ internal HttpMessage CreateGetUpgradeProfileRequest(string subscriptionId, strin /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetUpgradeProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) + public async Task AbortLatestOperationAsync(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var message = CreateGetUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); + using var message = CreateAbortLatestOperationRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - AgentPoolUpgradeProfileData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AgentPoolUpgradeProfileData.DeserializeAgentPoolUpgradeProfileData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AgentPoolUpgradeProfileData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets the upgrade profile for an agent pool. + /// 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. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. @@ -629,26 +529,20 @@ public async Task> GetUpgradeProfileAsync( /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response GetUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) + public Response AbortLatestOperation(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var message = CreateGetUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); + using var message = CreateAbortLatestOperationRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - AgentPoolUpgradeProfileData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AgentPoolUpgradeProfileData.DeserializeAgentPoolUpgradeProfileData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((AgentPoolUpgradeProfileData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -754,7 +648,7 @@ public Response DeleteMachines(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateGetAvailableAgentPoolVersionsRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateUpgradeNodeImageVersionRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -764,16 +658,18 @@ internal RequestUriBuilder CreateGetAvailableAgentPoolVersionsRequestUri(string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/availableAgentPoolVersions", false); + uri.AppendPath("/agentPools/", false); + uri.AppendPath(agentPoolName, true); + uri.AppendPath("/upgradeNodeImageVersion", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetAvailableAgentPoolVersionsRequest(string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateUpgradeNodeImageVersionRequest(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -782,7 +678,9 @@ internal HttpMessage CreateGetAvailableAgentPoolVersionsRequest(string subscript uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/availableAgentPoolVersions", false); + uri.AppendPath("/agentPools/", false); + uri.AppendPath(agentPoolName, true); + uri.AppendPath("/upgradeNodeImageVersion", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -790,65 +688,61 @@ internal HttpMessage CreateGetAvailableAgentPoolVersionsRequest(string subscript return message; } - /// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. + /// 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. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. + /// The name of the agent pool. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAvailableAgentPoolVersionsAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpgradeNodeImageVersionAsync(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var message = CreateGetAvailableAgentPoolVersionsRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateUpgradeNodeImageVersionRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - AgentPoolAvailableVersions value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = AgentPoolAvailableVersions.DeserializeAgentPoolAvailableVersions(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. + /// 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. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. + /// The name of the agent pool. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetAvailableAgentPoolVersions(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response UpgradeNodeImageVersion(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var message = CreateGetAvailableAgentPoolVersionsRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateUpgradeNodeImageVersionRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - AgentPoolAvailableVersions value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = AgentPoolAvailableVersions.DeserializeAgentPoolAvailableVersions(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpgradeNodeImageVersionRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) + internal RequestUriBuilder CreateGetUpgradeProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -860,16 +754,16 @@ internal RequestUriBuilder CreateUpgradeNodeImageVersionRequestUri(string subscr uri.AppendPath(resourceName, true); uri.AppendPath("/agentPools/", false); uri.AppendPath(agentPoolName, true); - uri.AppendPath("/upgradeNodeImageVersion", false); + uri.AppendPath("/upgradeProfiles/default", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpgradeNodeImageVersionRequest(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) + internal HttpMessage CreateGetUpgradeProfileRequest(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -880,7 +774,7 @@ internal HttpMessage CreateUpgradeNodeImageVersionRequest(string subscriptionId, uri.AppendPath(resourceName, true); uri.AppendPath("/agentPools/", false); uri.AppendPath(agentPoolName, true); - uri.AppendPath("/upgradeNodeImageVersion", false); + uri.AppendPath("/upgradeProfiles/default", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -888,7 +782,7 @@ internal HttpMessage CreateUpgradeNodeImageVersionRequest(string subscriptionId, return message; } - /// 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. + /// Gets the upgrade profile for an agent pool. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. @@ -896,26 +790,32 @@ internal HttpMessage CreateUpgradeNodeImageVersionRequest(string subscriptionId, /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpgradeNodeImageVersionAsync(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) + public async Task> GetUpgradeProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var message = CreateUpgradeNodeImageVersionRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); + using var message = CreateGetUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AgentPoolUpgradeProfileData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AgentPoolUpgradeProfileData.DeserializeAgentPoolUpgradeProfileData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AgentPoolUpgradeProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// 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. + /// Gets the upgrade profile for an agent pool. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. @@ -923,20 +823,120 @@ public async Task UpgradeNodeImageVersionAsync(string subscriptionId, /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response UpgradeNodeImageVersion(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) + public Response GetUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNullOrEmpty(agentPoolName, nameof(agentPoolName)); - using var message = CreateUpgradeNodeImageVersionRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); + using var message = CreateGetUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName, agentPoolName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + AgentPoolUpgradeProfileData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AgentPoolUpgradeProfileData.DeserializeAgentPoolUpgradeProfileData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AgentPoolUpgradeProfileData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetAvailableAgentPoolVersionsRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/availableAgentPoolVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetAvailableAgentPoolVersionsRequest(string subscriptionId, string resourceGroupName, string resourceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/availableAgentPoolVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the managed cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAvailableAgentPoolVersionsAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + + using var message = CreateGetAvailableAgentPoolVersionsRequest(subscriptionId, resourceGroupName, resourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AgentPoolAvailableVersions value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AgentPoolAvailableVersions.DeserializeAgentPoolAvailableVersions(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details about the version lifecycle. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the managed cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetAvailableAgentPoolVersions(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + + using var message = CreateGetAvailableAgentPoolVersionsRequest(subscriptionId, resourceGroupName, resourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AgentPoolAvailableVersions value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AgentPoolAvailableVersions.DeserializeAgentPoolAvailableVersions(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/MachinesRestOperations.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/MachinesRestOperations.cs index 9c3f47216e7e..dc741cbd79c1 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/MachinesRestOperations.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/MachinesRestOperations.cs @@ -185,7 +185,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The name of the agent pool. - /// host name of the machine. + /// Host name of the machine. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. @@ -220,7 +220,7 @@ public async Task> GetAsync(string subscri /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The name of the agent pool. - /// host name of the machine. + /// Host name of the machine. /// The cancellation token to use. /// , , , or is null. /// , , , or is an empty string, and was expected to be non-empty. diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/ManagedClustersRestOperations.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/ManagedClustersRestOperations.cs index 8b9d9d7362e3..92bbab3e0518 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/ManagedClustersRestOperations.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/ManagedClustersRestOperations.cs @@ -120,18 +120,20 @@ public Response ListKubernetesVersions(string subsc } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId) + internal RequestUriBuilder CreateListMeshRevisionProfilesRequestUri(string subscriptionId, AzureLocation location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters", false); + uri.AppendPath("/providers/Microsoft.ContainerService/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/meshRevisionProfiles", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId) + internal HttpMessage CreateListMeshRevisionProfilesRequest(string subscriptionId, AzureLocation location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -140,7 +142,9 @@ internal HttpMessage CreateListRequest(string subscriptionId) uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters", false); + uri.AppendPath("/providers/Microsoft.ContainerService/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/meshRevisionProfiles", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -148,24 +152,25 @@ internal HttpMessage CreateListRequest(string subscriptionId) return message; } - /// Gets a list of managed clusters in the specified subscription. + /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades. /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListMeshRevisionProfilesAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateListMeshRevisionProfilesRequest(subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ManagedClusterListResult value = default; + MeshRevisionProfileList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); + value = MeshRevisionProfileList.DeserializeMeshRevisionProfileList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -173,24 +178,25 @@ public async Task> ListAsync(string subscript } } - /// Gets a list of managed clusters in the specified subscription. + /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades. /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, CancellationToken cancellationToken = default) + public Response ListMeshRevisionProfiles(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListRequest(subscriptionId); + using var message = CreateListMeshRevisionProfilesRequest(subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ManagedClusterListResult value = default; + MeshRevisionProfileList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); + value = MeshRevisionProfileList.DeserializeMeshRevisionProfileList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -198,20 +204,21 @@ public Response List(string subscriptionId, Cancellati } } - internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateGetMeshRevisionProfileRequestUri(string subscriptionId, AzureLocation location, string mode) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters", false); + uri.AppendPath("/providers/Microsoft.ContainerService/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/meshRevisionProfiles/", false); + uri.AppendPath(mode, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + internal HttpMessage CreateGetMeshRevisionProfileRequest(string subscriptionId, AzureLocation location, string mode) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -220,9 +227,10 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters", false); + uri.AppendPath("/providers/Microsoft.ContainerService/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/meshRevisionProfiles/", false); + uri.AppendPath(mode, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -230,76 +238,78 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str return message; } - /// Lists managed clusters in the specified subscription and resource group. + /// Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. + /// The name of the Azure region. + /// The mode of the mesh. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetMeshRevisionProfileAsync(string subscriptionId, AzureLocation location, string mode, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mode, nameof(mode)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateGetMeshRevisionProfileRequest(subscriptionId, location, mode); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ManagedClusterListResult value = default; + MeshRevisionProfileData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); + value = MeshRevisionProfileData.DeserializeMeshRevisionProfileData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MeshRevisionProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Lists managed clusters in the specified subscription and resource group. + /// Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. + /// The name of the Azure region. + /// The mode of the mesh. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetMeshRevisionProfile(string subscriptionId, AzureLocation location, string mode, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(mode, nameof(mode)); - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + using var message = CreateGetMeshRevisionProfileRequest(subscriptionId, location, mode); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ManagedClusterListResult value = default; + MeshRevisionProfileData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); + value = MeshRevisionProfileData.DeserializeMeshRevisionProfileData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((MeshRevisionProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetUpgradeProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/upgradeProfiles/default", false); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetUpgradeProfileRequest(string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateListRequest(string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -308,11 +318,7 @@ internal HttpMessage CreateGetUpgradeProfileRequest(string subscriptionId, strin uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/upgradeProfiles/default", false); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -320,69 +326,57 @@ internal HttpMessage CreateGetUpgradeProfileRequest(string subscriptionId, strin return message; } - /// Gets the upgrade profile of a managed cluster. + /// Gets a list of managed clusters in the specified subscription. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetUpgradeProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateGetUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateListRequest(subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ManagedClusterUpgradeProfileData value = default; + ManagedClusterListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedClusterUpgradeProfileData.DeserializeManagedClusterUpgradeProfileData(document.RootElement); + value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ManagedClusterUpgradeProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets the upgrade profile of a managed cluster. + /// Gets a list of managed clusters in the specified subscription. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response GetUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateGetUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateListRequest(subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ManagedClusterUpgradeProfileData value = default; + ManagedClusterListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedClusterUpgradeProfileData.DeserializeManagedClusterUpgradeProfileData(document.RootElement); + value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ManagedClusterUpgradeProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetAccessProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string roleName) + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -390,31 +384,23 @@ internal RequestUriBuilder CreateGetAccessProfileRequestUri(string subscriptionI uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/accessProfiles/", false); - uri.AppendPath(roleName, true); - uri.AppendPath("/listCredential", false); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetAccessProfileRequest(string subscriptionId, string resourceGroupName, string resourceName, string roleName) + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); - uri.AppendPath(resourceName, true); - uri.AppendPath("/accessProfiles/", false); - uri.AppendPath(roleName, true); - uri.AppendPath("/listCredential", false); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -422,30 +408,26 @@ internal HttpMessage CreateGetAccessProfileRequest(string subscriptionId, string return message; } - /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . + /// Lists managed clusters in the specified subscription and resource group. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the role for managed cluster accessProfile resource. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAccessProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, string roleName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(roleName, nameof(roleName)); - using var message = CreateGetAccessProfileRequest(subscriptionId, resourceGroupName, resourceName, roleName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ManagedClusterAccessProfile value = default; + ManagedClusterListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedClusterAccessProfile.DeserializeManagedClusterAccessProfile(document.RootElement); + value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -453,30 +435,26 @@ public async Task> GetAccessProfileAsync(s } } - /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . + /// Lists managed clusters in the specified subscription and resource group. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. - /// The name of the role for managed cluster accessProfile resource. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetAccessProfile(string subscriptionId, string resourceGroupName, string resourceName, string roleName, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(roleName, nameof(roleName)); - using var message = CreateGetAccessProfileRequest(subscriptionId, resourceGroupName, resourceName, roleName); + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ManagedClusterAccessProfile value = default; + ManagedClusterListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedClusterAccessProfile.DeserializeManagedClusterAccessProfile(document.RootElement); + value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -484,7 +462,7 @@ public Response GetAccessProfile(string subscriptio } } - internal RequestUriBuilder CreateListClusterAdminCredentialsRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -494,20 +472,15 @@ internal RequestUriBuilder CreateListClusterAdminCredentialsRequestUri(string su uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/listClusterAdminCredential", false); uri.AppendQuery("api-version", _apiVersion, true); - if (serverFqdn != null) - { - uri.AppendQuery("server-fqdn", serverFqdn, true); - } return uri; } - internal HttpMessage CreateListClusterAdminCredentialsRequest(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -516,79 +489,76 @@ internal HttpMessage CreateListClusterAdminCredentialsRequest(string subscriptio uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/listClusterAdminCredential", false); uri.AppendQuery("api-version", _apiVersion, true); - if (serverFqdn != null) - { - uri.AppendQuery("server-fqdn", serverFqdn, true); - } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Lists the admin credentials of a managed cluster. + /// Gets a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// server fqdn type for credentials to be returned. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListClusterAdminCredentialsAsync(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListClusterAdminCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ManagedClusterCredentials value = default; + ContainerServiceManagedClusterData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); + value = ContainerServiceManagedClusterData.DeserializeContainerServiceManagedClusterData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ContainerServiceManagedClusterData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Lists the admin credentials of a managed cluster. + /// Gets a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// server fqdn type for credentials to be returned. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListClusterAdminCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListClusterAdminCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ManagedClusterCredentials value = default; + ContainerServiceManagedClusterData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); + value = ContainerServiceManagedClusterData.DeserializeContainerServiceManagedClusterData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ContainerServiceManagedClusterData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListClusterUserCredentialsRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, KubeConfigFormat? format) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceManagedClusterData data, string ifMatch, string ifNoneMatch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -598,24 +568,15 @@ internal RequestUriBuilder CreateListClusterUserCredentialsRequestUri(string sub uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/listClusterUserCredential", false); uri.AppendQuery("api-version", _apiVersion, true); - if (serverFqdn != null) - { - uri.AppendQuery("server-fqdn", serverFqdn, true); - } - if (format != null) - { - uri.AppendQuery("format", format.Value.ToString(), true); - } return uri; } - internal HttpMessage CreateListClusterUserCredentialsRequest(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, KubeConfigFormat? format) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceManagedClusterData data, string ifMatch, string ifNoneMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -624,85 +585,84 @@ internal HttpMessage CreateListClusterUserCredentialsRequest(string subscription uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/listClusterUserCredential", false); uri.AppendQuery("api-version", _apiVersion, true); - if (serverFqdn != null) + request.Uri = uri; + if (ifMatch != null) { - uri.AppendQuery("server-fqdn", serverFqdn, true); + request.Headers.Add("if-match", ifMatch); } - if (format != null) + if (ifNoneMatch != null) { - uri.AppendQuery("format", format.Value.ToString(), true); + request.Headers.Add("if-none-match", ifNoneMatch); } - request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Lists the user credentials of a managed cluster. + /// Creates or updates a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// server fqdn type for credentials to be returned. - /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. + /// 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. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListClusterUserCredentialsAsync(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, KubeConfigFormat? format = null, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceManagedClusterData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListClusterUserCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn, format); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, resourceName, data, ifMatch, ifNoneMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - ManagedClusterCredentials value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists the user credentials of a managed cluster. + /// Creates or updates a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// server fqdn type for credentials to be returned. - /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. + /// 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. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListClusterUserCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, KubeConfigFormat? format = null, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceManagedClusterData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateListClusterUserCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn, format); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, resourceName, data, ifMatch, ifNoneMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - ManagedClusterCredentials value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 201: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListClusterMonitoringUserCredentialsRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn) + internal RequestUriBuilder CreateUpdateTagsRequestUri(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceTagsObject containerServiceTagsObject, string ifMatch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -712,20 +672,15 @@ internal RequestUriBuilder CreateListClusterMonitoringUserCredentialsRequestUri( uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/listClusterMonitoringUserCredential", false); uri.AppendQuery("api-version", _apiVersion, true); - if (serverFqdn != null) - { - uri.AppendQuery("server-fqdn", serverFqdn, true); - } return uri; } - internal HttpMessage CreateListClusterMonitoringUserCredentialsRequest(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn) + internal HttpMessage CreateUpdateTagsRequest(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceTagsObject containerServiceTagsObject, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -734,79 +689,78 @@ internal HttpMessage CreateListClusterMonitoringUserCredentialsRequest(string su uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/listClusterMonitoringUserCredential", false); uri.AppendQuery("api-version", _apiVersion, true); - if (serverFqdn != null) + request.Uri = uri; + if (ifMatch != null) { - uri.AppendQuery("server-fqdn", serverFqdn, true); + request.Headers.Add("if-match", ifMatch); } - request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(containerServiceTagsObject, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Lists the cluster monitoring user credentials of a managed cluster. + /// Updates tags on a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// server fqdn type for credentials to be returned. + /// 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. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListClusterMonitoringUserCredentialsAsync(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, CancellationToken cancellationToken = default) + public async Task UpdateTagsAsync(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceTagsObject containerServiceTagsObject, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject)); - using var message = CreateListClusterMonitoringUserCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn); + using var message = CreateUpdateTagsRequest(subscriptionId, resourceGroupName, resourceName, containerServiceTagsObject, ifMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - ManagedClusterCredentials value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists the cluster monitoring user credentials of a managed cluster. + /// Updates tags on a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// server fqdn type for credentials to be returned. + /// 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. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListClusterMonitoringUserCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, CancellationToken cancellationToken = default) + public Response UpdateTags(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceTagsObject containerServiceTagsObject, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject)); - using var message = CreateListClusterMonitoringUserCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn); + using var message = CreateUpdateTagsRequest(subscriptionId, resourceGroupName, resourceName, containerServiceTagsObject, ifMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - ManagedClusterCredentials value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -820,11 +774,11 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -835,74 +789,68 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; + if (ifMatch != null) + { + request.Headers.Add("if-match", ifMatch); + } request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Gets a managed cluster. + /// Deletes a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. + /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, resourceName, ifMatch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ContainerServiceManagedClusterData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ContainerServiceManagedClusterData.DeserializeContainerServiceManagedClusterData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerServiceManagedClusterData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets a managed cluster. + /// Deletes a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. + /// The request should only proceed if an entity matches this string. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, resourceName, ifMatch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ContainerServiceManagedClusterData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ContainerServiceManagedClusterData.DeserializeContainerServiceManagedClusterData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ContainerServiceManagedClusterData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceManagedClusterData data, string ifMatch, string ifNoneMatch) + internal RequestUriBuilder CreateAbortLatestOperationRequestUri(string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -912,15 +860,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); + uri.AppendPath("/abort", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceManagedClusterData data, string ifMatch, string ifNoneMatch) + internal HttpMessage CreateAbortLatestOperationRequest(string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -929,84 +878,65 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); + uri.AppendPath("/abort", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } - if (ifNoneMatch != null) - { - request.Headers.Add("If-None-Match", ifNoneMatch); - } request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Creates or updates a managed cluster. + /// 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. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// 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. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceManagedClusterData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public async Task AbortLatestOperationAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, resourceName, data, ifMatch, ifNoneMatch); + using var message = CreateAbortLatestOperationRequest(subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Creates or updates a managed cluster. + /// 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. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// 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. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceManagedClusterData data, string ifMatch = null, string ifNoneMatch = null, CancellationToken cancellationToken = default) + public Response AbortLatestOperation(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, resourceName, data, ifMatch, ifNoneMatch); + using var message = CreateAbortLatestOperationRequest(subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - case 201: + case 202: + case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateTagsRequestUri(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceTagsObject containerServiceTagsObject, string ifMatch) + internal RequestUriBuilder CreateGetAccessProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string roleName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1016,15 +946,18 @@ internal RequestUriBuilder CreateUpdateTagsRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); + uri.AppendPath("/accessProfiles/", false); + uri.AppendPath(roleName, true); + uri.AppendPath("/listCredential", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateTagsRequest(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceTagsObject containerServiceTagsObject, string ifMatch) + internal HttpMessage CreateGetAccessProfileRequest(string subscriptionId, string resourceGroupName, string resourceName, string roleName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1033,76 +966,79 @@ internal HttpMessage CreateUpdateTagsRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); + uri.AppendPath("/accessProfiles/", false); + uri.AppendPath(roleName, true); + uri.AppendPath("/listCredential", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(containerServiceTagsObject, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates tags on a managed cluster. + /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// Parameters supplied to the Update Managed Cluster Tags operation. - /// The request should only proceed if an entity matches this string. + /// The name of the role for managed cluster accessProfile resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task UpdateTagsAsync(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceTagsObject containerServiceTagsObject, string ifMatch = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAccessProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, string roleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject)); + Argument.AssertNotNullOrEmpty(roleName, nameof(roleName)); - using var message = CreateUpdateTagsRequest(subscriptionId, resourceGroupName, resourceName, containerServiceTagsObject, ifMatch); + using var message = CreateGetAccessProfileRequest(subscriptionId, resourceGroupName, resourceName, roleName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - return message.Response; - default: + { + ManagedClusterAccessProfile value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedClusterAccessProfile.DeserializeManagedClusterAccessProfile(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: throw new RequestFailedException(message.Response); } } - /// Updates tags on a managed cluster. + /// **WARNING**: This API will be deprecated. Instead use [ListClusterUserCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusterusercredentials) or [ListClusterAdminCredentials](https://docs.microsoft.com/rest/api/aks/managedclusters/listclusteradmincredentials) . /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// Parameters supplied to the Update Managed Cluster Tags operation. - /// The request should only proceed if an entity matches this string. + /// The name of the role for managed cluster accessProfile resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response UpdateTags(string subscriptionId, string resourceGroupName, string resourceName, ContainerServiceTagsObject containerServiceTagsObject, string ifMatch = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetAccessProfile(string subscriptionId, string resourceGroupName, string resourceName, string roleName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject)); + Argument.AssertNotNullOrEmpty(roleName, nameof(roleName)); - using var message = CreateUpdateTagsRequest(subscriptionId, resourceGroupName, resourceName, containerServiceTagsObject, ifMatch); + using var message = CreateGetAccessProfileRequest(subscriptionId, resourceGroupName, resourceName, roleName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - return message.Response; + { + ManagedClusterAccessProfile value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedClusterAccessProfile.DeserializeManagedClusterAccessProfile(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch) + internal RequestUriBuilder CreateGetCommandResultRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string commandId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1112,15 +1048,17 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); + uri.AppendPath("/commandResults/", false); + uri.AppendPath(commandId, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch) + internal HttpMessage CreateGetCommandResultRequest(string subscriptionId, string resourceGroupName, string resourceName, string commandId) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1129,70 +1067,82 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); + uri.AppendPath("/commandResults/", false); + uri.AppendPath(commandId, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; - if (ifMatch != null) - { - request.Headers.Add("If-Match", ifMatch); - } request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// Deletes a managed cluster. + /// Gets the results of a command which has been run on the Managed Cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// The request should only proceed if an entity matches this string. + /// Id of the command. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetCommandResultAsync(string subscriptionId, string resourceGroupName, string resourceName, string commandId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(commandId, nameof(commandId)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, resourceName, ifMatch); + using var message = CreateGetCommandResultRequest(subscriptionId, resourceGroupName, resourceName, commandId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: + { + ManagedClusterRunCommandResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedClusterRunCommandResult.DeserializeManagedClusterRunCommandResult(document.RootElement); + return Response.FromValue(value, message.Response); + } case 202: - case 204: - return message.Response; + return Response.FromValue((ManagedClusterRunCommandResult)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Deletes a managed cluster. + /// Gets the results of a command which has been run on the Managed Cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// The request should only proceed if an entity matches this string. + /// Id of the command. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string resourceName, string ifMatch = null, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetCommandResult(string subscriptionId, string resourceGroupName, string resourceName, string commandId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(commandId, nameof(commandId)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, resourceName, ifMatch); + using var message = CreateGetCommandResultRequest(subscriptionId, resourceGroupName, resourceName, commandId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: + { + ManagedClusterRunCommandResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedClusterRunCommandResult.DeserializeManagedClusterRunCommandResult(document.RootElement); + return Response.FromValue(value, message.Response); + } case 202: - case 204: - return message.Response; + return Response.FromValue((ManagedClusterRunCommandResult)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateResetServicePrincipalProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile) + internal RequestUriBuilder CreateListClusterAdminCredentialsRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1202,12 +1152,16 @@ internal RequestUriBuilder CreateResetServicePrincipalProfileRequestUri(string s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/resetServicePrincipalProfile", false); + uri.AppendPath("/listClusterAdminCredential", false); uri.AppendQuery("api-version", _apiVersion, true); + if (serverFqdn != null) + { + uri.AppendQuery("server-fqdn", serverFqdn, true); + } return uri; } - internal HttpMessage CreateResetServicePrincipalProfileRequest(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile) + internal HttpMessage CreateListClusterAdminCredentialsRequest(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1220,73 +1174,79 @@ internal HttpMessage CreateResetServicePrincipalProfileRequest(string subscripti uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/resetServicePrincipalProfile", false); + uri.AppendPath("/listClusterAdminCredential", false); uri.AppendQuery("api-version", _apiVersion, true); + if (serverFqdn != null) + { + uri.AppendQuery("server-fqdn", serverFqdn, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(managedClusterServicePrincipalProfile, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// This action cannot be performed on a cluster that is not using a service principal. + /// Lists the admin credentials of a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// The service principal profile to set on the managed cluster. + /// server fqdn type for credentials to be returned. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ResetServicePrincipalProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile, CancellationToken cancellationToken = default) + public async Task> ListClusterAdminCredentialsAsync(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(managedClusterServicePrincipalProfile, nameof(managedClusterServicePrincipalProfile)); - using var message = CreateResetServicePrincipalProfileRequest(subscriptionId, resourceGroupName, resourceName, managedClusterServicePrincipalProfile); + using var message = CreateListClusterAdminCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ManagedClusterCredentials value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// This action cannot be performed on a cluster that is not using a service principal. + /// Lists the admin credentials of a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// The service principal profile to set on the managed cluster. + /// server fqdn type for credentials to be returned. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ResetServicePrincipalProfile(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile, CancellationToken cancellationToken = default) + public Response ListClusterAdminCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(managedClusterServicePrincipalProfile, nameof(managedClusterServicePrincipalProfile)); - using var message = CreateResetServicePrincipalProfileRequest(subscriptionId, resourceGroupName, resourceName, managedClusterServicePrincipalProfile); + using var message = CreateListClusterAdminCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ManagedClusterCredentials value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateResetAadProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterAadProfile managedClusterAadProfile) + internal RequestUriBuilder CreateListClusterMonitoringUserCredentialsRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1296,12 +1256,16 @@ internal RequestUriBuilder CreateResetAadProfileRequestUri(string subscriptionId uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/resetAADProfile", false); + uri.AppendPath("/listClusterMonitoringUserCredential", false); uri.AppendQuery("api-version", _apiVersion, true); + if (serverFqdn != null) + { + uri.AppendQuery("server-fqdn", serverFqdn, true); + } return uri; } - internal HttpMessage CreateResetAadProfileRequest(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterAadProfile managedClusterAadProfile) + internal HttpMessage CreateListClusterMonitoringUserCredentialsRequest(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1314,73 +1278,79 @@ internal HttpMessage CreateResetAadProfileRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/resetAADProfile", false); + uri.AppendPath("/listClusterMonitoringUserCredential", false); uri.AppendQuery("api-version", _apiVersion, true); + if (serverFqdn != null) + { + uri.AppendQuery("server-fqdn", serverFqdn, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(managedClusterAadProfile, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + /// Lists the cluster monitoring user credentials of a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// The AAD profile to set on the Managed Cluster. + /// server fqdn type for credentials to be returned. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task ResetAadProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterAadProfile managedClusterAadProfile, CancellationToken cancellationToken = default) + public async Task> ListClusterMonitoringUserCredentialsAsync(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(managedClusterAadProfile, nameof(managedClusterAadProfile)); - using var message = CreateResetAadProfileRequest(subscriptionId, resourceGroupName, resourceName, managedClusterAadProfile); + using var message = CreateListClusterMonitoringUserCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ManagedClusterCredentials value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. + /// Lists the cluster monitoring user credentials of a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// The AAD profile to set on the Managed Cluster. + /// server fqdn type for credentials to be returned. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ResetAadProfile(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterAadProfile managedClusterAadProfile, CancellationToken cancellationToken = default) + public Response ListClusterMonitoringUserCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(managedClusterAadProfile, nameof(managedClusterAadProfile)); - using var message = CreateResetAadProfileRequest(subscriptionId, resourceGroupName, resourceName, managedClusterAadProfile); + using var message = CreateListClusterMonitoringUserCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ManagedClusterCredentials value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRotateClusterCertificatesRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateListClusterUserCredentialsRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, KubeConfigFormat? format) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1390,12 +1360,20 @@ internal RequestUriBuilder CreateRotateClusterCertificatesRequestUri(string subs uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/rotateClusterCertificates", false); + uri.AppendPath("/listClusterUserCredential", false); uri.AppendQuery("api-version", _apiVersion, true); + if (serverFqdn != null) + { + uri.AppendQuery("server-fqdn", serverFqdn, true); + } + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } return uri; } - internal HttpMessage CreateRotateClusterCertificatesRequest(string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateListClusterUserCredentialsRequest(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn, KubeConfigFormat? format) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1408,65 +1386,85 @@ internal HttpMessage CreateRotateClusterCertificatesRequest(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/rotateClusterCertificates", false); + uri.AppendPath("/listClusterUserCredential", false); uri.AppendQuery("api-version", _apiVersion, true); + if (serverFqdn != null) + { + uri.AppendQuery("server-fqdn", serverFqdn, true); + } + if (format != null) + { + uri.AppendQuery("format", format.Value.ToString(), true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. + /// Lists the user credentials of a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. + /// server fqdn type for credentials to be returned. + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task RotateClusterCertificatesAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public async Task> ListClusterUserCredentialsAsync(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, KubeConfigFormat? format = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateRotateClusterCertificatesRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateListClusterUserCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn, format); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + ManagedClusterCredentials value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. + /// Lists the user credentials of a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. + /// server fqdn type for credentials to be returned. + /// Only apply to AAD clusters, specifies the format of returned kubeconfig. Format 'azure' will return azure auth-provider kubeconfig; format 'exec' will return exec format kubeconfig, which requires kubelogin binary in the path. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response RotateClusterCertificates(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public Response ListClusterUserCredentials(string subscriptionId, string resourceGroupName, string resourceName, string serverFqdn = null, KubeConfigFormat? format = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateRotateClusterCertificatesRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateListClusterUserCredentialsRequest(subscriptionId, resourceGroupName, resourceName, serverFqdn, format); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + ManagedClusterCredentials value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedClusterCredentials.DeserializeManagedClusterCredentials(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateAbortLatestOperationRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateListMeshUpgradeProfilesRequestUri(string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1474,27 +1472,27 @@ internal RequestUriBuilder CreateAbortLatestOperationRequestUri(string subscript uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/abort", false); + uri.AppendPath("/meshUpgradeProfiles", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateAbortLatestOperationRequest(string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateListMeshUpgradeProfilesRequest(string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ContainerService/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/abort", false); + uri.AppendPath("/meshUpgradeProfiles", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1502,57 +1500,65 @@ internal HttpMessage CreateAbortLatestOperationRequest(string subscriptionId, st return message; } - /// 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. + /// Lists available upgrades for all service meshes in a specific cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task AbortLatestOperationAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public async Task> ListMeshUpgradeProfilesAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateAbortLatestOperationRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateListMeshUpgradeProfilesRequest(subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + MeshUpgradeProfileList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MeshUpgradeProfileList.DeserializeMeshUpgradeProfileList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// 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. + /// Lists available upgrades for all service meshes in a specific cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response AbortLatestOperation(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public Response ListMeshUpgradeProfiles(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateAbortLatestOperationRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateListMeshUpgradeProfilesRequest(subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + MeshUpgradeProfileList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MeshUpgradeProfileList.DeserializeMeshUpgradeProfileList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRotateServiceAccountSigningKeysRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateGetMeshUpgradeProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string mode) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1562,16 +1568,17 @@ internal RequestUriBuilder CreateRotateServiceAccountSigningKeysRequestUri(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/rotateServiceAccountSigningKeys", false); + uri.AppendPath("/meshUpgradeProfiles/", false); + uri.AppendPath(mode, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRotateServiceAccountSigningKeysRequest(string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateGetMeshUpgradeProfileRequest(string subscriptionId, string resourceGroupName, string resourceName, string mode) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1580,7 +1587,8 @@ internal HttpMessage CreateRotateServiceAccountSigningKeysRequest(string subscri uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/rotateServiceAccountSigningKeys", false); + uri.AppendPath("/meshUpgradeProfiles/", false); + uri.AppendPath(mode, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1588,57 +1596,73 @@ internal HttpMessage CreateRotateServiceAccountSigningKeysRequest(string subscri return message; } - /// Rotates the service account signing keys of a managed cluster. + /// Gets available upgrades for a service mesh in a cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. + /// The mode of the mesh. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task RotateServiceAccountSigningKeysAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetMeshUpgradeProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, string mode, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(mode, nameof(mode)); - using var message = CreateRotateServiceAccountSigningKeysRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateGetMeshUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName, mode); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + MeshUpgradeProfileData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = MeshUpgradeProfileData.DeserializeMeshUpgradeProfileData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MeshUpgradeProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Rotates the service account signing keys of a managed cluster. + /// Gets available upgrades for a service mesh in a cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. + /// The mode of the mesh. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response RotateServiceAccountSigningKeys(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response GetMeshUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, string mode, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(mode, nameof(mode)); - using var message = CreateRotateServiceAccountSigningKeysRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateGetMeshUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName, mode); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + MeshUpgradeProfileData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = MeshUpgradeProfileData.DeserializeMeshUpgradeProfileData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((MeshUpgradeProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsRequestUri(string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1648,16 +1672,16 @@ internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string re uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/stop", false); + uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1666,7 +1690,7 @@ internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGro uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/stop", false); + uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1674,57 +1698,65 @@ internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGro return message; } - /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task StopAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateStopRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + OutboundEnvironmentEndpointListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OutboundEnvironmentEndpointListResult.DeserializeOutboundEnvironmentEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Stop(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateStopRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + OutboundEnvironmentEndpointListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OutboundEnvironmentEndpointListResult.DeserializeOutboundEnvironmentEndpointListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateResetAadProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterAadProfile managedClusterAadProfile) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1734,12 +1766,12 @@ internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/start", false); + uri.AppendPath("/resetAADProfile", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateResetAadProfileRequest(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterAadProfile managedClusterAadProfile) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1752,65 +1784,73 @@ internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/start", false); + uri.AppendPath("/resetAADProfile", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(managedClusterAadProfile, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. + /// The AAD profile to set on the Managed Cluster. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task StartAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public async Task ResetAadProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterAadProfile managedClusterAadProfile, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNull(managedClusterAadProfile, nameof(managedClusterAadProfile)); - using var message = CreateStartRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateResetAadProfileRequest(subscriptionId, resourceGroupName, resourceName, managedClusterAadProfile); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) to update your cluster with AKS-managed Azure AD. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. + /// The AAD profile to set on the Managed Cluster. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Start(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public Response ResetAadProfile(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterAadProfile managedClusterAadProfile, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNull(managedClusterAadProfile, nameof(managedClusterAadProfile)); - using var message = CreateStartRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateResetAadProfileRequest(subscriptionId, resourceGroupName, resourceName, managedClusterAadProfile); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRunCommandRequestUri(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterRunCommandContent content) + internal RequestUriBuilder CreateResetServicePrincipalProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1820,12 +1860,12 @@ internal RequestUriBuilder CreateRunCommandRequestUri(string subscriptionId, str uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/runCommand", false); + uri.AppendPath("/resetServicePrincipalProfile", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRunCommandRequest(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterRunCommandContent content) + internal HttpMessage CreateResetServicePrincipalProfileRequest(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -1838,34 +1878,34 @@ internal HttpMessage CreateRunCommandRequest(string subscriptionId, string resou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/runCommand", false); + uri.AppendPath("/resetServicePrincipalProfile", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(managedClusterServicePrincipalProfile, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// This action cannot be performed on a cluster that is not using a service principal. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// The run command request. + /// The service principal profile to set on the managed cluster. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task RunCommandAsync(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterRunCommandContent content, CancellationToken cancellationToken = default) + public async Task ResetServicePrincipalProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(managedClusterServicePrincipalProfile, nameof(managedClusterServicePrincipalProfile)); - using var message = CreateRunCommandRequest(subscriptionId, resourceGroupName, resourceName, content); + using var message = CreateResetServicePrincipalProfileRequest(subscriptionId, resourceGroupName, resourceName, managedClusterServicePrincipalProfile); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -1877,22 +1917,22 @@ public async Task RunCommandAsync(string subscriptionId, string resour } } - /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// This action cannot be performed on a cluster that is not using a service principal. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// The run command request. + /// The service principal profile to set on the managed cluster. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response RunCommand(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterRunCommandContent content, CancellationToken cancellationToken = default) + public Response ResetServicePrincipalProfile(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(managedClusterServicePrincipalProfile, nameof(managedClusterServicePrincipalProfile)); - using var message = CreateRunCommandRequest(subscriptionId, resourceGroupName, resourceName, content); + using var message = CreateResetServicePrincipalProfileRequest(subscriptionId, resourceGroupName, resourceName, managedClusterServicePrincipalProfile); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -1904,7 +1944,7 @@ public Response RunCommand(string subscriptionId, string resourceGroupName, stri } } - internal RequestUriBuilder CreateGetCommandResultRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string commandId) + internal RequestUriBuilder CreateRotateClusterCertificatesRequestUri(string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -1914,17 +1954,16 @@ internal RequestUriBuilder CreateGetCommandResultRequestUri(string subscriptionI uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/commandResults/", false); - uri.AppendPath(commandId, true); + uri.AppendPath("/rotateClusterCertificates", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetCommandResultRequest(string subscriptionId, string resourceGroupName, string resourceName, string commandId) + internal HttpMessage CreateRotateClusterCertificatesRequest(string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -1933,8 +1972,7 @@ internal HttpMessage CreateGetCommandResultRequest(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/commandResults/", false); - uri.AppendPath(commandId, true); + uri.AppendPath("/rotateClusterCertificates", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -1942,73 +1980,57 @@ internal HttpMessage CreateGetCommandResultRequest(string subscriptionId, string return message; } - /// Gets the results of a command which has been run on the Managed Cluster. + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// Id of the command. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetCommandResultAsync(string subscriptionId, string resourceGroupName, string resourceName, string commandId, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RotateClusterCertificatesAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(commandId, nameof(commandId)); - using var message = CreateGetCommandResultRequest(subscriptionId, resourceGroupName, resourceName, commandId); + using var message = CreateRotateClusterCertificatesRequest(subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ManagedClusterRunCommandResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedClusterRunCommandResult.DeserializeManagedClusterRunCommandResult(document.RootElement); - return Response.FromValue(value, message.Response); - } case 202: - return Response.FromValue((ManagedClusterRunCommandResult)null, message.Response); + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets the results of a command which has been run on the Managed Cluster. + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating managed cluster certificates. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// Id of the command. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetCommandResult(string subscriptionId, string resourceGroupName, string resourceName, string commandId, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RotateClusterCertificates(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(commandId, nameof(commandId)); - using var message = CreateGetCommandResultRequest(subscriptionId, resourceGroupName, resourceName, commandId); + using var message = CreateRotateClusterCertificatesRequest(subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ManagedClusterRunCommandResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedClusterRunCommandResult.DeserializeManagedClusterRunCommandResult(document.RootElement); - return Response.FromValue(value, message.Response); - } case 202: - return Response.FromValue((ManagedClusterRunCommandResult)null, message.Response); + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateRotateServiceAccountSigningKeysRequestUri(string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2018,16 +2040,16 @@ internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsRequest uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); + uri.AppendPath("/rotateServiceAccountSigningKeys", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateRotateServiceAccountSigningKeysRequest(string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2036,7 +2058,7 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(strin uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/outboundNetworkDependenciesEndpoints", false); + uri.AppendPath("/rotateServiceAccountSigningKeys", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2044,175 +2066,179 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsRequest(strin return message; } - /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. + /// Rotates the service account signing keys of a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListOutboundNetworkDependenciesEndpointsAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public async Task RotateServiceAccountSigningKeysAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateRotateServiceAccountSigningKeysRequest(subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - OutboundEnvironmentEndpointListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OutboundEnvironmentEndpointListResult.DeserializeOutboundEnvironmentEndpointListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. + /// Rotates the service account signing keys of a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListOutboundNetworkDependenciesEndpoints(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public Response RotateServiceAccountSigningKeys(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListOutboundNetworkDependenciesEndpointsRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateRotateServiceAccountSigningKeysRequest(subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - OutboundEnvironmentEndpointListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OutboundEnvironmentEndpointListResult.DeserializeOutboundEnvironmentEndpointListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListMeshRevisionProfilesRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateRunCommandRequestUri(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterRunCommandContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.ContainerService/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/meshRevisionProfiles", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/runCommand", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListMeshRevisionProfilesRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateRunCommandRequest(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterRunCommandContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.ContainerService/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/meshRevisionProfiles", false); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/runCommand", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades. + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. + /// The name of the resource group. The name is case insensitive. + /// The name of the managed cluster resource. + /// The run command request. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListMeshRevisionProfilesAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RunCommandAsync(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterRunCommandContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListMeshRevisionProfilesRequest(subscriptionId, location); + using var message = CreateRunCommandRequest(subscriptionId, resourceGroupName, resourceName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - { - MeshRevisionProfileList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MeshRevisionProfileList.DeserializeMeshRevisionProfileList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades. + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. + /// The name of the resource group. The name is case insensitive. + /// The name of the managed cluster resource. + /// The run command request. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListMeshRevisionProfiles(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RunCommand(string subscriptionId, string resourceGroupName, string resourceName, ManagedClusterRunCommandContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateListMeshRevisionProfilesRequest(subscriptionId, location); + using var message = CreateRunCommandRequest(subscriptionId, resourceGroupName, resourceName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - { - MeshRevisionProfileList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MeshRevisionProfileList.DeserializeMeshRevisionProfileList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetMeshRevisionProfileRequestUri(string subscriptionId, AzureLocation location, string mode) + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.ContainerService/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/meshRevisionProfiles/", false); - uri.AppendPath(mode, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/start", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetMeshRevisionProfileRequest(string subscriptionId, AzureLocation location, string mode) + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.ContainerService/locations/", false); - uri.AppendPath(location, true); - uri.AppendPath("/meshRevisionProfiles/", false); - uri.AppendPath(mode, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/start", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2220,67 +2246,57 @@ internal HttpMessage CreateGetMeshRevisionProfileRequest(string subscriptionId, return message; } - /// Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades. + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. - /// The mode of the mesh. + /// The name of the resource group. The name is case insensitive. + /// The name of the managed cluster resource. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetMeshRevisionProfileAsync(string subscriptionId, AzureLocation location, string mode, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task StartAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(mode, nameof(mode)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateGetMeshRevisionProfileRequest(subscriptionId, location, mode); + using var message = CreateStartRequest(subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - MeshRevisionProfileData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MeshRevisionProfileData.DeserializeMeshRevisionProfileData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MeshRevisionProfileData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Contains extra metadata on the revision, including supported revisions, cluster compatibility and available upgrades. + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. - /// The mode of the mesh. + /// The name of the resource group. The name is case insensitive. + /// The name of the managed cluster resource. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response GetMeshRevisionProfile(string subscriptionId, AzureLocation location, string mode, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Start(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(mode, nameof(mode)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateGetMeshRevisionProfileRequest(subscriptionId, location, mode); + using var message = CreateStartRequest(subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - MeshRevisionProfileData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MeshRevisionProfileData.DeserializeMeshRevisionProfileData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MeshRevisionProfileData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListMeshUpgradeProfilesRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateStopRequestUri(string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2290,16 +2306,16 @@ internal RequestUriBuilder CreateListMeshUpgradeProfilesRequestUri(string subscr uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/meshUpgradeProfiles", false); + uri.AppendPath("/stop", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListMeshUpgradeProfilesRequest(string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateStopRequest(string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -2308,7 +2324,7 @@ internal HttpMessage CreateListMeshUpgradeProfilesRequest(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/meshUpgradeProfiles", false); + uri.AppendPath("/stop", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2316,65 +2332,57 @@ internal HttpMessage CreateListMeshUpgradeProfilesRequest(string subscriptionId, return message; } - /// Lists available upgrades for all service meshes in a specific cluster. + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListMeshUpgradeProfilesAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public async Task StopAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListMeshUpgradeProfilesRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateStopRequest(subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - MeshUpgradeProfileList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MeshUpgradeProfileList.DeserializeMeshUpgradeProfileList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Lists available upgrades for all service meshes in a specific cluster. + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListMeshUpgradeProfiles(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public Response Stop(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListMeshUpgradeProfilesRequest(subscriptionId, resourceGroupName, resourceName); + using var message = CreateStopRequest(subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - MeshUpgradeProfileList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MeshUpgradeProfileList.DeserializeMeshUpgradeProfileList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetMeshUpgradeProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string mode) + internal RequestUriBuilder CreateGetUpgradeProfileRequestUri(string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2384,13 +2392,12 @@ internal RequestUriBuilder CreateGetMeshUpgradeProfileRequestUri(string subscrip uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/meshUpgradeProfiles/", false); - uri.AppendPath(mode, true); + uri.AppendPath("/upgradeProfiles/default", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetMeshUpgradeProfileRequest(string subscriptionId, string resourceGroupName, string resourceName, string mode) + internal HttpMessage CreateGetUpgradeProfileRequest(string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2403,8 +2410,7 @@ internal HttpMessage CreateGetMeshUpgradeProfileRequest(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ContainerService/managedClusters/", false); uri.AppendPath(resourceName, true); - uri.AppendPath("/meshUpgradeProfiles/", false); - uri.AppendPath(mode, true); + uri.AppendPath("/upgradeProfiles/default", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -2412,73 +2418,69 @@ internal HttpMessage CreateGetMeshUpgradeProfileRequest(string subscriptionId, s return message; } - /// Gets available upgrades for a service mesh in a cluster. + /// Gets the upgrade profile of a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// The mode of the mesh. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetMeshUpgradeProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, string mode, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetUpgradeProfileAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(mode, nameof(mode)); - using var message = CreateGetMeshUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName, mode); + using var message = CreateGetUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MeshUpgradeProfileData value = default; + ManagedClusterUpgradeProfileData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MeshUpgradeProfileData.DeserializeMeshUpgradeProfileData(document.RootElement); + value = ManagedClusterUpgradeProfileData.DeserializeManagedClusterUpgradeProfileData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((MeshUpgradeProfileData)null, message.Response); + return Response.FromValue((ManagedClusterUpgradeProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets available upgrades for a service mesh in a cluster. + /// Gets the upgrade profile of a managed cluster. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// The mode of the mesh. /// The cancellation token to use. - /// , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response GetMeshUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, string mode, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetUpgradeProfile(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNullOrEmpty(mode, nameof(mode)); - using var message = CreateGetMeshUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName, mode); + using var message = CreateGetUpgradeProfileRequest(subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MeshUpgradeProfileData value = default; + ManagedClusterUpgradeProfileData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MeshUpgradeProfileData.DeserializeMeshUpgradeProfileData(document.RootElement); + value = ManagedClusterUpgradeProfileData.DeserializeManagedClusterUpgradeProfileData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((MeshUpgradeProfileData)null, message.Response); + return Response.FromValue((ManagedClusterUpgradeProfileData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) + internal RequestUriBuilder CreateListMeshRevisionProfilesNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2486,7 +2488,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) + internal HttpMessage CreateListMeshRevisionProfilesNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2500,26 +2502,27 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript return message; } - /// Gets a list of managed clusters in the specified subscription. + /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListMeshRevisionProfilesNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListMeshRevisionProfilesNextPageRequest(nextLink, subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ManagedClusterListResult value = default; + MeshRevisionProfileList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); + value = MeshRevisionProfileList.DeserializeMeshRevisionProfileList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2527,26 +2530,27 @@ public async Task> ListNextPageAsync(string n } } - /// Gets a list of managed clusters in the specified subscription. + /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + public Response ListMeshRevisionProfilesNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId); + using var message = CreateListMeshRevisionProfilesNextPageRequest(nextLink, subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ManagedClusterListResult value = default; + MeshRevisionProfileList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); + value = MeshRevisionProfileList.DeserializeMeshRevisionProfileList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2554,7 +2558,7 @@ public Response ListNextPage(string nextLink, string s } } - internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2562,7 +2566,7 @@ internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string ne return uri; } - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2576,20 +2580,18 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s return message; } - /// Lists managed clusters in the specified subscription and resource group. + /// Gets a list of managed clusters in the specified subscription. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -2605,20 +2607,18 @@ public async Task> ListByResourceGroupNextPag } } - /// Lists managed clusters in the specified subscription and resource group. + /// Gets a list of managed clusters in the specified subscription. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + using var message = CreateListNextPageRequest(nextLink, subscriptionId); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -2634,7 +2634,7 @@ public Response ListByResourceGroupNextPage(string nex } } - internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2642,7 +2642,7 @@ internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsNextPag return uri; } - internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2656,30 +2656,28 @@ internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsNextPageReque return message; } - /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. + /// Lists managed clusters in the specified subscription and resource group. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListOutboundNetworkDependenciesEndpointsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceName); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - OutboundEnvironmentEndpointListResult value = default; + ManagedClusterListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = OutboundEnvironmentEndpointListResult.DeserializeOutboundEnvironmentEndpointListResult(document.RootElement); + value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2687,30 +2685,28 @@ public async Task> ListOutboundN } } - /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. + /// Lists managed clusters in the specified subscription and resource group. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name of the managed cluster resource. /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListOutboundNetworkDependenciesEndpointsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceName); + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - OutboundEnvironmentEndpointListResult value = default; + ManagedClusterListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = OutboundEnvironmentEndpointListResult.DeserializeOutboundEnvironmentEndpointListResult(document.RootElement); + value = ManagedClusterListResult.DeserializeManagedClusterListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2718,7 +2714,7 @@ public Response ListOutboundNetworkDepend } } - internal RequestUriBuilder CreateListMeshRevisionProfilesNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateListMeshUpgradeProfilesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2726,7 +2722,7 @@ internal RequestUriBuilder CreateListMeshRevisionProfilesNextPageRequestUri(stri return uri; } - internal HttpMessage CreateListMeshRevisionProfilesNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + internal HttpMessage CreateListMeshUpgradeProfilesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2740,27 +2736,30 @@ internal HttpMessage CreateListMeshRevisionProfilesNextPageRequest(string nextLi return message; } - /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades. + /// Lists available upgrades for all service meshes in a specific cluster. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. + /// The name of the resource group. The name is case insensitive. + /// 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. - public async Task> ListMeshRevisionProfilesNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListMeshUpgradeProfilesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListMeshRevisionProfilesNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateListMeshUpgradeProfilesNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MeshRevisionProfileList value = default; + MeshUpgradeProfileList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MeshRevisionProfileList.DeserializeMeshRevisionProfileList(document.RootElement); + value = MeshUpgradeProfileList.DeserializeMeshUpgradeProfileList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2768,27 +2767,30 @@ public async Task> ListMeshRevisionProfilesNex } } - /// Contains extra metadata on each revision, including supported revisions, cluster compatibility and available upgrades. + /// Lists available upgrades for all service meshes in a specific cluster. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. - /// The name of the Azure region. + /// The name of the resource group. The name is case insensitive. + /// 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. - public Response ListMeshRevisionProfilesNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListMeshUpgradeProfilesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListMeshRevisionProfilesNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateListMeshUpgradeProfilesNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MeshRevisionProfileList value = default; + MeshUpgradeProfileList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MeshRevisionProfileList.DeserializeMeshRevisionProfileList(document.RootElement); + value = MeshUpgradeProfileList.DeserializeMeshUpgradeProfileList(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2796,7 +2798,7 @@ public Response ListMeshRevisionProfilesNextPage(string } } - internal RequestUriBuilder CreateListMeshUpgradeProfilesNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string resourceName) + internal RequestUriBuilder CreateListOutboundNetworkDependenciesEndpointsNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string resourceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -2804,7 +2806,7 @@ internal RequestUriBuilder CreateListMeshUpgradeProfilesNextPageRequestUri(strin return uri; } - internal HttpMessage CreateListMeshUpgradeProfilesNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string resourceName) + internal HttpMessage CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string resourceName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -2818,7 +2820,7 @@ internal HttpMessage CreateListMeshUpgradeProfilesNextPageRequest(string nextLin return message; } - /// Lists available upgrades for all service meshes in a specific cluster. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. @@ -2826,22 +2828,22 @@ internal HttpMessage CreateListMeshUpgradeProfilesNextPageRequest(string nextLin /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListMeshUpgradeProfilesNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public async Task> ListOutboundNetworkDependenciesEndpointsNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListMeshUpgradeProfilesNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceName); + using var message = CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - MeshUpgradeProfileList value = default; + OutboundEnvironmentEndpointListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = MeshUpgradeProfileList.DeserializeMeshUpgradeProfileList(document.RootElement); + value = OutboundEnvironmentEndpointListResult.DeserializeOutboundEnvironmentEndpointListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -2849,7 +2851,7 @@ public async Task> ListMeshUpgradeProfilesNextP } } - /// Lists available upgrades for all service meshes in a specific cluster. + /// Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. The operation returns properties of each egress endpoint. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. @@ -2857,22 +2859,22 @@ public async Task> ListMeshUpgradeProfilesNextP /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListMeshUpgradeProfilesNextPage(string nextLink, string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + public Response ListOutboundNetworkDependenciesEndpointsNextPage(string nextLink, string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - using var message = CreateListMeshUpgradeProfilesNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceName); + using var message = CreateListOutboundNetworkDependenciesEndpointsNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - MeshUpgradeProfileList value = default; + OutboundEnvironmentEndpointListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = MeshUpgradeProfileList.DeserializeMeshUpgradeProfileList(document.RootElement); + value = OutboundEnvironmentEndpointListResult.DeserializeOutboundEnvironmentEndpointListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/ManagedNamespacesRestOperations.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/ManagedNamespacesRestOperations.cs index 7e51c562a0b4..509139d035a4 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/ManagedNamespacesRestOperations.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/ManagedNamespacesRestOperations.cs @@ -334,7 +334,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, ContainerServiceTagsObject containerServiceTagsObject) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -350,11 +350,11 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, ContainerServiceTagsObject containerServiceTagsObject) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -368,65 +368,81 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(containerServiceTagsObject, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Deletes a namespace. + /// Updates tags on a managed namespace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The name of the managed namespace. + /// Parameters supplied to the patch namespace operation, we only support patch tags for now. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, ContainerServiceTagsObject containerServiceTagsObject, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNullOrEmpty(managedNamespaceName, nameof(managedNamespaceName)); + Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, resourceName, managedNamespaceName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, resourceName, managedNamespaceName, containerServiceTagsObject); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + ManagedClusterNamespaceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ManagedClusterNamespaceData.DeserializeManagedClusterNamespaceData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Deletes a namespace. + /// Updates tags on a managed namespace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The name of the managed namespace. + /// Parameters supplied to the patch namespace operation, we only support patch tags for now. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, ContainerServiceTagsObject containerServiceTagsObject, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNullOrEmpty(managedNamespaceName, nameof(managedNamespaceName)); + Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, resourceName, managedNamespaceName); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, resourceName, managedNamespaceName, containerServiceTagsObject); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - case 204: - return message.Response; + case 200: + { + ManagedClusterNamespaceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ManagedClusterNamespaceData.DeserializeManagedClusterNamespaceData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, ContainerServiceTagsObject containerServiceTagsObject) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -442,11 +458,11 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, ContainerServiceTagsObject containerServiceTagsObject) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Delete; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -460,75 +476,59 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(containerServiceTagsObject, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates tags on a managed namespace. + /// Deletes a namespace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The name of the managed namespace. - /// Parameters supplied to the patch namespace operation, we only support patch tags for now. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, ContainerServiceTagsObject containerServiceTagsObject, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNullOrEmpty(managedNamespaceName, nameof(managedNamespaceName)); - Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, resourceName, managedNamespaceName, containerServiceTagsObject); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, resourceName, managedNamespaceName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ManagedClusterNamespaceData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedClusterNamespaceData.DeserializeManagedClusterNamespaceData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates tags on a managed namespace. + /// Deletes a namespace. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. /// The name of the managed namespace. - /// Parameters supplied to the patch namespace operation, we only support patch tags for now. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, ContainerServiceTagsObject containerServiceTagsObject, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string resourceName, string managedNamespaceName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); Argument.AssertNotNullOrEmpty(managedNamespaceName, nameof(managedNamespaceName)); - Argument.AssertNotNull(containerServiceTagsObject, nameof(containerServiceTagsObject)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, resourceName, managedNamespaceName, containerServiceTagsObject); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, resourceName, managedNamespaceName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ManagedClusterNamespaceData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedClusterNamespaceData.DeserializeManagedClusterNamespaceData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 4fcbdf0ac3cb..505122d3e043 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -402,6 +402,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr switch (message.Response.Status) { case 200: + case 202: case 204: return message.Response; default: @@ -429,6 +430,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string r switch (message.Response.Status) { case 200: + case 202: case 204: return message.Response; default: diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md index f08e6f268601..b757d9d99b08 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: ContainerService namespace: Azure.ResourceManager.ContainerService -require: https://github.com/Azure/azure-rest-api-specs/blob/18609d68cf243ee3ce35d7c005ff3c7dd2cd9477/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/49c01c8ca5ac61de4e4f238d76a77b3e0fd7ac2d/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md #tag: package-2025-10 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolCollection.cs index ebdbd489d21b..ec5406c18b38 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolCollection.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolCollection.cs @@ -529,7 +529,7 @@ public async Task CreateOrUpdate_CreateAgentPoolWithOSSKU() Count = 3, VmSize = "Standard_DS2_v2", OSType = ContainerServiceOSType.Linux, - OSSku = ContainerServiceOSSku.AzureLinux, + OSSku = Ossku.AzureLinux, OrchestratorVersion = "", KubeletConfig = new KubeletConfig { @@ -741,7 +741,7 @@ public async Task CreateOrUpdate_CreateAgentPoolWithWindowsOSSKU() Count = 3, VmSize = "Standard_D4s_v3", OSType = ContainerServiceOSType.Windows, - OSSku = ContainerServiceOSSku.Windows2022, + OSSku = Ossku.Windows2022, OrchestratorVersion = "1.23.3", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, agentPoolName, data); @@ -837,7 +837,7 @@ public async Task CreateOrUpdate_CreateWindowsAgentPoolWithDisablingOutboundNAT( Count = 3, VmSize = "Standard_D4s_v3", OSType = ContainerServiceOSType.Windows, - OSSku = ContainerServiceOSSku.Windows2022, + OSSku = Ossku.Windows2022, OrchestratorVersion = "1.23.8", IsOutboundNatDisabled = true, }; diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolResource.cs index a9a32ef55cf8..2f07f1998fbf 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolResource.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolResource.cs @@ -554,7 +554,7 @@ public async Task Update_CreateAgentPoolWithOSSKU() Count = 3, VmSize = "Standard_DS2_v2", OSType = ContainerServiceOSType.Linux, - OSSku = ContainerServiceOSSku.AzureLinux, + OSSku = Ossku.AzureLinux, OrchestratorVersion = "", KubeletConfig = new KubeletConfig { @@ -754,7 +754,7 @@ public async Task Update_CreateAgentPoolWithWindowsOSSKU() Count = 3, VmSize = "Standard_D4s_v3", OSType = ContainerServiceOSType.Windows, - OSSku = ContainerServiceOSSku.Windows2022, + OSSku = Ossku.Windows2022, OrchestratorVersion = "1.23.3", }; ArmOperation lro = await containerServiceAgentPool.UpdateAsync(WaitUntil.Completed, data); @@ -844,7 +844,7 @@ public async Task Update_CreateWindowsAgentPoolWithDisablingOutboundNAT() Count = 3, VmSize = "Standard_D4s_v3", OSType = ContainerServiceOSType.Windows, - OSSku = ContainerServiceOSSku.Windows2022, + OSSku = Ossku.Windows2022, OrchestratorVersion = "1.23.8", IsOutboundNatDisabled = true, }; diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterCollection.cs index 6bbf047c0e29..186d7fb21780 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterCollection.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterCollection.cs @@ -91,7 +91,7 @@ public async Task CreateOrUpdate_CreateManagedClusterUsingAnAgentPoolSnapshot() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -178,7 +178,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithAKSManagedNATGatewayAsO }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -278,7 +278,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithAzureKeyVaultSecretsPro }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -369,7 +369,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithCapacityReservationGrou }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -459,7 +459,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithCustomCATrustCertificat }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -553,7 +553,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithDedicatedHostGroup() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -644,7 +644,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithEncryptionAtHostEnabled }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -735,7 +735,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithFIPSEnabledOS() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -826,7 +826,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithGPUMIG() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -923,7 +923,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithHTTPProxyConfigured() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1022,7 +1022,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithLongTermSupport() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, ApiServerAccessProfile = new ManagedClusterApiServerAccessProfile @@ -1116,7 +1116,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithNodePublicIPPrefix() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1174,7 +1174,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithOSSKU() Count = 3, VmSize = "Standard_DS2_v2", OSType = ContainerServiceOSType.Linux, -OSSku = ContainerServiceOSSku.AzureLinux, +OSSku = Ossku.AzureLinux, AgentPoolType = AgentPoolType.VirtualMachineScaleSets, Mode = AgentPoolMode.System, EnableNodePublicIP = true, @@ -1207,7 +1207,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithOSSKU() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1305,7 +1305,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithPPG() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1400,7 +1400,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithPodIdentityEnabled() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1491,7 +1491,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithRunCommandDisabled() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, ApiServerAccessProfile = new ManagedClusterApiServerAccessProfile @@ -1668,7 +1668,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithUltraSSDEnabled() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1830,7 +1830,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithUserAssignedNATGatewayA }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1921,7 +1921,7 @@ public async Task CreateOrUpdate_CreateManagedPrivateClusterWithPublicFQDNSpecif }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, ApiServerAccessProfile = new ManagedClusterApiServerAccessProfile @@ -2016,7 +2016,7 @@ public async Task CreateOrUpdate_CreateManagedPrivateClusterWithFqdnSubdomainSpe }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, ApiServerAccessProfile = new ManagedClusterApiServerAccessProfile @@ -2116,7 +2116,7 @@ public async Task CreateOrUpdate_CreateUpdateAADManagedClusterWithEnableAzureRBA }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -2225,7 +2225,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedCluster() Expander = AutoScaleExpander.Priority, MaxNodeProvisionTime = "15m", NewPodScaleUpDelay = "1m", - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", SkipNodesWithSystemPods = "false", }, @@ -2326,7 +2326,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedClusterWithAzureServiceMesh( }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -2448,7 +2448,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedClusterWithEnableAHUB() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -2551,7 +2551,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedClusterWithWindowsGMSAEnable }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -2648,7 +2648,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedClusterWithDualStackNetworki Count = 2, }, }, - NetworkIPFamilies = { ContainerServiceIPFamily.IPv4, ContainerServiceIPFamily.IPv6 }, + NetworkIPFamilies = { IPFamily.IPv4, IPFamily.IPv6 }, }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { @@ -2656,7 +2656,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedClusterWithDualStackNetworki Expander = AutoScaleExpander.Priority, MaxNodeProvisionTime = "15m", NewPodScaleUpDelay = "1m", - ScanIntervalInSeconds = "20s", + ScanInterval = "20s", ScaleDownDelayAfterAdd = "15m", SkipNodesWithSystemPods = "false", }, diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterResource.cs index 0df79b5b8d74..ca7a917a7a81 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterResource.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterResource.cs @@ -113,10 +113,10 @@ public async Task Update_UpdateManagedClusterTags() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetAccessProfile_GetManagedCluster() + public async Task AbortLatestOperation_AbortOperationOnManagedCluster() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersGetAccessProfile.json - // this example is just showing the usage of "ManagedClusters_GetAccessProfile" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersAbortOperation.json + // this example is just showing the usage of "ManagedClusters_AbortLatestOperation" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -132,18 +132,17 @@ public async Task GetAccessProfile_GetManagedCluster() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - string roleName = "clusterUser"; - ManagedClusterAccessProfile result = await containerServiceManagedCluster.GetAccessProfileAsync(roleName); + await containerServiceManagedCluster.AbortLatestOperationAsync(WaitUntil.Completed); - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetClusterAdminCredentials_GetManagedCluster() + public async Task GetAccessProfile_GetManagedCluster() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterAdminCredentials.json - // this example is just showing the usage of "ManagedClusters_ListClusterAdminCredentials" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersGetAccessProfile.json + // this example is just showing the usage of "ManagedClusters_GetAccessProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -159,17 +158,18 @@ public async Task GetClusterAdminCredentials_GetManagedCluster() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - ManagedClusterCredentials result = await containerServiceManagedCluster.GetClusterAdminCredentialsAsync(); + string roleName = "clusterUser"; + ManagedClusterAccessProfile result = await containerServiceManagedCluster.GetAccessProfileAsync(roleName); Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetClusterUserCredentials_GetManagedCluster() + public async Task GetCommandResult_CommandFailedResult() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterUserCredentials.json - // this example is just showing the usage of "ManagedClusters_ListClusterUserCredentials" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/RunCommandResultFailed.json + // this example is just showing the usage of "ManagedClusters_GetCommandResult" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -185,17 +185,18 @@ public async Task GetClusterUserCredentials_GetManagedCluster() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - ManagedClusterCredentials result = await containerServiceManagedCluster.GetClusterUserCredentialsAsync(); + string commandId = "def7b3ea71bd4f7e9d226ddbc0f00ad9"; + ManagedClusterRunCommandResult result = await containerServiceManagedCluster.GetCommandResultAsync(commandId); Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetClusterMonitoringUserCredentials_GetManagedCluster() + public async Task GetCommandResult_CommandSucceedResult() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json - // this example is just showing the usage of "ManagedClusters_ListClusterMonitoringUserCredentials" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/RunCommandResultSucceed.json + // this example is just showing the usage of "ManagedClusters_GetCommandResult" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -211,17 +212,18 @@ public async Task GetClusterMonitoringUserCredentials_GetManagedCluster() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - ManagedClusterCredentials result = await containerServiceManagedCluster.GetClusterMonitoringUserCredentialsAsync(); + string commandId = "def7b3ea71bd4f7e9d226ddbc0f00ad9"; + ManagedClusterRunCommandResult result = await containerServiceManagedCluster.GetCommandResultAsync(commandId); Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task ResetServicePrincipalProfile_ResetServicePrincipalProfile() + public async Task GetClusterAdminCredentials_GetManagedCluster() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersResetServicePrincipalProfile.json - // this example is just showing the usage of "ManagedClusters_ResetServicePrincipalProfile" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterAdminCredentials.json + // this example is just showing the usage of "ManagedClusters_ListClusterAdminCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -237,21 +239,17 @@ public async Task ResetServicePrincipalProfile_ResetServicePrincipalProfile() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile = new ManagedClusterServicePrincipalProfile("clientid") - { - Secret = "secret", - }; - await containerServiceManagedCluster.ResetServicePrincipalProfileAsync(WaitUntil.Completed, managedClusterServicePrincipalProfile); + ManagedClusterCredentials result = await containerServiceManagedCluster.GetClusterAdminCredentialsAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task ResetAadProfile_ResetAADProfile() + public async Task GetClusterMonitoringUserCredentials_GetManagedCluster() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersResetAADProfile.json - // this example is just showing the usage of "ManagedClusters_ResetAadProfile" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json + // this example is just showing the usage of "ManagedClusters_ListClusterMonitoringUserCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -267,24 +265,17 @@ public async Task ResetAadProfile_ResetAADProfile() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - ManagedClusterAadProfile managedClusterAadProfile = new ManagedClusterAadProfile - { - ClientAppId = Guid.Parse("clientappid"), - ServerAppId = Guid.Parse("serverappid"), - ServerAppSecret = "serverappsecret", - TenantId = Guid.Parse("tenantid"), - }; - await containerServiceManagedCluster.ResetAadProfileAsync(WaitUntil.Completed, managedClusterAadProfile); + ManagedClusterCredentials result = await containerServiceManagedCluster.GetClusterMonitoringUserCredentialsAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task RotateClusterCertificates_RotateClusterCertificates() + public async Task GetClusterUserCredentials_GetManagedCluster() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersRotateClusterCertificates.json - // this example is just showing the usage of "ManagedClusters_RotateClusterCertificates" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersListClusterUserCredentials.json + // this example is just showing the usage of "ManagedClusters_ListClusterUserCredentials" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -300,17 +291,17 @@ public async Task RotateClusterCertificates_RotateClusterCertificates() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - await containerServiceManagedCluster.RotateClusterCertificatesAsync(WaitUntil.Completed); + ManagedClusterCredentials result = await containerServiceManagedCluster.GetClusterUserCredentialsAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task AbortLatestOperation_AbortOperationOnManagedCluster() + public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDependenciesEndpointsByManagedCluster() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersAbortOperation.json - // this example is just showing the usage of "ManagedClusters_AbortLatestOperation" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/OutboundNetworkDependenciesEndpointsList.json + // this example is just showing the usage of "ManagedClusters_ListOutboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -325,18 +316,21 @@ public async Task AbortLatestOperation_AbortOperationOnManagedCluster() ResourceIdentifier containerServiceManagedClusterResourceId = ContainerServiceManagedClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); - // invoke the operation - await containerServiceManagedCluster.AbortLatestOperationAsync(WaitUntil.Completed); + // invoke the operation and iterate over the result + await foreach (ContainerServiceOutboundEnvironmentEndpoint item in containerServiceManagedCluster.GetOutboundNetworkDependenciesEndpointsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task RotateServiceAccountSigningKeys_RotateClusterServiceAccountSigningKeys() + public async Task ResetAadProfile_ResetAADProfile() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json - // this example is just showing the usage of "ManagedClusters_RotateServiceAccountSigningKeys" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersResetAADProfile.json + // this example is just showing the usage of "ManagedClusters_ResetAadProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -352,17 +346,24 @@ public async Task RotateServiceAccountSigningKeys_RotateClusterServiceAccountSig ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - await containerServiceManagedCluster.RotateServiceAccountSigningKeysAsync(WaitUntil.Completed); + ManagedClusterAadProfile managedClusterAadProfile = new ManagedClusterAadProfile + { + ClientAppId = Guid.Parse("clientappid"), + ServerAppId = Guid.Parse("serverappid"), + ServerAppSecret = "serverappsecret", + TenantId = Guid.Parse("tenantid"), + }; + await containerServiceManagedCluster.ResetAadProfileAsync(WaitUntil.Completed, managedClusterAadProfile); Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Stop_StopManagedCluster() + public async Task ResetServicePrincipalProfile_ResetServicePrincipalProfile() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersStop.json - // this example is just showing the usage of "ManagedClusters_Stop" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersResetServicePrincipalProfile.json + // this example is just showing the usage of "ManagedClusters_ResetServicePrincipalProfile" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -378,17 +379,21 @@ public async Task Stop_StopManagedCluster() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - await containerServiceManagedCluster.StopAsync(WaitUntil.Completed); + ManagedClusterServicePrincipalProfile managedClusterServicePrincipalProfile = new ManagedClusterServicePrincipalProfile("clientid") + { + Secret = "secret", + }; + await containerServiceManagedCluster.ResetServicePrincipalProfileAsync(WaitUntil.Completed, managedClusterServicePrincipalProfile); Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task Start_StartManagedCluster() + public async Task RotateClusterCertificates_RotateClusterCertificates() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersStart.json - // this example is just showing the usage of "ManagedClusters_Start" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersRotateClusterCertificates.json + // this example is just showing the usage of "ManagedClusters_RotateClusterCertificates" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -404,17 +409,17 @@ public async Task Start_StartManagedCluster() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - await containerServiceManagedCluster.StartAsync(WaitUntil.Completed); + await containerServiceManagedCluster.RotateClusterCertificatesAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task RunCommand_SubmitNewCommand() + public async Task RotateServiceAccountSigningKeys_RotateClusterServiceAccountSigningKeys() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/RunCommandRequest.json - // this example is just showing the usage of "ManagedClusters_RunCommand" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json + // this example is just showing the usage of "ManagedClusters_RotateServiceAccountSigningKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -430,23 +435,17 @@ public async Task RunCommand_SubmitNewCommand() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - ManagedClusterRunCommandContent content = new ManagedClusterRunCommandContent("kubectl apply -f ns.yaml") - { - Context = "", - ClusterToken = "", - }; - ArmOperation lro = await containerServiceManagedCluster.RunCommandAsync(WaitUntil.Completed, content); - ManagedClusterRunCommandResult result = lro.Value; + await containerServiceManagedCluster.RotateServiceAccountSigningKeysAsync(WaitUntil.Completed); - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetCommandResult_CommandFailedResult() + public async Task RunCommand_SubmitNewCommand() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/RunCommandResultFailed.json - // this example is just showing the usage of "ManagedClusters_GetCommandResult" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/RunCommandRequest.json + // this example is just showing the usage of "ManagedClusters_RunCommand" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -462,18 +461,23 @@ public async Task GetCommandResult_CommandFailedResult() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - string commandId = "def7b3ea71bd4f7e9d226ddbc0f00ad9"; - ManagedClusterRunCommandResult result = await containerServiceManagedCluster.GetCommandResultAsync(commandId); + ManagedClusterRunCommandContent content = new ManagedClusterRunCommandContent("kubectl apply -f ns.yaml") + { + Context = "", + ClusterToken = "", + }; + ArmOperation lro = await containerServiceManagedCluster.RunCommandAsync(WaitUntil.Completed, content); + ManagedClusterRunCommandResult result = lro.Value; Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetCommandResult_CommandSucceedResult() + public async Task Start_StartManagedCluster() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/RunCommandResultSucceed.json - // this example is just showing the usage of "ManagedClusters_GetCommandResult" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersStart.json + // this example is just showing the usage of "ManagedClusters_Start" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -489,18 +493,17 @@ public async Task GetCommandResult_CommandSucceedResult() ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); // invoke the operation - string commandId = "def7b3ea71bd4f7e9d226ddbc0f00ad9"; - ManagedClusterRunCommandResult result = await containerServiceManagedCluster.GetCommandResultAsync(commandId); + await containerServiceManagedCluster.StartAsync(WaitUntil.Completed); - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDependenciesEndpointsByManagedCluster() + public async Task Stop_StopManagedCluster() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/OutboundNetworkDependenciesEndpointsList.json - // this example is just showing the usage of "ManagedClusters_ListOutboundNetworkDependenciesEndpoints" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/ManagedClustersStop.json + // this example is just showing the usage of "ManagedClusters_Stop" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -515,11 +518,8 @@ public async Task GetOutboundNetworkDependenciesEndpoints_ListOutboundNetworkDep ResourceIdentifier containerServiceManagedClusterResourceId = ContainerServiceManagedClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); ContainerServiceManagedClusterResource containerServiceManagedCluster = client.GetContainerServiceManagedClusterResource(containerServiceManagedClusterResourceId); - // invoke the operation and iterate over the result - await foreach (ContainerServiceOutboundEnvironmentEndpoint item in containerServiceManagedCluster.GetOutboundNetworkDependenciesEndpointsAsync()) - { - Console.WriteLine($"Succeeded: {item}"); - } + // invoke the operation + await containerServiceManagedCluster.StopAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 936688b2ed0d..e496964b1439 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -75,10 +75,10 @@ public async Task GetContainerServiceManagedClusters_ListManagedClusters() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetAgentPoolSnapshots_ListSnapshots() + public async Task GetTrustedAccessRoles_ListTrustedAccessRoles() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/SnapshotsList.json - // this example is just showing the usage of "Snapshots_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/TrustedAccessRoles_List.json + // this example is just showing the usage of "TrustedAccessRoles_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -92,13 +92,10 @@ public async Task GetAgentPoolSnapshots_ListSnapshots() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - await foreach (AgentPoolSnapshotResource item in subscriptionResource.GetAgentPoolSnapshotsAsync()) + AzureLocation location = new AzureLocation("westus2"); + await foreach (ContainerServiceTrustedAccessRole item in subscriptionResource.GetTrustedAccessRolesAsync(location)) { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - AgentPoolSnapshotData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + Console.WriteLine($"Succeeded: {item}"); } Console.WriteLine("Succeeded"); @@ -106,10 +103,10 @@ public async Task GetAgentPoolSnapshots_ListSnapshots() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetTrustedAccessRoles_ListTrustedAccessRoles() + public async Task GetAgentPoolSnapshots_ListSnapshots() { - // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/TrustedAccessRoles_List.json - // this example is just showing the usage of "TrustedAccessRoles_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2025-10-01/examples/SnapshotsList.json + // this example is just showing the usage of "Snapshots_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line TokenCredential cred = new DefaultAzureCredential(); @@ -123,10 +120,13 @@ public async Task GetTrustedAccessRoles_ListTrustedAccessRoles() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - AzureLocation location = new AzureLocation("westus2"); - await foreach (ContainerServiceTrustedAccessRole item in subscriptionResource.GetTrustedAccessRolesAsync(location)) + await foreach (AgentPoolSnapshotResource item in subscriptionResource.GetAgentPoolSnapshotsAsync()) { - Console.WriteLine($"Succeeded: {item}"); + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AgentPoolSnapshotData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } Console.WriteLine("Succeeded"); From a817d9ecfc3b754ed09523ecca7bff7766f00e8a Mon Sep 17 00:00:00 2001 From: Minghao Chen <30464227+HarveyLink@users.noreply.github.com> Date: Thu, 22 Jan 2026 11:10:42 +0800 Subject: [PATCH 2/3] regen-2 --- .../AgentPoolSnapshotData.Serialization.cs | 4 +- .../src/Generated/AgentPoolSnapshotData.cs | 4 +- .../ArmContainerServiceModelFactory.cs | 198 ++++++++++++++++-- ...ainerServiceAgentPoolData.Serialization.cs | 4 +- .../ContainerServiceAgentPoolData.cs | 4 +- ...ntenanceConfigurationData.Serialization.cs | 24 +-- ...inerServiceMaintenanceConfigurationData.cs | 18 +- ...gentPoolAvailableVersion.Serialization.cs} | 48 ++--- ...nsItem.cs => AgentPoolAvailableVersion.cs} | 18 +- ...gentPoolAvailableVersions.Serialization.cs | 8 +- .../Models/AgentPoolAvailableVersions.cs | 6 +- ...eResourceManagerContainerServiceContext.cs | 2 +- .../Models/ContainerServiceIPFamily.cs | 60 ++++++ ...erServiceMachineIPAddress.Serialization.cs | 4 +- .../ContainerServiceMachineIPAddress.cs | 4 +- ...inerServiceNetworkProfile.Serialization.cs | 8 +- .../Models/ContainerServiceNetworkProfile.cs | 6 +- .../{Ossku.cs => ContainerServiceOSSku.cs} | 38 ++-- ...cePrivateLinkResourceData.Serialization.cs | 18 +- ...ContainerServicePrivateLinkResourceData.cs | 4 +- .../src/Generated/Models/IPFamily.cs | 20 -- .../ManagedClusterAadProfile.Serialization.cs | 23 +- .../Models/ManagedClusterAadProfile.cs | 6 +- ...edClusterAgentPoolProfile.Serialization.cs | 4 +- .../Models/ManagedClusterAgentPoolProfile.cs | 2 +- ...gentPoolProfileProperties.Serialization.cs | 4 +- ...anagedClusterAgentPoolProfileProperties.cs | 4 +- ...dClusterAutoScalerProfile.Serialization.cs | 14 +- .../Models/ManagedClusterAutoScalerProfile.cs | 8 +- ...agedClusterWindowsProfile.Serialization.cs | 10 +- .../Models/ManagedClusterWindowsProfile.cs | 8 +- .../src/autorest.md | 35 ++-- ...ple_ContainerServiceAgentPoolCollection.cs | 6 +- ...ample_ContainerServiceAgentPoolResource.cs | 6 +- ...ontainerServiceManagedClusterCollection.cs | 56 ++--- 35 files changed, 429 insertions(+), 257 deletions(-) rename sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/{AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.Serialization.cs => AgentPoolAvailableVersion.Serialization.cs} (72%) rename sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/{AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs => AgentPoolAvailableVersion.cs} (84%) create mode 100644 sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPFamily.cs rename sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/{Ossku.cs => ContainerServiceOSSku.cs} (66%) delete mode 100644 sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IPFamily.cs diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs index e435a4637ecd..273719999862 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.Serialization.cs @@ -115,7 +115,7 @@ internal static AgentPoolSnapshotData DeserializeAgentPoolSnapshotData(JsonEleme string kubernetesVersion = default; string nodeImageVersion = default; ContainerServiceOSType? osType = default; - Ossku? osSku = default; + ContainerServiceOSSku? osSku = default; string vmSize = default; bool? enableFIPS = default; IDictionary serializedAdditionalRawData = default; @@ -217,7 +217,7 @@ internal static AgentPoolSnapshotData DeserializeAgentPoolSnapshotData(JsonEleme { continue; } - osSku = new Ossku(property0.Value.GetString()); + osSku = new ContainerServiceOSSku(property0.Value.GetString()); continue; } if (property0.NameEquals("vmSize"u8)) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs index da360c0aebb8..d728ee75d98e 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolSnapshotData.cs @@ -98,7 +98,7 @@ public AgentPoolSnapshotData(AzureLocation location) : base(location) /// Serialized Name: Snapshot.properties.enableFIPS /// /// Keeps track of any properties unknown to the library. - internal AgentPoolSnapshotData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerServiceCreationData creationData, SnapshotType? snapshotType, string kubernetesVersion, string nodeImageVersion, ContainerServiceOSType? osType, Ossku? osSku, string vmSize, bool? enableFips, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal AgentPoolSnapshotData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ContainerServiceCreationData creationData, SnapshotType? snapshotType, string kubernetesVersion, string nodeImageVersion, ContainerServiceOSType? osType, ContainerServiceOSSku? osSku, string vmSize, bool? enableFips, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { CreationData = creationData; SnapshotType = snapshotType; @@ -166,7 +166,7 @@ public ResourceIdentifier CreationDataSourceResourceId /// Serialized Name: Snapshot.properties.osSku /// [WirePath("properties.osSku")] - public Ossku? OSSku { get; } + public ContainerServiceOSSku? OSSku { get; } /// /// The size of the VM. /// Serialized Name: Snapshot.properties.vmSize diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs index dd3a1aaceb5e..f542c120239c 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs @@ -662,7 +662,7 @@ public static ContainerServiceManagedClusterData ContainerServiceManagedClusterD /// Serialized Name: ManagedClusterAgentPoolProfile.name /// /// A new instance for mocking. - 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, Ossku? 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = 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, 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = null, string name = null) { availabilityZones ??= new List(); tags ??= new Dictionary(); @@ -948,7 +948,7 @@ public static ManagedClusterAgentPoolProfile ManagedClusterAgentPoolProfile(ETag /// Serialized Name: ManagedClusterAgentPoolProfileProperties.localDNSProfile /// /// A new instance for mocking. - 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, Ossku? 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = 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, 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = null) { availabilityZones ??= new List(); tags ??= new Dictionary(); @@ -1138,7 +1138,7 @@ public static ManagedClusterOidcIssuerProfile ManagedClusterOidcIssuerProfile(st /// Serialized Name: PrivateLinkResource.privateLinkServiceID /// /// A new instance for mocking. - public static ContainerServicePrivateLinkResourceData ContainerServicePrivateLinkResourceData(string id = null, string name = null, ResourceType? resourceType = null, string groupId = null, IEnumerable requiredMembers = null, ResourceIdentifier privateLinkServiceId = null) + public static ContainerServicePrivateLinkResourceData ContainerServicePrivateLinkResourceData(ResourceIdentifier id = null, string name = null, ResourceType? resourceType = null, string groupId = null, IEnumerable requiredMembers = null, ResourceIdentifier privateLinkServiceId = null) { requiredMembers ??= new List(); @@ -1217,7 +1217,7 @@ public static ManagedClusterIngressProfileWebAppRouting ManagedClusterIngressPro /// Serialized Name: Snapshot.properties.enableFIPS /// /// A new instance for mocking. - public static AgentPoolSnapshotData AgentPoolSnapshotData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier creationDataSourceResourceId = null, SnapshotType? snapshotType = null, string kubernetesVersion = null, string nodeImageVersion = null, ContainerServiceOSType? osType = null, Ossku? osSku = null, string vmSize = null, bool? enableFips = null) + public static AgentPoolSnapshotData AgentPoolSnapshotData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ResourceIdentifier creationDataSourceResourceId = null, SnapshotType? snapshotType = null, string kubernetesVersion = null, string nodeImageVersion = null, ContainerServiceOSType? osType = null, ContainerServiceOSSku? osSku = null, string vmSize = null, bool? enableFips = null) { tags ??= new Dictionary(); @@ -1488,7 +1488,7 @@ public static ManagedClusterAccessProfile ManagedClusterAccessProfile(ResourceId /// Serialized Name: AgentPool.properties.localDNSProfile /// /// A new instance for mocking. - 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, Ossku? 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = 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, 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, bool? isOutboundNatDisabled = null, AgentPoolSecurityProfile securityProfile = null, AgentPoolGpuDriver? gpuDriver = null, int? gatewayPublicIPPrefixSize = null, IEnumerable scaleManual = null, IEnumerable virtualMachineNodesStatus = null, ResponseError statusProvisioningError = null, LocalDnsProfile localDnsProfile = null) { availabilityZones ??= new List(); tags ??= new Dictionary(); @@ -1614,7 +1614,7 @@ public static ContainerServiceMachineProperties ContainerServiceMachinePropertie /// Serialized Name: MachineIpAddress.ip /// /// A new instance for mocking. - public static ContainerServiceMachineIPAddress ContainerServiceMachineIPAddress(IPFamily? family = null, string ip = null) + public static ContainerServiceMachineIPAddress ContainerServiceMachineIPAddress(ContainerServiceIPFamily? family = null, string ip = null) { return new ContainerServiceMachineIPAddress(family, ip, serializedAdditionalRawData: null); } @@ -1667,9 +1667,9 @@ public static AgentPoolUpgradeProfileData AgentPoolUpgradeProfileData(ResourceId /// Serialized Name: AgentPoolAvailableVersions.properties.agentPoolVersions /// /// A new instance for mocking. - public static AgentPoolAvailableVersions AgentPoolAvailableVersions(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable agentPoolVersions = null) + public static AgentPoolAvailableVersions AgentPoolAvailableVersions(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable agentPoolVersions = null) { - agentPoolVersions ??= new List(); + agentPoolVersions ??= new List(); return new AgentPoolAvailableVersions( id, @@ -1680,8 +1680,8 @@ public static AgentPoolAvailableVersions AgentPoolAvailableVersions(ResourceIden serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// + /// Initializes a new instance of . + /// /// Whether this version is the default agent pool version. /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.default /// @@ -1693,10 +1693,10 @@ public static AgentPoolAvailableVersions AgentPoolAvailableVersions(ResourceIden /// Whether Kubernetes version is currently in preview. /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.isPreview /// - /// A new instance for mocking. - public static AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(bool? @default = null, string kubernetesVersion = null, bool? isPreview = null) + /// A new instance for mocking. + public static AgentPoolAvailableVersion AgentPoolAvailableVersion(bool? isDefault = null, string kubernetesVersion = null, bool? isPreview = null) { - return new AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(@default, kubernetesVersion, isPreview, serializedAdditionalRawData: null); + return new AgentPoolAvailableVersion(isDefault, kubernetesVersion, isPreview, serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -1775,11 +1775,11 @@ public static ManagedClusterCredential ManagedClusterCredential(string name = nu /// The name. /// The resourceType. /// The systemData. - /// + /// /// Time slots during the week when planned maintenance is allowed to proceed. If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. /// Serialized Name: MaintenanceConfiguration.properties.timeInWeek /// - /// + /// /// Time slots on which upgrade is not allowed. /// Serialized Name: MaintenanceConfiguration.properties.notAllowedTime /// @@ -1788,18 +1788,18 @@ public static ManagedClusterCredential ManagedClusterCredential(string name = nu /// Serialized Name: MaintenanceConfiguration.properties.maintenanceWindow /// /// A new instance for mocking. - public static ContainerServiceMaintenanceConfigurationData ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable timeInWeek = null, IEnumerable notAllowedTime = null, ContainerServiceMaintenanceWindow maintenanceWindow = null) + public static ContainerServiceMaintenanceConfigurationData ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IEnumerable timesInWeek = null, IEnumerable notAllowedTimes = null, ContainerServiceMaintenanceWindow maintenanceWindow = null) { - timeInWeek ??= new List(); - notAllowedTime ??= new List(); + timesInWeek ??= new List(); + notAllowedTimes ??= new List(); return new ContainerServiceMaintenanceConfigurationData( id, name, resourceType, systemData, - timeInWeek?.ToList(), - notAllowedTime?.ToList(), + timesInWeek?.ToList(), + notAllowedTimes?.ToList(), maintenanceWindow, serializedAdditionalRawData: null); } @@ -2087,5 +2087,163 @@ public static KubernetesVersion KubernetesVersion(string version, IEnumerable 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, nodePublicIPPrefixId: nodePublicIPPrefixId, scaleSetPriority: scaleSetPriority, scaleSetEvictionPolicy: scaleSetEvictionPolicy, spotMaxPrice: spotMaxPrice, tags: tags, nodeLabels: nodeLabels, nodeTaints: nodeTaints, proximityPlacementGroupId: proximityPlacementGroupId, kubeletConfig: kubeletConfig, linuxOSConfig: linuxOSConfig, enableEncryptionAtHost: enableEncryptionAtHost, enableUltraSsd: enableUltraSsd, enableFips: enableFips, gpuInstanceProfile: gpuInstanceProfile, creationDataSourceResourceId: creationDataSourceResourceId, capacityReservationGroupId: capacityReservationGroupId, hostGroupId: hostGroupId, networkProfile: networkProfile, isOutboundNatDisabled: default, securityProfile: default, gpuDriver: default, gatewayPublicIPPrefixSize: default, scaleManual: default, virtualMachineNodesStatus: default, statusProvisioningError: default, localDnsProfile: default, name: name); + } + + /// 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) + { + 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, nodePublicIPPrefixId: nodePublicIPPrefixId, scaleSetPriority: scaleSetPriority, scaleSetEvictionPolicy: scaleSetEvictionPolicy, spotMaxPrice: spotMaxPrice, tags: tags, nodeLabels: nodeLabels, nodeTaints: nodeTaints, proximityPlacementGroupId: proximityPlacementGroupId, kubeletConfig: kubeletConfig, linuxOSConfig: linuxOSConfig, enableEncryptionAtHost: enableEncryptionAtHost, enableUltraSsd: enableUltraSsd, enableFips: enableFips, gpuInstanceProfile: gpuInstanceProfile, creationDataSourceResourceId: creationDataSourceResourceId, capacityReservationGroupId: capacityReservationGroupId, hostGroupId: hostGroupId, networkProfile: networkProfile, isOutboundNatDisabled: default, securityProfile: default, gpuDriver: default, gatewayPublicIPPrefixSize: default, scaleManual: default, virtualMachineNodesStatus: default, statusProvisioningError: default, localDnsProfile: 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, nodePublicIPPrefixId: nodePublicIPPrefixId, scaleSetPriority: scaleSetPriority, scaleSetEvictionPolicy: scaleSetEvictionPolicy, spotMaxPrice: spotMaxPrice, tags: tags, nodeLabels: nodeLabels, nodeTaints: nodeTaints, proximityPlacementGroupId: proximityPlacementGroupId, kubeletConfig: kubeletConfig, linuxOSConfig: linuxOSConfig, enableEncryptionAtHost: enableEncryptionAtHost, enableUltraSsd: enableUltraSsd, enableFips: enableFips, gpuInstanceProfile: gpuInstanceProfile, creationDataSourceResourceId: creationDataSourceResourceId, capacityReservationGroupId: capacityReservationGroupId, hostGroupId: hostGroupId, networkProfile: networkProfile, isOutboundNatDisabled: default, securityProfile: default, gpuDriver: default, gatewayPublicIPPrefixSize: default, scaleManual: default, virtualMachineNodesStatus: default, statusProvisioningError: default, localDnsProfile: default); + } } } 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 708e63785de4..9cc1c065410a 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.Serialization.cs @@ -378,7 +378,7 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo PodIPAllocationMode? podIPAllocationMode = default; int? maxPods = default; ContainerServiceOSType? osType = default; - Ossku? osSku = default; + ContainerServiceOSSku? osSku = default; int? maxCount = default; int? minCount = default; bool? enableAutoScaling = default; @@ -571,7 +571,7 @@ internal static ContainerServiceAgentPoolData DeserializeContainerServiceAgentPo { continue; } - osSku = new Ossku(property0.Value.GetString()); + osSku = new ContainerServiceOSSku(property0.Value.GetString()); continue; } if (property0.NameEquals("maxCount"u8)) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs index 2b6c4a7cd44f..59d36e9210e0 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs @@ -284,7 +284,7 @@ public ContainerServiceAgentPoolData() /// Serialized Name: AgentPool.properties.localDNSProfile /// /// Keeps track of any properties unknown to the library. - 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, Ossku? 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, 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, 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ETag = etag; Count = count; @@ -426,7 +426,7 @@ internal ContainerServiceAgentPoolData(ResourceIdentifier id, string name, Resou /// Serialized Name: AgentPool.properties.osSKU /// [WirePath("properties.osSKU")] - public Ossku? OSSku { get; set; } + public ContainerServiceOSSku? OSSku { get; set; } /// /// The maximum number of nodes for auto-scaling /// Serialized Name: AgentPool.properties.maxCount diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs index c6b2b7192506..fd791bba6cd2 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.Serialization.cs @@ -41,21 +41,21 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); - if (Optional.IsCollectionDefined(TimeInWeek)) + if (Optional.IsCollectionDefined(TimesInWeek)) { writer.WritePropertyName("timeInWeek"u8); writer.WriteStartArray(); - foreach (var item in TimeInWeek) + foreach (var item in TimesInWeek) { writer.WriteObjectValue(item, options); } writer.WriteEndArray(); } - if (Optional.IsCollectionDefined(NotAllowedTime)) + if (Optional.IsCollectionDefined(NotAllowedTimes)) { writer.WritePropertyName("notAllowedTime"u8); writer.WriteStartArray(); - foreach (var item in NotAllowedTime) + foreach (var item in NotAllowedTimes) { writer.WriteObjectValue(item, options); } @@ -256,7 +256,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.Append(" properties:"); builder.AppendLine(" {"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimeInWeek), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(TimesInWeek), out propertyOverride); if (hasPropertyOverride) { builder.Append(" timeInWeek: "); @@ -264,13 +264,13 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsCollectionDefined(TimeInWeek)) + if (Optional.IsCollectionDefined(TimesInWeek)) { - if (TimeInWeek.Any()) + if (TimesInWeek.Any()) { builder.Append(" timeInWeek: "); builder.AppendLine("["); - foreach (var item in TimeInWeek) + foreach (var item in TimesInWeek) { BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " timeInWeek: "); } @@ -279,7 +279,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NotAllowedTime), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(NotAllowedTimes), out propertyOverride); if (hasPropertyOverride) { builder.Append(" notAllowedTime: "); @@ -287,13 +287,13 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsCollectionDefined(NotAllowedTime)) + if (Optional.IsCollectionDefined(NotAllowedTimes)) { - if (NotAllowedTime.Any()) + if (NotAllowedTimes.Any()) { builder.Append(" notAllowedTime: "); builder.AppendLine("["); - foreach (var item in NotAllowedTime) + foreach (var item in NotAllowedTimes) { BicepSerializationHelpers.AppendChildObject(builder, item, options, 6, true, " notAllowedTime: "); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.cs index daee1103de93..1d714f6dd3dc 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceMaintenanceConfigurationData.cs @@ -55,8 +55,8 @@ public partial class ContainerServiceMaintenanceConfigurationData : ResourceData /// Initializes a new instance of . public ContainerServiceMaintenanceConfigurationData() { - TimeInWeek = new ChangeTrackingList(); - NotAllowedTime = new ChangeTrackingList(); + TimesInWeek = new ChangeTrackingList(); + NotAllowedTimes = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -64,11 +64,11 @@ public ContainerServiceMaintenanceConfigurationData() /// The name. /// The resourceType. /// The systemData. - /// + /// /// Time slots during the week when planned maintenance is allowed to proceed. If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. /// Serialized Name: MaintenanceConfiguration.properties.timeInWeek /// - /// + /// /// Time slots on which upgrade is not allowed. /// Serialized Name: MaintenanceConfiguration.properties.notAllowedTime /// @@ -77,10 +77,10 @@ public ContainerServiceMaintenanceConfigurationData() /// Serialized Name: MaintenanceConfiguration.properties.maintenanceWindow /// /// Keeps track of any properties unknown to the library. - internal ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList timeInWeek, IList notAllowedTime, ContainerServiceMaintenanceWindow maintenanceWindow, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IList timesInWeek, IList notAllowedTimes, ContainerServiceMaintenanceWindow maintenanceWindow, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - TimeInWeek = timeInWeek; - NotAllowedTime = notAllowedTime; + TimesInWeek = timesInWeek; + NotAllowedTimes = notAllowedTimes; MaintenanceWindow = maintenanceWindow; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -90,13 +90,13 @@ internal ContainerServiceMaintenanceConfigurationData(ResourceIdentifier id, str /// Serialized Name: MaintenanceConfiguration.properties.timeInWeek /// [WirePath("properties.timeInWeek")] - public IList TimeInWeek { get; } + public IList TimesInWeek { get; } /// /// Time slots on which upgrade is not allowed. /// Serialized Name: MaintenanceConfiguration.properties.notAllowedTime /// [WirePath("properties.notAllowedTime")] - public IList NotAllowedTime { get; } + public IList NotAllowedTimes { get; } /// /// Maintenance window for the maintenance configuration. /// Serialized Name: MaintenanceConfiguration.properties.maintenanceWindow diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.Serialization.cs similarity index 72% rename from sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.Serialization.cs rename to sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.Serialization.cs index 546877f92e47..05b6634cdb4c 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.Serialization.cs @@ -14,11 +14,11 @@ namespace Azure.ResourceManager.ContainerService.Models { - public partial class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem : IUtf8JsonSerializable, IJsonModel + public partial class AgentPoolAvailableVersion : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -29,16 +29,16 @@ void IJsonModel.Write /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AgentPoolAvailableVersion)} does not support writing '{format}' format."); } - if (Optional.IsDefined(Default)) + if (Optional.IsDefined(IsDefault)) { writer.WritePropertyName("default"u8); - writer.WriteBooleanValue(Default.Value); + writer.WriteBooleanValue(IsDefault.Value); } if (Optional.IsDefined(KubernetesVersion)) { @@ -67,19 +67,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AgentPoolAvailableVersion IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AgentPoolAvailableVersion)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(document.RootElement, options); + return DeserializeAgentPoolAvailableVersion(document.RootElement, options); } - internal static AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem DeserializeAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(JsonElement element, ModelReaderWriterOptions options = null) + internal static AgentPoolAvailableVersion DeserializeAgentPoolAvailableVersion(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -123,7 +123,7 @@ internal static AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem Deseri } } serializedAdditionalRawData = rawDataDictionary; - return new AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(@default, kubernetesVersion, isPreview, serializedAdditionalRawData); + return new AgentPoolAvailableVersion(@default, kubernetesVersion, isPreview, serializedAdditionalRawData); } private BinaryData SerializeBicep(ModelReaderWriterOptions options) @@ -137,7 +137,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("{"); - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(Default), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsDefault), out propertyOverride); if (hasPropertyOverride) { builder.Append(" default: "); @@ -145,10 +145,10 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsDefined(Default)) + if (Optional.IsDefined(IsDefault)) { builder.Append(" default: "); - var boolValue = Default.Value == true ? "true" : "false"; + var boolValue = IsDefault.Value == true ? "true" : "false"; builder.AppendLine($"{boolValue}"); } } @@ -196,9 +196,9 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) return BinaryData.FromString(builder.ToString()); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { @@ -207,26 +207,26 @@ BinaryData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AgentPoolAvailableVersion IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(document.RootElement, options); + return DeserializeAgentPoolAvailableVersion(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AgentPoolAvailableVersion)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.cs similarity index 84% rename from sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs rename to sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.cs index c6e50b014b0e..19cc4749774c 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.cs @@ -11,10 +11,10 @@ namespace Azure.ResourceManager.ContainerService.Models { /// - /// The AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + /// The AgentPoolAvailableVersion. /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem /// - public partial class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + public partial class AgentPoolAvailableVersion { /// /// Keeps track of any properties unknown to the library. @@ -48,13 +48,13 @@ public partial class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - internal AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() + /// Initializes a new instance of . + internal AgentPoolAvailableVersion() { } - /// Initializes a new instance of . - /// + /// Initializes a new instance of . + /// /// Whether this version is the default agent pool version. /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.default /// @@ -67,9 +67,9 @@ internal AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem() /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.isPreview /// /// Keeps track of any properties unknown to the library. - internal AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(bool? @default, string kubernetesVersion, bool? isPreview, IDictionary serializedAdditionalRawData) + internal AgentPoolAvailableVersion(bool? isDefault, string kubernetesVersion, bool? isPreview, IDictionary serializedAdditionalRawData) { - Default = @default; + IsDefault = isDefault; KubernetesVersion = kubernetesVersion; IsPreview = isPreview; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -80,7 +80,7 @@ internal AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(bool? @defaul /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.default /// [WirePath("default")] - public bool? Default { get; } + public bool? IsDefault { get; } /// /// The Kubernetes version (major.minor.patch). /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.kubernetesVersion diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs index 20cd7ffd2469..c347c97e7795 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.Serialization.cs @@ -77,7 +77,7 @@ internal static AgentPoolAvailableVersions DeserializeAgentPoolAvailableVersions string name = default; ResourceType type = default; SystemData systemData = default; - IReadOnlyList agentPoolVersions = default; + IReadOnlyList agentPoolVersions = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -121,10 +121,10 @@ internal static AgentPoolAvailableVersions DeserializeAgentPoolAvailableVersions { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - array.Add(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.DeserializeAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(item, options)); + array.Add(AgentPoolAvailableVersion.DeserializeAgentPoolAvailableVersion(item, options)); } agentPoolVersions = array; continue; @@ -143,7 +143,7 @@ internal static AgentPoolAvailableVersions DeserializeAgentPoolAvailableVersions name, type, systemData, - agentPoolVersions ?? new ChangeTrackingList(), + agentPoolVersions ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs index a87ae4310237..0ee47a69034d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersions.cs @@ -53,7 +53,7 @@ public partial class AgentPoolAvailableVersions : ResourceData /// Initializes a new instance of . internal AgentPoolAvailableVersions() { - AgentPoolVersions = new ChangeTrackingList(); + AgentPoolVersions = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -66,7 +66,7 @@ internal AgentPoolAvailableVersions() /// Serialized Name: AgentPoolAvailableVersions.properties.agentPoolVersions /// /// Keeps track of any properties unknown to the library. - internal AgentPoolAvailableVersions(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList agentPoolVersions, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal AgentPoolAvailableVersions(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IReadOnlyList agentPoolVersions, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { AgentPoolVersions = agentPoolVersions; _serializedAdditionalRawData = serializedAdditionalRawData; @@ -77,6 +77,6 @@ internal AgentPoolAvailableVersions(ResourceIdentifier id, string name, Resource /// Serialized Name: AgentPoolAvailableVersions.properties.agentPoolVersions /// [WirePath("properties.agentPoolVersions")] - public IReadOnlyList AgentPoolVersions { get; } + public IReadOnlyList AgentPoolVersions { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AzureResourceManagerContainerServiceContext.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AzureResourceManagerContainerServiceContext.cs index 50124dbb34ab..09643f632c08 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AzureResourceManagerContainerServiceContext.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AzureResourceManagerContainerServiceContext.cs @@ -17,8 +17,8 @@ namespace Azure.ResourceManager.ContainerService /// For more information see 'https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/System.ClientModel/src/docs/ModelReaderWriterContext.md' /// [ModelReaderWriterBuildable(typeof(AdvancedNetworkingObservability))] + [ModelReaderWriterBuildable(typeof(AgentPoolAvailableVersion))] [ModelReaderWriterBuildable(typeof(AgentPoolAvailableVersions))] - [ModelReaderWriterBuildable(typeof(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem))] [ModelReaderWriterBuildable(typeof(AgentPoolDeleteMachinesContent))] [ModelReaderWriterBuildable(typeof(AgentPoolGatewayProfile))] [ModelReaderWriterBuildable(typeof(AgentPoolGpuProfile))] diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPFamily.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPFamily.cs new file mode 100644 index 000000000000..4564a1ba2352 --- /dev/null +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPFamily.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.ContainerService.Models +{ + /// + /// To determine if address belongs IPv4 or IPv6 family + /// Serialized Name: IPFamily + /// + public readonly partial struct ContainerServiceIPFamily : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ContainerServiceIPFamily(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string IPv4Value = "IPv4"; + private const string IPv6Value = "IPv6"; + + /// + /// IPv4 family + /// Serialized Name: IPFamily.IPv4 + /// + public static ContainerServiceIPFamily IPv4 { get; } = new ContainerServiceIPFamily(IPv4Value); + /// + /// IPv6 family + /// Serialized Name: IPFamily.IPv6 + /// + public static ContainerServiceIPFamily IPv6 { get; } = new ContainerServiceIPFamily(IPv6Value); + /// Determines if two values are the same. + public static bool operator ==(ContainerServiceIPFamily left, ContainerServiceIPFamily right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerServiceIPFamily left, ContainerServiceIPFamily right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ContainerServiceIPFamily(string value) => new ContainerServiceIPFamily(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ContainerServiceIPFamily other && Equals(other); + /// + public bool Equals(ContainerServiceIPFamily other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.Serialization.cs index f5b74cac221e..52f4fe53051f 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.Serialization.cs @@ -82,7 +82,7 @@ internal static ContainerServiceMachineIPAddress DeserializeContainerServiceMach { return null; } - IPFamily? family = default; + ContainerServiceIPFamily? family = default; string ip = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -94,7 +94,7 @@ internal static ContainerServiceMachineIPAddress DeserializeContainerServiceMach { continue; } - family = new IPFamily(property.Value.GetString()); + family = new ContainerServiceIPFamily(property.Value.GetString()); continue; } if (property.NameEquals("ip"u8)) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.cs index 755b736f7ae0..f6736a5b3ee8 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceMachineIPAddress.cs @@ -63,7 +63,7 @@ internal ContainerServiceMachineIPAddress() /// Serialized Name: MachineIpAddress.ip /// /// Keeps track of any properties unknown to the library. - internal ContainerServiceMachineIPAddress(IPFamily? family, string ip, IDictionary serializedAdditionalRawData) + internal ContainerServiceMachineIPAddress(ContainerServiceIPFamily? family, string ip, IDictionary serializedAdditionalRawData) { Family = family; IP = ip; @@ -75,7 +75,7 @@ internal ContainerServiceMachineIPAddress(IPFamily? family, string ip, IDictiona /// Serialized Name: MachineIpAddress.family /// [WirePath("family")] - public IPFamily? Family { get; } + public ContainerServiceIPFamily? Family { get; } /// /// IPv4 or IPv6 address of the machine /// Serialized Name: MachineIpAddress.ip diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs index c2d98b6f1460..44391970e030 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.Serialization.cs @@ -189,7 +189,7 @@ internal static ContainerServiceNetworkProfile DeserializeContainerServiceNetwor ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile = default; IList podCidrs = default; IList serviceCidrs = default; - IList ipFamilies = default; + IList ipFamilies = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -342,10 +342,10 @@ internal static ContainerServiceNetworkProfile DeserializeContainerServiceNetwor { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(new IPFamily(item.GetString())); + array.Add(new ContainerServiceIPFamily(item.GetString())); } ipFamilies = array; continue; @@ -373,7 +373,7 @@ internal static ContainerServiceNetworkProfile DeserializeContainerServiceNetwor staticEgressGatewayProfile, podCidrs ?? new ChangeTrackingList(), serviceCidrs ?? new ChangeTrackingList(), - ipFamilies ?? new ChangeTrackingList(), + ipFamilies ?? new ChangeTrackingList(), serializedAdditionalRawData); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs index 470a43f35eba..c3ab64b980f4 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceNetworkProfile.cs @@ -53,7 +53,7 @@ public ContainerServiceNetworkProfile() { PodCidrs = new ChangeTrackingList(); ServiceCidrs = new ChangeTrackingList(); - NetworkIPFamilies = new ChangeTrackingList(); + NetworkIPFamilies = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -126,7 +126,7 @@ public ContainerServiceNetworkProfile() /// Serialized Name: ContainerServiceNetworkProfile.ipFamilies /// /// Keeps track of any properties unknown to the library. - internal ContainerServiceNetworkProfile(ContainerServiceNetworkPlugin? networkPlugin, ContainerServiceNetworkPluginMode? networkPluginMode, ContainerServiceNetworkPolicy? networkPolicy, ContainerServiceNetworkMode? networkMode, NetworkDataplane? networkDataplane, ManagedClusterAdvancedNetworking advancedNetworking, string podCidr, string serviceCidr, string dnsServiceIP, ContainerServiceOutboundType? outboundType, ContainerServiceLoadBalancerSku? loadBalancerSku, ManagedClusterLoadBalancerProfile loadBalancerProfile, ManagedClusterNatGatewayProfile natGatewayProfile, ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile, IList podCidrs, IList serviceCidrs, IList networkIPFamilies, IDictionary serializedAdditionalRawData) + internal ContainerServiceNetworkProfile(ContainerServiceNetworkPlugin? networkPlugin, ContainerServiceNetworkPluginMode? networkPluginMode, ContainerServiceNetworkPolicy? networkPolicy, ContainerServiceNetworkMode? networkMode, NetworkDataplane? networkDataplane, ManagedClusterAdvancedNetworking advancedNetworking, string podCidr, string serviceCidr, string dnsServiceIP, ContainerServiceOutboundType? outboundType, ContainerServiceLoadBalancerSku? loadBalancerSku, ManagedClusterLoadBalancerProfile loadBalancerProfile, ManagedClusterNatGatewayProfile natGatewayProfile, ManagedClusterStaticEgressGatewayProfile staticEgressGatewayProfile, IList podCidrs, IList serviceCidrs, IList networkIPFamilies, IDictionary serializedAdditionalRawData) { NetworkPlugin = networkPlugin; NetworkPluginMode = networkPluginMode; @@ -264,6 +264,6 @@ public bool? IsStaticEgressGatewayAddonEnabled /// Serialized Name: ContainerServiceNetworkProfile.ipFamilies /// [WirePath("ipFamilies")] - public IList NetworkIPFamilies { get; } + public IList NetworkIPFamilies { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/Ossku.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSSku.cs similarity index 66% rename from sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/Ossku.cs rename to sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSSku.cs index ef8fe209ff3a..80d0279cc72d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/Ossku.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSSku.cs @@ -14,13 +14,13 @@ namespace Azure.ResourceManager.ContainerService.Models /// 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. /// Serialized Name: Ossku /// - public readonly partial struct Ossku : IEquatable + public readonly partial struct ContainerServiceOSSku : IEquatable { private readonly string _value; - /// Initializes a new instance of . + /// Initializes a new instance of . /// is null. - public Ossku(string value) + public ContainerServiceOSSku(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } @@ -38,54 +38,54 @@ public Ossku(string value) /// Use Ubuntu as the OS for node images. /// Serialized Name: Ossku.Ubuntu /// - public static Ossku Ubuntu { get; } = new Ossku(UbuntuValue); + public static ContainerServiceOSSku Ubuntu { get; } = new ContainerServiceOSSku(UbuntuValue); /// /// Use AzureLinux as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, visit https://aka.ms/azurelinux for more information. /// Serialized Name: Ossku.AzureLinux /// - public static Ossku AzureLinux { get; } = new Ossku(AzureLinuxValue); + public static ContainerServiceOSSku AzureLinux { get; } = new ContainerServiceOSSku(AzureLinuxValue); /// /// Use AzureLinux3 as the OS for node images. Azure Linux is a container-optimized Linux distro built by Microsoft, visit https://aka.ms/azurelinux for more information. For limitations, visit https://aka.ms/aks/node-images. For OS migration guidance, see https://aka.ms/aks/upgrade-os-version. /// Serialized Name: Ossku.AzureLinux3 /// - public static Ossku AzureLinux3 { get; } = new Ossku(AzureLinux3Value); + public static ContainerServiceOSSku AzureLinux3 { get; } = new ContainerServiceOSSku(AzureLinux3Value); /// /// Deprecated OSSKU. Microsoft recommends that new deployments choose 'AzureLinux' instead. /// Serialized Name: Ossku.CBLMariner /// - public static Ossku CblMariner { get; } = new Ossku(CblMarinerValue); + public static ContainerServiceOSSku CblMariner { get; } = new ContainerServiceOSSku(CblMarinerValue); /// /// Use Windows2019 as the OS for node images. Unsupported for system node pools. Windows2019 only supports Windows2019 containers; it cannot run Windows2022 containers and vice versa. /// Serialized Name: Ossku.Windows2019 /// - public static Ossku Windows2019 { get; } = new Ossku(Windows2019Value); + public static ContainerServiceOSSku Windows2019 { get; } = new ContainerServiceOSSku(Windows2019Value); /// /// Use Windows2022 as the OS for node images. Unsupported for system node pools. Windows2022 only supports Windows2022 containers; it cannot run Windows2019 containers and vice versa. /// Serialized Name: Ossku.Windows2022 /// - public static Ossku Windows2022 { get; } = new Ossku(Windows2022Value); + public static ContainerServiceOSSku Windows2022 { get; } = new ContainerServiceOSSku(Windows2022Value); /// /// Use Ubuntu2204 as the OS for node images, however, Ubuntu 22.04 may not be supported for all nodepools. For limitations and supported kubernetes versions, see https://aka.ms/aks/supported-ubuntu-versions /// Serialized Name: Ossku.Ubuntu2204 /// - public static Ossku Ubuntu2204 { get; } = new Ossku(Ubuntu2204Value); + public static ContainerServiceOSSku Ubuntu2204 { get; } = new ContainerServiceOSSku(Ubuntu2204Value); /// /// Use Ubuntu2404 as the OS for node images, however, Ubuntu 24.04 may not be supported for all nodepools. For limitations and supported kubernetes versions, see see https://aka.ms/aks/supported-ubuntu-versions /// Serialized Name: Ossku.Ubuntu2404 /// - public static Ossku Ubuntu2404 { get; } = new Ossku(Ubuntu2404Value); - /// Determines if two values are the same. - public static bool operator ==(Ossku left, Ossku right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(Ossku left, Ossku right) => !left.Equals(right); - /// Converts a to a . - public static implicit operator Ossku(string value) => new Ossku(value); + public static ContainerServiceOSSku Ubuntu2404 { get; } = new ContainerServiceOSSku(Ubuntu2404Value); + /// Determines if two values are the same. + public static bool operator ==(ContainerServiceOSSku left, ContainerServiceOSSku right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ContainerServiceOSSku left, ContainerServiceOSSku right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ContainerServiceOSSku(string value) => new ContainerServiceOSSku(value); /// [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is Ossku other && Equals(other); + public override bool Equals(object obj) => obj is ContainerServiceOSSku other && Equals(other); /// - public bool Equals(Ossku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + public bool Equals(ContainerServiceOSSku other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// [EditorBrowsable(EditorBrowsableState.Never)] diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs index 28c8f390e1d2..10bd229f4450 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.Serialization.cs @@ -108,7 +108,7 @@ internal static ContainerServicePrivateLinkResourceData DeserializeContainerServ { return null; } - string id = default; + ResourceIdentifier id = default; string name = default; ResourceType? type = default; string groupId = default; @@ -120,7 +120,11 @@ internal static ContainerServicePrivateLinkResourceData DeserializeContainerServ { if (property.NameEquals("id"u8)) { - id = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); continue; } if (property.NameEquals("name"u8)) @@ -226,15 +230,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) if (Optional.IsDefined(Id)) { builder.Append(" id: "); - if (Id.Contains(Environment.NewLine)) - { - builder.AppendLine("'''"); - builder.AppendLine($"{Id}'''"); - } - else - { - builder.AppendLine($"'{Id}'"); - } + builder.AppendLine($"'{Id.ToString()}'"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs index 94cf3184b361..2f79670ce44b 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServicePrivateLinkResourceData.cs @@ -81,7 +81,7 @@ public ContainerServicePrivateLinkResourceData() /// Serialized Name: PrivateLinkResource.privateLinkServiceID /// /// Keeps track of any properties unknown to the library. - internal ContainerServicePrivateLinkResourceData(string id, string name, ResourceType? resourceType, string groupId, IList requiredMembers, ResourceIdentifier privateLinkServiceId, IDictionary serializedAdditionalRawData) + internal ContainerServicePrivateLinkResourceData(ResourceIdentifier id, string name, ResourceType? resourceType, string groupId, IList requiredMembers, ResourceIdentifier privateLinkServiceId, IDictionary serializedAdditionalRawData) { Id = id; Name = name; @@ -97,7 +97,7 @@ internal ContainerServicePrivateLinkResourceData(string id, string name, Resourc /// Serialized Name: PrivateLinkResource.id /// [WirePath("id")] - public string Id { get; set; } + public ResourceIdentifier Id { get; set; } /// /// The name of the private link resource. /// Serialized Name: PrivateLinkResource.name diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IPFamily.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IPFamily.cs deleted file mode 100644 index 70c8ab7964a9..000000000000 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/IPFamily.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ContainerService.Models -{ - /// - /// To determine if address belongs IPv4 or IPv6 family - /// Serialized Name: IPFamily - /// - public readonly partial struct IPFamily : IEquatable - { - } -} diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs index 7dcd2ef27b1d..4dea782e9291 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.Serialization.cs @@ -115,7 +115,7 @@ internal static ManagedClusterAadProfile DeserializeManagedClusterAadProfile(Jso } bool? managed = default; bool? enableAzureRBAC = default; - IList adminGroupObjectIds = default; + IList adminGroupObjectIds = default; Guid? clientAppId = default; Guid? serverAppId = default; string serverAppSecret = default; @@ -148,10 +148,10 @@ internal static ManagedClusterAadProfile DeserializeManagedClusterAadProfile(Jso { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(item.GetString()); + array.Add(item.GetGuid()); } adminGroupObjectIds = array; continue; @@ -197,7 +197,7 @@ internal static ManagedClusterAadProfile DeserializeManagedClusterAadProfile(Jso return new ManagedClusterAadProfile( managed, enableAzureRBAC, - adminGroupObjectIds ?? new ChangeTrackingList(), + adminGroupObjectIds ?? new ChangeTrackingList(), clientAppId, serverAppId, serverAppSecret, @@ -264,20 +264,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) builder.AppendLine("["); foreach (var item in AdminGroupObjectIds) { - if (item == null) - { - builder.Append("null"); - continue; - } - if (item.Contains(Environment.NewLine)) - { - builder.AppendLine(" '''"); - builder.AppendLine($"{item}'''"); - } - else - { - builder.AppendLine($" '{item}'"); - } + builder.AppendLine($" '{item.ToString()}'"); } builder.AppendLine(" ]"); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs index 93b6f9b24078..72ad53098e83 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAadProfile.cs @@ -51,7 +51,7 @@ public partial class ManagedClusterAadProfile /// Initializes a new instance of . public ManagedClusterAadProfile() { - AdminGroupObjectIds = new ChangeTrackingList(); + AdminGroupObjectIds = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -84,7 +84,7 @@ public ManagedClusterAadProfile() /// Serialized Name: ManagedClusterAADProfile.tenantID /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterAadProfile(bool? isManagedAadEnabled, bool? isAzureRbacEnabled, IList adminGroupObjectIds, Guid? clientAppId, Guid? serverAppId, string serverAppSecret, Guid? tenantId, IDictionary serializedAdditionalRawData) + internal ManagedClusterAadProfile(bool? isManagedAadEnabled, bool? isAzureRbacEnabled, IList adminGroupObjectIds, Guid? clientAppId, Guid? serverAppId, string serverAppSecret, Guid? tenantId, IDictionary serializedAdditionalRawData) { IsManagedAadEnabled = isManagedAadEnabled; IsAzureRbacEnabled = isAzureRbacEnabled; @@ -113,7 +113,7 @@ internal ManagedClusterAadProfile(bool? isManagedAadEnabled, bool? isAzureRbacEn /// Serialized Name: ManagedClusterAADProfile.adminGroupObjectIDs /// [WirePath("adminGroupObjectIDs")] - public IList AdminGroupObjectIds { get; } + public IList AdminGroupObjectIds { get; } /// /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. /// Serialized Name: ManagedClusterAADProfile.clientAppID diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs index c93cad630a6e..ec3349b67fb5 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.Serialization.cs @@ -75,7 +75,7 @@ internal static ManagedClusterAgentPoolProfile DeserializeManagedClusterAgentPoo PodIPAllocationMode? podIPAllocationMode = default; int? maxPods = default; ContainerServiceOSType? osType = default; - Ossku? osSku = default; + ContainerServiceOSSku? osSku = default; int? maxCount = default; int? minCount = default; bool? enableAutoScaling = default; @@ -240,7 +240,7 @@ internal static ManagedClusterAgentPoolProfile DeserializeManagedClusterAgentPoo { continue; } - osSku = new Ossku(property.Value.GetString()); + osSku = new ContainerServiceOSSku(property.Value.GetString()); continue; } if (property.NameEquals("maxCount"u8)) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs index 11e6a7f6c8f8..e9d30d2f6a59 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs @@ -252,7 +252,7 @@ public ManagedClusterAgentPoolProfile(string name) /// Unique name of the agent pool profile in the context of the subscription and resource group. Windows agent pool names must be 6 characters or less. /// Serialized Name: ManagedClusterAgentPoolProfile.name /// - internal ManagedClusterAgentPoolProfile(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, Ossku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, ScaleDownMode? scaleDownMode, AgentPoolType? agentPoolType, 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, IDictionary serializedAdditionalRawData, string name) : base(etag, count, vmSize, osDiskSizeInGB, osDiskType, kubeletDiskType, workloadRuntime, messageOfTheDay, vnetSubnetId, podSubnetId, podIPAllocationMode, maxPods, osType, osSku, maxCount, minCount, enableAutoScaling, scaleDownMode, agentPoolType, mode, orchestratorVersion, currentOrchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, powerState, availabilityZones, enableNodePublicIP, nodePublicIPPrefixId, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupId, kubeletConfig, linuxOSConfig, enableEncryptionAtHost, enableUltraSsd, enableFips, gpuInstanceProfile, creationData, capacityReservationGroupId, hostGroupId, networkProfile, windowsProfile, securityProfile, gpuProfile, gatewayProfile, virtualMachinesProfile, virtualMachineNodesStatus, status, localDnsProfile, serializedAdditionalRawData) + internal ManagedClusterAgentPoolProfile(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? agentPoolType, 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, IDictionary serializedAdditionalRawData, string name) : base(etag, count, vmSize, osDiskSizeInGB, osDiskType, kubeletDiskType, workloadRuntime, messageOfTheDay, vnetSubnetId, podSubnetId, podIPAllocationMode, maxPods, osType, osSku, maxCount, minCount, enableAutoScaling, scaleDownMode, agentPoolType, mode, orchestratorVersion, currentOrchestratorVersion, nodeImageVersion, upgradeSettings, provisioningState, powerState, availabilityZones, enableNodePublicIP, nodePublicIPPrefixId, scaleSetPriority, scaleSetEvictionPolicy, spotMaxPrice, tags, nodeLabels, nodeTaints, proximityPlacementGroupId, kubeletConfig, linuxOSConfig, enableEncryptionAtHost, enableUltraSsd, enableFips, gpuInstanceProfile, creationData, capacityReservationGroupId, hostGroupId, networkProfile, windowsProfile, securityProfile, gpuProfile, gatewayProfile, virtualMachinesProfile, virtualMachineNodesStatus, status, localDnsProfile, serializedAdditionalRawData) { Name = name; } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs index 1a4d2b422b1d..146ed5be6669 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.Serialization.cs @@ -383,7 +383,7 @@ internal static ManagedClusterAgentPoolProfileProperties DeserializeManagedClust PodIPAllocationMode? podIPAllocationMode = default; int? maxPods = default; ContainerServiceOSType? osType = default; - Ossku? osSku = default; + ContainerServiceOSSku? osSku = default; int? maxCount = default; int? minCount = default; bool? enableAutoScaling = default; @@ -543,7 +543,7 @@ internal static ManagedClusterAgentPoolProfileProperties DeserializeManagedClust { continue; } - osSku = new Ossku(property.Value.GetString()); + osSku = new ContainerServiceOSSku(property.Value.GetString()); continue; } if (property.NameEquals("maxCount"u8)) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs index 390fde4a09d7..f7724b1609da 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfileProperties.cs @@ -277,7 +277,7 @@ public ManagedClusterAgentPoolProfileProperties() /// Serialized Name: ManagedClusterAgentPoolProfileProperties.localDNSProfile /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterAgentPoolProfileProperties(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, Ossku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, ScaleDownMode? scaleDownMode, AgentPoolType? agentPoolType, 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, IDictionary serializedAdditionalRawData) + internal ManagedClusterAgentPoolProfileProperties(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? agentPoolType, 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, AgentPoolWindowsProfile windowsProfile, AgentPoolSecurityProfile securityProfile, AgentPoolGpuProfile gpuProfile, AgentPoolGatewayProfile gatewayProfile, VirtualMachinesProfile virtualMachinesProfile, IList virtualMachineNodesStatus, AgentPoolStatus status, LocalDnsProfile localDnsProfile, IDictionary serializedAdditionalRawData) { ETag = etag; Count = count; @@ -419,7 +419,7 @@ internal ManagedClusterAgentPoolProfileProperties(ETag? etag, int? count, string /// Serialized Name: ManagedClusterAgentPoolProfileProperties.osSKU /// [WirePath("osSKU")] - public Ossku? OSSku { get; set; } + public ContainerServiceOSSku? OSSku { get; set; } /// /// The maximum number of nodes for auto-scaling /// Serialized Name: ManagedClusterAgentPoolProfileProperties.maxCount diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs index 548c3bc339bd..df75628f2f20 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.Serialization.cs @@ -90,10 +90,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("ok-total-unready-count"u8); writer.WriteStringValue(OkTotalUnreadyCount); } - if (Optional.IsDefined(ScanInterval)) + if (Optional.IsDefined(ScanIntervalInSeconds)) { writer.WritePropertyName("scan-interval"u8); - writer.WriteStringValue(ScanInterval); + writer.WriteStringValue(ScanIntervalInSeconds); } if (Optional.IsDefined(ScaleDownDelayAfterAdd)) { @@ -577,7 +577,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScanInterval), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(ScanIntervalInSeconds), out propertyOverride); if (hasPropertyOverride) { builder.Append(" scan-interval: "); @@ -585,17 +585,17 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsDefined(ScanInterval)) + if (Optional.IsDefined(ScanIntervalInSeconds)) { builder.Append(" scan-interval: "); - if (ScanInterval.Contains(Environment.NewLine)) + if (ScanIntervalInSeconds.Contains(Environment.NewLine)) { builder.AppendLine("'''"); - builder.AppendLine($"{ScanInterval}'''"); + builder.AppendLine($"{ScanIntervalInSeconds}'''"); } else { - builder.AppendLine($"'{ScanInterval}'"); + builder.AppendLine($"'{ScanIntervalInSeconds}'"); } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs index 185328f97ed6..f063299750d5 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAutoScalerProfile.cs @@ -98,7 +98,7 @@ public ManagedClusterAutoScalerProfile() /// The number of allowed unready nodes, irrespective of max-total-unready-percentage. This must be an integer. The default is 3. /// Serialized Name: ManagedClusterPropertiesAutoScalerProfile.ok-total-unready-count /// - /// + /// /// How often cluster is reevaluated for scale up or down. The default is '10'. Values must be an integer number of seconds. /// Serialized Name: ManagedClusterPropertiesAutoScalerProfile.scan-interval /// @@ -135,7 +135,7 @@ public ManagedClusterAutoScalerProfile() /// Serialized Name: ManagedClusterPropertiesAutoScalerProfile.skip-nodes-with-system-pods /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterAutoScalerProfile(string balanceSimilarNodeGroups, bool? daemonsetEvictionForEmptyNodes, bool? daemonsetEvictionForOccupiedNodes, bool? ignoreDaemonsetsUtilization, AutoScaleExpander? expander, string maxEmptyBulkDelete, string maxGracefulTerminationSec, string maxNodeProvisionTime, string maxTotalUnreadyPercentage, string newPodScaleUpDelay, string okTotalUnreadyCount, string scanInterval, string scaleDownDelayAfterAdd, string scaleDownDelayAfterDelete, string scaleDownDelayAfterFailure, string scaleDownUnneededTime, string scaleDownUnreadyTime, string scaleDownUtilizationThreshold, string skipNodesWithLocalStorage, string skipNodesWithSystemPods, IDictionary serializedAdditionalRawData) + internal ManagedClusterAutoScalerProfile(string balanceSimilarNodeGroups, bool? daemonsetEvictionForEmptyNodes, bool? daemonsetEvictionForOccupiedNodes, bool? ignoreDaemonsetsUtilization, AutoScaleExpander? expander, string maxEmptyBulkDelete, string maxGracefulTerminationSec, string maxNodeProvisionTime, string maxTotalUnreadyPercentage, string newPodScaleUpDelay, string okTotalUnreadyCount, string scanIntervalInSeconds, string scaleDownDelayAfterAdd, string scaleDownDelayAfterDelete, string scaleDownDelayAfterFailure, string scaleDownUnneededTime, string scaleDownUnreadyTime, string scaleDownUtilizationThreshold, string skipNodesWithLocalStorage, string skipNodesWithSystemPods, IDictionary serializedAdditionalRawData) { BalanceSimilarNodeGroups = balanceSimilarNodeGroups; DaemonsetEvictionForEmptyNodes = daemonsetEvictionForEmptyNodes; @@ -148,7 +148,7 @@ internal ManagedClusterAutoScalerProfile(string balanceSimilarNodeGroups, bool? MaxTotalUnreadyPercentage = maxTotalUnreadyPercentage; NewPodScaleUpDelay = newPodScaleUpDelay; OkTotalUnreadyCount = okTotalUnreadyCount; - ScanInterval = scanInterval; + ScanIntervalInSeconds = scanIntervalInSeconds; ScaleDownDelayAfterAdd = scaleDownDelayAfterAdd; ScaleDownDelayAfterDelete = scaleDownDelayAfterDelete; ScaleDownDelayAfterFailure = scaleDownDelayAfterFailure; @@ -231,7 +231,7 @@ internal ManagedClusterAutoScalerProfile(string balanceSimilarNodeGroups, bool? /// Serialized Name: ManagedClusterPropertiesAutoScalerProfile.scan-interval /// [WirePath("scan-interval")] - public string ScanInterval { get; set; } + public string ScanIntervalInSeconds { get; set; } /// /// How long after scale up that scale down evaluation resumes. The default is '10m'. Values must be an integer followed by an 'm'. No unit of time other than minutes (m) is supported. /// Serialized Name: ManagedClusterPropertiesAutoScalerProfile.scale-down-delay-after-add diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs index ece0bf96a2ba..9c9e5e9a87bb 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.Serialization.cs @@ -47,10 +47,10 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("licenseType"u8); writer.WriteStringValue(LicenseType.Value.ToString()); } - if (Optional.IsDefined(EnableCsiProxy)) + if (Optional.IsDefined(IsCsiProxyEnabled)) { writer.WritePropertyName("enableCSIProxy"u8); - writer.WriteBooleanValue(EnableCsiProxy.Value); + writer.WriteBooleanValue(IsCsiProxyEnabled.Value); } if (Optional.IsDefined(GmsaProfile)) { @@ -227,7 +227,7 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } } - hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(EnableCsiProxy), out propertyOverride); + hasPropertyOverride = hasObjectOverride && propertyOverrides.TryGetValue(nameof(IsCsiProxyEnabled), out propertyOverride); if (hasPropertyOverride) { builder.Append(" enableCSIProxy: "); @@ -235,10 +235,10 @@ private BinaryData SerializeBicep(ModelReaderWriterOptions options) } else { - if (Optional.IsDefined(EnableCsiProxy)) + if (Optional.IsDefined(IsCsiProxyEnabled)) { builder.Append(" enableCSIProxy: "); - var boolValue = EnableCsiProxy.Value == true ? "true" : "false"; + var boolValue = IsCsiProxyEnabled.Value == true ? "true" : "false"; builder.AppendLine($"{boolValue}"); } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs index 2b2f05b92c53..958e2ca41777 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterWindowsProfile.cs @@ -74,7 +74,7 @@ public ManagedClusterWindowsProfile(string adminUsername) /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details. /// Serialized Name: ManagedClusterWindowsProfile.licenseType /// - /// + /// /// Whether to enable CSI proxy. For more details on CSI proxy, see the [CSI proxy GitHub repo](https://github.com/kubernetes-csi/csi-proxy). /// Serialized Name: ManagedClusterWindowsProfile.enableCSIProxy /// @@ -83,12 +83,12 @@ public ManagedClusterWindowsProfile(string adminUsername) /// Serialized Name: ManagedClusterWindowsProfile.gmsaProfile /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterWindowsProfile(string adminUsername, string adminPassword, WindowsVmLicenseType? licenseType, bool? enableCsiProxy, WindowsGmsaProfile gmsaProfile, IDictionary serializedAdditionalRawData) + internal ManagedClusterWindowsProfile(string adminUsername, string adminPassword, WindowsVmLicenseType? licenseType, bool? isCsiProxyEnabled, WindowsGmsaProfile gmsaProfile, IDictionary serializedAdditionalRawData) { AdminUsername = adminUsername; AdminPassword = adminPassword; LicenseType = licenseType; - EnableCsiProxy = enableCsiProxy; + IsCsiProxyEnabled = isCsiProxyEnabled; GmsaProfile = gmsaProfile; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -121,7 +121,7 @@ internal ManagedClusterWindowsProfile() /// Serialized Name: ManagedClusterWindowsProfile.enableCSIProxy /// [WirePath("enableCSIProxy")] - public bool? EnableCsiProxy { get; set; } + public bool? IsCsiProxyEnabled { get; set; } /// /// The Windows gMSA Profile in the Managed Cluster. /// Serialized Name: ManagedClusterWindowsProfile.gmsaProfile diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md index b757d9d99b08..a54e015d9b35 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md @@ -118,6 +118,18 @@ rename-mapping: AdvancedNetworkingSecurity.enabled: IsEnabled ManagedClusterIngressProfileWebAppRouting.enabled: IsEnabled ContainerServiceNetworkProfile.ipFamilies: NetworkIPFamilies + AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem: AgentPoolAvailableVersion + AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.default: IsDefault + ManagedClusterAgentPoolProfileProperties.osDiskSizeGB: OSDiskSizeInGB + Ossku: ContainerServiceOSSku + MaintenanceConfiguration.properties.timeInWeek: TimesInWeek + MaintenanceConfiguration.properties.notAllowedTime: NotAllowedTimes + PrivateLinkResource.id: -|arm-id + ManagedClusterPropertiesAutoScalerProfile.scan-interval: ScanIntervalInSeconds + ManagedClusterWindowsProfile.enableCSIProxy: IsCsiProxyEnabled + ManagedClusterAADProfile.adminGroupObjectIDs: -|uuid + IPFamily: ContainerServiceIPFamily + AgentPool.properties.osDiskSizeGB: OSDiskSizeInGB format-by-name-rules: 'tenantId': 'uuid' @@ -188,7 +200,6 @@ prepend-rp-prefix: - WeekDay - OSType - OSDiskType - - OSSku - UserAssignedIdentity - AgentPool - MaintenanceConfiguration @@ -220,30 +231,10 @@ prepend-rp-prefix: - MachineProperties - ArtifactSource - MachineIpAddress - - IpFamily directive: - - from: managedClusters.json - where: $.definitions.AgentPoolAvailableVersionsProperties.properties.agentPoolVersions.items - transform: > - $['x-ms-client-name'] = 'AgentPoolAvailableVersion'; - $.properties.default['x-ms-client-name'] = 'IsDefault'; - - from: managedClusters.json - where: $.definitions.ManagedClusterAgentPoolProfileProperties.properties.osDiskSizeGB - transform: > - $['x-ms-client-name'] = 'OSDiskSizeInGB'; - - from: managedClusters.json - where: $.definitions.ContainerServiceMasterProfile.properties.osDiskSizeGB - transform: > - $['x-ms-client-name'] = 'OSDiskSizeInGB'; - from: managedClusters.json where: $.definitions transform: > - $.OSSKU['x-ms-enum'].name = 'OSSku'; - $.MaintenanceConfigurationProperties.properties.timeInWeek['x-ms-client-name'] = 'TimesInWeek'; - $.MaintenanceConfigurationProperties.properties.notAllowedTime['x-ms-client-name'] = 'NotAllowedTimes'; - $.PrivateLinkResource.properties.id['x-ms-format'] = 'arm-id'; - $.ManagedClusterProperties.properties.autoScalerProfile.properties['scan-interval']['x-ms-client-name'] = 'ScanIntervalInSeconds'; - $.ManagedClusterWindowsProfile.properties.enableCSIProxy['x-ms-client-name'] = 'IsCsiProxyEnabled'; - $.ManagedClusterAADProfile.properties.adminGroupObjectIDs.items.format = 'uuid'; + $.ManagedClusterPoolUpgradeProfile.properties.upgrades['readonly'] = true; ``` diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolCollection.cs index ec5406c18b38..ebdbd489d21b 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolCollection.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolCollection.cs @@ -529,7 +529,7 @@ public async Task CreateOrUpdate_CreateAgentPoolWithOSSKU() Count = 3, VmSize = "Standard_DS2_v2", OSType = ContainerServiceOSType.Linux, - OSSku = Ossku.AzureLinux, + OSSku = ContainerServiceOSSku.AzureLinux, OrchestratorVersion = "", KubeletConfig = new KubeletConfig { @@ -741,7 +741,7 @@ public async Task CreateOrUpdate_CreateAgentPoolWithWindowsOSSKU() Count = 3, VmSize = "Standard_D4s_v3", OSType = ContainerServiceOSType.Windows, - OSSku = Ossku.Windows2022, + OSSku = ContainerServiceOSSku.Windows2022, OrchestratorVersion = "1.23.3", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, agentPoolName, data); @@ -837,7 +837,7 @@ public async Task CreateOrUpdate_CreateWindowsAgentPoolWithDisablingOutboundNAT( Count = 3, VmSize = "Standard_D4s_v3", OSType = ContainerServiceOSType.Windows, - OSSku = Ossku.Windows2022, + OSSku = ContainerServiceOSSku.Windows2022, OrchestratorVersion = "1.23.8", IsOutboundNatDisabled = true, }; diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolResource.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolResource.cs index 2f07f1998fbf..a9a32ef55cf8 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolResource.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceAgentPoolResource.cs @@ -554,7 +554,7 @@ public async Task Update_CreateAgentPoolWithOSSKU() Count = 3, VmSize = "Standard_DS2_v2", OSType = ContainerServiceOSType.Linux, - OSSku = Ossku.AzureLinux, + OSSku = ContainerServiceOSSku.AzureLinux, OrchestratorVersion = "", KubeletConfig = new KubeletConfig { @@ -754,7 +754,7 @@ public async Task Update_CreateAgentPoolWithWindowsOSSKU() Count = 3, VmSize = "Standard_D4s_v3", OSType = ContainerServiceOSType.Windows, - OSSku = Ossku.Windows2022, + OSSku = ContainerServiceOSSku.Windows2022, OrchestratorVersion = "1.23.3", }; ArmOperation lro = await containerServiceAgentPool.UpdateAsync(WaitUntil.Completed, data); @@ -844,7 +844,7 @@ public async Task Update_CreateWindowsAgentPoolWithDisablingOutboundNAT() Count = 3, VmSize = "Standard_D4s_v3", OSType = ContainerServiceOSType.Windows, - OSSku = Ossku.Windows2022, + OSSku = ContainerServiceOSSku.Windows2022, OrchestratorVersion = "1.23.8", IsOutboundNatDisabled = true, }; diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterCollection.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterCollection.cs index 186d7fb21780..6bbf047c0e29 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterCollection.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/tests/Generated/Samples/Sample_ContainerServiceManagedClusterCollection.cs @@ -91,7 +91,7 @@ public async Task CreateOrUpdate_CreateManagedClusterUsingAnAgentPoolSnapshot() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -178,7 +178,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithAKSManagedNATGatewayAsO }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -278,7 +278,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithAzureKeyVaultSecretsPro }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -369,7 +369,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithCapacityReservationGrou }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -459,7 +459,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithCustomCATrustCertificat }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -553,7 +553,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithDedicatedHostGroup() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -644,7 +644,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithEncryptionAtHostEnabled }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -735,7 +735,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithFIPSEnabledOS() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -826,7 +826,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithGPUMIG() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -923,7 +923,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithHTTPProxyConfigured() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1022,7 +1022,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithLongTermSupport() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, ApiServerAccessProfile = new ManagedClusterApiServerAccessProfile @@ -1116,7 +1116,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithNodePublicIPPrefix() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1174,7 +1174,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithOSSKU() Count = 3, VmSize = "Standard_DS2_v2", OSType = ContainerServiceOSType.Linux, -OSSku = Ossku.AzureLinux, +OSSku = ContainerServiceOSSku.AzureLinux, AgentPoolType = AgentPoolType.VirtualMachineScaleSets, Mode = AgentPoolMode.System, EnableNodePublicIP = true, @@ -1207,7 +1207,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithOSSKU() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1305,7 +1305,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithPPG() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1400,7 +1400,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithPodIdentityEnabled() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1491,7 +1491,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithRunCommandDisabled() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, ApiServerAccessProfile = new ManagedClusterApiServerAccessProfile @@ -1668,7 +1668,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithUltraSSDEnabled() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1830,7 +1830,7 @@ public async Task CreateOrUpdate_CreateManagedClusterWithUserAssignedNATGatewayA }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -1921,7 +1921,7 @@ public async Task CreateOrUpdate_CreateManagedPrivateClusterWithPublicFQDNSpecif }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, ApiServerAccessProfile = new ManagedClusterApiServerAccessProfile @@ -2016,7 +2016,7 @@ public async Task CreateOrUpdate_CreateManagedPrivateClusterWithFqdnSubdomainSpe }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, ApiServerAccessProfile = new ManagedClusterApiServerAccessProfile @@ -2116,7 +2116,7 @@ public async Task CreateOrUpdate_CreateUpdateAADManagedClusterWithEnableAzureRBA }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -2225,7 +2225,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedCluster() Expander = AutoScaleExpander.Priority, MaxNodeProvisionTime = "15m", NewPodScaleUpDelay = "1m", - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", SkipNodesWithSystemPods = "false", }, @@ -2326,7 +2326,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedClusterWithAzureServiceMesh( }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -2448,7 +2448,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedClusterWithEnableAHUB() }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -2551,7 +2551,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedClusterWithWindowsGMSAEnable }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", }, DiskEncryptionSetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des"), @@ -2648,7 +2648,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedClusterWithDualStackNetworki Count = 2, }, }, - NetworkIPFamilies = { IPFamily.IPv4, IPFamily.IPv6 }, + NetworkIPFamilies = { ContainerServiceIPFamily.IPv4, ContainerServiceIPFamily.IPv6 }, }, AutoScalerProfile = new ManagedClusterAutoScalerProfile { @@ -2656,7 +2656,7 @@ public async Task CreateOrUpdate_CreateUpdateManagedClusterWithDualStackNetworki Expander = AutoScaleExpander.Priority, MaxNodeProvisionTime = "15m", NewPodScaleUpDelay = "1m", - ScanInterval = "20s", + ScanIntervalInSeconds = "20s", ScaleDownDelayAfterAdd = "15m", SkipNodesWithSystemPods = "false", }, From 620b91cc9db0ac2bb70c3cfdb7e3943d30445016 Mon Sep 17 00:00:00 2001 From: Minghao Chen <30464227+HarveyLink@users.noreply.github.com> Date: Fri, 23 Jan 2026 10:48:13 +0800 Subject: [PATCH 3/3] regen-3 --- ...esourceManager.ContainerService.net10.0.cs | 28 +++++----- ...ResourceManager.ContainerService.net8.0.cs | 28 +++++----- ...Manager.ContainerService.netstandard2.0.cs | 28 +++++----- ...entPoolUpgradeProfileData.Serialization.cs | 4 +- .../Generated/AgentPoolUpgradeProfileData.cs | 4 +- .../ArmContainerServiceModelFactory.cs | 55 +++++++++++++++++++ ...ClusterUpgradeProfileData.Serialization.cs | 15 +++-- .../ManagedClusterUpgradeProfileData.cs | 7 +-- ...oolUpgradeProfilePropertiesUpgradesItem.cs | 6 +- ...ClusterPoolUpgradeProfile.Serialization.cs | 4 +- .../ManagedClusterPoolUpgradeProfile.cs | 4 +- ...edClusterPoolUpgradeProfileUpgradesItem.cs | 6 +- .../src/autorest.md | 4 +- 13 files changed, 126 insertions(+), 67 deletions(-) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.net10.0.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.net10.0.cs index 8daa5d075d61..072b851d38fd 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.net10.0.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.net10.0.cs @@ -62,10 +62,10 @@ protected AgentPoolSnapshotResource() { } } public partial class AgentPoolUpgradeProfileData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal AgentPoolUpgradeProfileData() { } - public string KubernetesVersion { get { throw null; } } - public string LatestNodeImageVersion { get { throw null; } } - public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } } + public AgentPoolUpgradeProfileData(string kubernetesVersion, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType osType) { } + public string KubernetesVersion { get { throw null; } set { } } + public string LatestNodeImageVersion { get { throw null; } set { } } + public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Upgrades { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.AgentPoolUpgradeProfileData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -274,7 +274,7 @@ protected ContainerServiceMachineCollection() { } public partial class ContainerServiceMachineData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerServiceMachineData() { } - public Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties Properties { get { throw null; } } + public Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ContainerServiceMachineData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -673,9 +673,9 @@ protected ManagedClusterNamespaceResource() { } } public partial class ManagedClusterUpgradeProfileData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ManagedClusterUpgradeProfileData() { } + public ManagedClusterUpgradeProfileData(Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile controlPlaneProfile, System.Collections.Generic.IEnumerable agentPoolProfiles) { } public System.Collections.Generic.IReadOnlyList AgentPoolProfiles { get { throw null; } } - public Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile ControlPlaneProfile { get { throw null; } } + public Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile ControlPlaneProfile { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ManagedClusterUpgradeProfileData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1065,7 +1065,7 @@ public static partial class ArmContainerServiceModelFactory public static Azure.ResourceManager.ContainerService.ContainerServiceAgentPoolData ContainerServiceAgentPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, int? count, string vmSize, int? osDiskSizeInGB, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSDiskType? osDiskType, Azure.ResourceManager.ContainerService.Models.KubeletDiskType? kubeletDiskType, Azure.ResourceManager.ContainerService.Models.WorkloadRuntime? workloadRuntime, Azure.Core.ResourceIdentifier vnetSubnetId, Azure.Core.ResourceIdentifier podSubnetId, int? maxPods, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType? osType, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSSku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, Azure.ResourceManager.ContainerService.Models.ScaleDownMode? scaleDownMode, Azure.ResourceManager.ContainerService.Models.AgentPoolType? typePropertiesType, Azure.ResourceManager.ContainerService.Models.AgentPoolMode? mode, string orchestratorVersion, string currentOrchestratorVersion, string nodeImageVersion, Azure.ResourceManager.ContainerService.Models.AgentPoolUpgradeSettings upgradeSettings, string provisioningState, Azure.ResourceManager.ContainerService.Models.ContainerServiceStateCode? powerStateCode, System.Collections.Generic.IEnumerable availabilityZones, bool? enableNodePublicIP, Azure.Core.ResourceIdentifier nodePublicIPPrefixId, Azure.ResourceManager.ContainerService.Models.ScaleSetPriority? scaleSetPriority, Azure.ResourceManager.ContainerService.Models.ScaleSetEvictionPolicy? scaleSetEvictionPolicy, float? spotMaxPrice, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IDictionary nodeLabels, System.Collections.Generic.IEnumerable nodeTaints, Azure.Core.ResourceIdentifier proximityPlacementGroupId, Azure.ResourceManager.ContainerService.Models.KubeletConfig kubeletConfig, Azure.ResourceManager.ContainerService.Models.LinuxOSConfig linuxOSConfig, bool? enableEncryptionAtHost, bool? enableUltraSsd, bool? enableFips, Azure.ResourceManager.ContainerService.Models.GpuInstanceProfile? gpuInstanceProfile, Azure.Core.ResourceIdentifier creationDataSourceResourceId, Azure.Core.ResourceIdentifier capacityReservationGroupId, Azure.Core.ResourceIdentifier hostGroupId, Azure.ResourceManager.ContainerService.Models.AgentPoolNetworkProfile networkProfile) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceEndpointDependency ContainerServiceEndpointDependency(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceEndpointDetail ContainerServiceEndpointDetail(System.Net.IPAddress ipAddress = null, int? port = default(int?), string protocol = null, string description = null) { throw null; } - public static Azure.ResourceManager.ContainerService.ContainerServiceMachineData ContainerServiceMachineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties properties = null) { throw null; } + public static Azure.ResourceManager.ContainerService.ContainerServiceMachineData ContainerServiceMachineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties properties = null, System.Collections.Generic.IEnumerable zones = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineIPAddress ContainerServiceMachineIPAddress(Azure.ResourceManager.ContainerService.Models.ContainerServiceIPFamily? family = default(Azure.ResourceManager.ContainerService.Models.ContainerServiceIPFamily?), string ip = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties ContainerServiceMachineProperties(System.Collections.Generic.IEnumerable networkIPAddresses = null, Azure.Core.ResourceIdentifier resourceId = null) { throw null; } public static Azure.ResourceManager.ContainerService.ContainerServiceMaintenanceConfigurationData ContainerServiceMaintenanceConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable timesInWeek = null, System.Collections.Generic.IEnumerable notAllowedTimes = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceWindow maintenanceWindow = null) { throw null; } @@ -1093,7 +1093,7 @@ public static partial class ArmContainerServiceModelFactory public static Azure.ResourceManager.ContainerService.Models.ManagedClusterCredential ManagedClusterCredential(string name = null, byte[] value = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterCredentials ManagedClusterCredentials(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterIngressProfileWebAppRouting ManagedClusterIngressProfileWebAppRouting(bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable dnsZoneResourceIds = null, Azure.ResourceManager.ContainerService.Models.NginxIngressControllerType? nginxDefaultIngressControllerType = default(Azure.ResourceManager.ContainerService.Models.NginxIngressControllerType?), Azure.ResourceManager.ContainerService.Models.ContainerServiceUserAssignedIdentity identity = null) { throw null; } - public static Azure.ResourceManager.ContainerService.ManagedClusterNamespaceData ManagedClusterNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProperties properties = null) { throw null; } + public static Azure.ResourceManager.ContainerService.ManagedClusterNamespaceData ManagedClusterNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProperties ManagedClusterNamespaceProperties(Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProvisioningState?), System.Collections.Generic.IDictionary labels = null, System.Collections.Generic.IDictionary annotations = null, string portalFqdn = null, Azure.ResourceManager.ContainerService.Models.NamespaceResourceQuota defaultResourceQuota = null, Azure.ResourceManager.ContainerService.Models.NamespaceNetworkPolicies defaultNetworkPolicy = null, Azure.ResourceManager.ContainerService.Models.NamespaceAdoptionPolicy? adoptionPolicy = default(Azure.ResourceManager.ContainerService.Models.NamespaceAdoptionPolicy?), Azure.ResourceManager.ContainerService.Models.NamespaceDeletePolicy? deletePolicy = default(Azure.ResourceManager.ContainerService.Models.NamespaceDeletePolicy?)) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterOidcIssuerProfile ManagedClusterOidcIssuerProfile(string issuerUriInfo = null, bool? isEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentity ManagedClusterPodIdentity(string name = null, string @namespace = null, string bindingSelector = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceUserAssignedIdentity identity = null, Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentityProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentityProvisioningState?), Azure.ResponseError errorDetail = null) { throw null; } @@ -1261,7 +1261,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ContainerServiceMachineProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ContainerServiceMachineProperties() { } + public ContainerServiceMachineProperties() { } public System.Collections.Generic.IReadOnlyList NetworkIPAddresses { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2754,10 +2754,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ManagedClusterPoolUpgradeProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ManagedClusterPoolUpgradeProfile() { } - public string KubernetesVersion { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } } + public ManagedClusterPoolUpgradeProfile(string kubernetesVersion, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType osType) { } + public string KubernetesVersion { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Upgrades { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.net8.0.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.net8.0.cs index 8daa5d075d61..072b851d38fd 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.net8.0.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.net8.0.cs @@ -62,10 +62,10 @@ protected AgentPoolSnapshotResource() { } } public partial class AgentPoolUpgradeProfileData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal AgentPoolUpgradeProfileData() { } - public string KubernetesVersion { get { throw null; } } - public string LatestNodeImageVersion { get { throw null; } } - public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } } + public AgentPoolUpgradeProfileData(string kubernetesVersion, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType osType) { } + public string KubernetesVersion { get { throw null; } set { } } + public string LatestNodeImageVersion { get { throw null; } set { } } + public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Upgrades { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.AgentPoolUpgradeProfileData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -274,7 +274,7 @@ protected ContainerServiceMachineCollection() { } public partial class ContainerServiceMachineData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerServiceMachineData() { } - public Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties Properties { get { throw null; } } + public Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ContainerServiceMachineData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -673,9 +673,9 @@ protected ManagedClusterNamespaceResource() { } } public partial class ManagedClusterUpgradeProfileData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ManagedClusterUpgradeProfileData() { } + public ManagedClusterUpgradeProfileData(Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile controlPlaneProfile, System.Collections.Generic.IEnumerable agentPoolProfiles) { } public System.Collections.Generic.IReadOnlyList AgentPoolProfiles { get { throw null; } } - public Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile ControlPlaneProfile { get { throw null; } } + public Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile ControlPlaneProfile { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ManagedClusterUpgradeProfileData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1065,7 +1065,7 @@ public static partial class ArmContainerServiceModelFactory public static Azure.ResourceManager.ContainerService.ContainerServiceAgentPoolData ContainerServiceAgentPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, int? count, string vmSize, int? osDiskSizeInGB, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSDiskType? osDiskType, Azure.ResourceManager.ContainerService.Models.KubeletDiskType? kubeletDiskType, Azure.ResourceManager.ContainerService.Models.WorkloadRuntime? workloadRuntime, Azure.Core.ResourceIdentifier vnetSubnetId, Azure.Core.ResourceIdentifier podSubnetId, int? maxPods, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType? osType, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSSku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, Azure.ResourceManager.ContainerService.Models.ScaleDownMode? scaleDownMode, Azure.ResourceManager.ContainerService.Models.AgentPoolType? typePropertiesType, Azure.ResourceManager.ContainerService.Models.AgentPoolMode? mode, string orchestratorVersion, string currentOrchestratorVersion, string nodeImageVersion, Azure.ResourceManager.ContainerService.Models.AgentPoolUpgradeSettings upgradeSettings, string provisioningState, Azure.ResourceManager.ContainerService.Models.ContainerServiceStateCode? powerStateCode, System.Collections.Generic.IEnumerable availabilityZones, bool? enableNodePublicIP, Azure.Core.ResourceIdentifier nodePublicIPPrefixId, Azure.ResourceManager.ContainerService.Models.ScaleSetPriority? scaleSetPriority, Azure.ResourceManager.ContainerService.Models.ScaleSetEvictionPolicy? scaleSetEvictionPolicy, float? spotMaxPrice, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IDictionary nodeLabels, System.Collections.Generic.IEnumerable nodeTaints, Azure.Core.ResourceIdentifier proximityPlacementGroupId, Azure.ResourceManager.ContainerService.Models.KubeletConfig kubeletConfig, Azure.ResourceManager.ContainerService.Models.LinuxOSConfig linuxOSConfig, bool? enableEncryptionAtHost, bool? enableUltraSsd, bool? enableFips, Azure.ResourceManager.ContainerService.Models.GpuInstanceProfile? gpuInstanceProfile, Azure.Core.ResourceIdentifier creationDataSourceResourceId, Azure.Core.ResourceIdentifier capacityReservationGroupId, Azure.Core.ResourceIdentifier hostGroupId, Azure.ResourceManager.ContainerService.Models.AgentPoolNetworkProfile networkProfile) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceEndpointDependency ContainerServiceEndpointDependency(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceEndpointDetail ContainerServiceEndpointDetail(System.Net.IPAddress ipAddress = null, int? port = default(int?), string protocol = null, string description = null) { throw null; } - public static Azure.ResourceManager.ContainerService.ContainerServiceMachineData ContainerServiceMachineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties properties = null) { throw null; } + public static Azure.ResourceManager.ContainerService.ContainerServiceMachineData ContainerServiceMachineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties properties = null, System.Collections.Generic.IEnumerable zones = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineIPAddress ContainerServiceMachineIPAddress(Azure.ResourceManager.ContainerService.Models.ContainerServiceIPFamily? family = default(Azure.ResourceManager.ContainerService.Models.ContainerServiceIPFamily?), string ip = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties ContainerServiceMachineProperties(System.Collections.Generic.IEnumerable networkIPAddresses = null, Azure.Core.ResourceIdentifier resourceId = null) { throw null; } public static Azure.ResourceManager.ContainerService.ContainerServiceMaintenanceConfigurationData ContainerServiceMaintenanceConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable timesInWeek = null, System.Collections.Generic.IEnumerable notAllowedTimes = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceWindow maintenanceWindow = null) { throw null; } @@ -1093,7 +1093,7 @@ public static partial class ArmContainerServiceModelFactory public static Azure.ResourceManager.ContainerService.Models.ManagedClusterCredential ManagedClusterCredential(string name = null, byte[] value = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterCredentials ManagedClusterCredentials(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterIngressProfileWebAppRouting ManagedClusterIngressProfileWebAppRouting(bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable dnsZoneResourceIds = null, Azure.ResourceManager.ContainerService.Models.NginxIngressControllerType? nginxDefaultIngressControllerType = default(Azure.ResourceManager.ContainerService.Models.NginxIngressControllerType?), Azure.ResourceManager.ContainerService.Models.ContainerServiceUserAssignedIdentity identity = null) { throw null; } - public static Azure.ResourceManager.ContainerService.ManagedClusterNamespaceData ManagedClusterNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProperties properties = null) { throw null; } + public static Azure.ResourceManager.ContainerService.ManagedClusterNamespaceData ManagedClusterNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProperties ManagedClusterNamespaceProperties(Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProvisioningState?), System.Collections.Generic.IDictionary labels = null, System.Collections.Generic.IDictionary annotations = null, string portalFqdn = null, Azure.ResourceManager.ContainerService.Models.NamespaceResourceQuota defaultResourceQuota = null, Azure.ResourceManager.ContainerService.Models.NamespaceNetworkPolicies defaultNetworkPolicy = null, Azure.ResourceManager.ContainerService.Models.NamespaceAdoptionPolicy? adoptionPolicy = default(Azure.ResourceManager.ContainerService.Models.NamespaceAdoptionPolicy?), Azure.ResourceManager.ContainerService.Models.NamespaceDeletePolicy? deletePolicy = default(Azure.ResourceManager.ContainerService.Models.NamespaceDeletePolicy?)) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterOidcIssuerProfile ManagedClusterOidcIssuerProfile(string issuerUriInfo = null, bool? isEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentity ManagedClusterPodIdentity(string name = null, string @namespace = null, string bindingSelector = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceUserAssignedIdentity identity = null, Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentityProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentityProvisioningState?), Azure.ResponseError errorDetail = null) { throw null; } @@ -1261,7 +1261,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ContainerServiceMachineProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ContainerServiceMachineProperties() { } + public ContainerServiceMachineProperties() { } public System.Collections.Generic.IReadOnlyList NetworkIPAddresses { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2754,10 +2754,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ManagedClusterPoolUpgradeProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ManagedClusterPoolUpgradeProfile() { } - public string KubernetesVersion { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } } + public ManagedClusterPoolUpgradeProfile(string kubernetesVersion, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType osType) { } + public string KubernetesVersion { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Upgrades { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.netstandard2.0.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.netstandard2.0.cs index 8daa5d075d61..072b851d38fd 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.netstandard2.0.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/api/Azure.ResourceManager.ContainerService.netstandard2.0.cs @@ -62,10 +62,10 @@ protected AgentPoolSnapshotResource() { } } public partial class AgentPoolUpgradeProfileData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal AgentPoolUpgradeProfileData() { } - public string KubernetesVersion { get { throw null; } } - public string LatestNodeImageVersion { get { throw null; } } - public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } } + public AgentPoolUpgradeProfileData(string kubernetesVersion, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType osType) { } + public string KubernetesVersion { get { throw null; } set { } } + public string LatestNodeImageVersion { get { throw null; } set { } } + public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Upgrades { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.AgentPoolUpgradeProfileData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -274,7 +274,7 @@ protected ContainerServiceMachineCollection() { } public partial class ContainerServiceMachineData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ContainerServiceMachineData() { } - public Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties Properties { get { throw null; } } + public Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties Properties { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Zones { get { throw null; } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ContainerServiceMachineData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -673,9 +673,9 @@ protected ManagedClusterNamespaceResource() { } } public partial class ManagedClusterUpgradeProfileData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ManagedClusterUpgradeProfileData() { } + public ManagedClusterUpgradeProfileData(Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile controlPlaneProfile, System.Collections.Generic.IEnumerable agentPoolProfiles) { } public System.Collections.Generic.IReadOnlyList AgentPoolProfiles { get { throw null; } } - public Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile ControlPlaneProfile { get { throw null; } } + public Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile ControlPlaneProfile { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.ManagedClusterUpgradeProfileData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1065,7 +1065,7 @@ public static partial class ArmContainerServiceModelFactory public static Azure.ResourceManager.ContainerService.ContainerServiceAgentPoolData ContainerServiceAgentPoolData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, int? count, string vmSize, int? osDiskSizeInGB, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSDiskType? osDiskType, Azure.ResourceManager.ContainerService.Models.KubeletDiskType? kubeletDiskType, Azure.ResourceManager.ContainerService.Models.WorkloadRuntime? workloadRuntime, Azure.Core.ResourceIdentifier vnetSubnetId, Azure.Core.ResourceIdentifier podSubnetId, int? maxPods, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType? osType, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSSku? osSku, int? maxCount, int? minCount, bool? enableAutoScaling, Azure.ResourceManager.ContainerService.Models.ScaleDownMode? scaleDownMode, Azure.ResourceManager.ContainerService.Models.AgentPoolType? typePropertiesType, Azure.ResourceManager.ContainerService.Models.AgentPoolMode? mode, string orchestratorVersion, string currentOrchestratorVersion, string nodeImageVersion, Azure.ResourceManager.ContainerService.Models.AgentPoolUpgradeSettings upgradeSettings, string provisioningState, Azure.ResourceManager.ContainerService.Models.ContainerServiceStateCode? powerStateCode, System.Collections.Generic.IEnumerable availabilityZones, bool? enableNodePublicIP, Azure.Core.ResourceIdentifier nodePublicIPPrefixId, Azure.ResourceManager.ContainerService.Models.ScaleSetPriority? scaleSetPriority, Azure.ResourceManager.ContainerService.Models.ScaleSetEvictionPolicy? scaleSetEvictionPolicy, float? spotMaxPrice, System.Collections.Generic.IDictionary tags, System.Collections.Generic.IDictionary nodeLabels, System.Collections.Generic.IEnumerable nodeTaints, Azure.Core.ResourceIdentifier proximityPlacementGroupId, Azure.ResourceManager.ContainerService.Models.KubeletConfig kubeletConfig, Azure.ResourceManager.ContainerService.Models.LinuxOSConfig linuxOSConfig, bool? enableEncryptionAtHost, bool? enableUltraSsd, bool? enableFips, Azure.ResourceManager.ContainerService.Models.GpuInstanceProfile? gpuInstanceProfile, Azure.Core.ResourceIdentifier creationDataSourceResourceId, Azure.Core.ResourceIdentifier capacityReservationGroupId, Azure.Core.ResourceIdentifier hostGroupId, Azure.ResourceManager.ContainerService.Models.AgentPoolNetworkProfile networkProfile) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceEndpointDependency ContainerServiceEndpointDependency(string domainName = null, System.Collections.Generic.IEnumerable endpointDetails = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceEndpointDetail ContainerServiceEndpointDetail(System.Net.IPAddress ipAddress = null, int? port = default(int?), string protocol = null, string description = null) { throw null; } - public static Azure.ResourceManager.ContainerService.ContainerServiceMachineData ContainerServiceMachineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable zones = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties properties = null) { throw null; } + public static Azure.ResourceManager.ContainerService.ContainerServiceMachineData ContainerServiceMachineData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties properties = null, System.Collections.Generic.IEnumerable zones = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineIPAddress ContainerServiceMachineIPAddress(Azure.ResourceManager.ContainerService.Models.ContainerServiceIPFamily? family = default(Azure.ResourceManager.ContainerService.Models.ContainerServiceIPFamily?), string ip = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ContainerServiceMachineProperties ContainerServiceMachineProperties(System.Collections.Generic.IEnumerable networkIPAddresses = null, Azure.Core.ResourceIdentifier resourceId = null) { throw null; } public static Azure.ResourceManager.ContainerService.ContainerServiceMaintenanceConfigurationData ContainerServiceMaintenanceConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable timesInWeek = null, System.Collections.Generic.IEnumerable notAllowedTimes = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceMaintenanceWindow maintenanceWindow = null) { throw null; } @@ -1093,7 +1093,7 @@ public static partial class ArmContainerServiceModelFactory public static Azure.ResourceManager.ContainerService.Models.ManagedClusterCredential ManagedClusterCredential(string name = null, byte[] value = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterCredentials ManagedClusterCredentials(System.Collections.Generic.IEnumerable kubeconfigs = null) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterIngressProfileWebAppRouting ManagedClusterIngressProfileWebAppRouting(bool? isEnabled = default(bool?), System.Collections.Generic.IEnumerable dnsZoneResourceIds = null, Azure.ResourceManager.ContainerService.Models.NginxIngressControllerType? nginxDefaultIngressControllerType = default(Azure.ResourceManager.ContainerService.Models.NginxIngressControllerType?), Azure.ResourceManager.ContainerService.Models.ContainerServiceUserAssignedIdentity identity = null) { throw null; } - public static Azure.ResourceManager.ContainerService.ManagedClusterNamespaceData ManagedClusterNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ETag? etag = default(Azure.ETag?), Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProperties properties = null) { throw null; } + public static Azure.ResourceManager.ContainerService.ManagedClusterNamespaceData ManagedClusterNamespaceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProperties properties = null, Azure.ETag? etag = default(Azure.ETag?)) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProperties ManagedClusterNamespaceProperties(Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerService.Models.ManagedClusterNamespaceProvisioningState?), System.Collections.Generic.IDictionary labels = null, System.Collections.Generic.IDictionary annotations = null, string portalFqdn = null, Azure.ResourceManager.ContainerService.Models.NamespaceResourceQuota defaultResourceQuota = null, Azure.ResourceManager.ContainerService.Models.NamespaceNetworkPolicies defaultNetworkPolicy = null, Azure.ResourceManager.ContainerService.Models.NamespaceAdoptionPolicy? adoptionPolicy = default(Azure.ResourceManager.ContainerService.Models.NamespaceAdoptionPolicy?), Azure.ResourceManager.ContainerService.Models.NamespaceDeletePolicy? deletePolicy = default(Azure.ResourceManager.ContainerService.Models.NamespaceDeletePolicy?)) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterOidcIssuerProfile ManagedClusterOidcIssuerProfile(string issuerUriInfo = null, bool? isEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentity ManagedClusterPodIdentity(string name = null, string @namespace = null, string bindingSelector = null, Azure.ResourceManager.ContainerService.Models.ContainerServiceUserAssignedIdentity identity = null, Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentityProvisioningState? provisioningState = default(Azure.ResourceManager.ContainerService.Models.ManagedClusterPodIdentityProvisioningState?), Azure.ResponseError errorDetail = null) { throw null; } @@ -1261,7 +1261,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ContainerServiceMachineProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ContainerServiceMachineProperties() { } + public ContainerServiceMachineProperties() { } public System.Collections.Generic.IReadOnlyList NetworkIPAddresses { get { throw null; } } public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2754,10 +2754,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public partial class ManagedClusterPoolUpgradeProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - internal ManagedClusterPoolUpgradeProfile() { } - public string KubernetesVersion { get { throw null; } } - public string Name { get { throw null; } } - public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } } + public ManagedClusterPoolUpgradeProfile(string kubernetesVersion, Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType osType) { } + public string KubernetesVersion { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.ContainerService.Models.ContainerServiceOSType OSType { get { throw null; } set { } } public System.Collections.Generic.IReadOnlyList Upgrades { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.ContainerService.Models.ManagedClusterPoolUpgradeProfile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } 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 84b1933731b6..af2e2a9363dc 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.Serialization.cs @@ -45,7 +45,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStringValue(KubernetesVersion); writer.WritePropertyName("osType"u8); writer.WriteStringValue(OSType.ToString()); - if (Optional.IsCollectionDefined(Upgrades)) + if (options.Format != "W" && Optional.IsCollectionDefined(Upgrades)) { writer.WritePropertyName("upgrades"u8); writer.WriteStartArray(); @@ -89,7 +89,7 @@ internal static AgentPoolUpgradeProfileData DeserializeAgentPoolUpgradeProfileDa SystemData systemData = default; string kubernetesVersion = default; ContainerServiceOSType osType = default; - IList upgrades = default; + IReadOnlyList upgrades = default; string latestNodeImageVersion = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs index 1335fde010c4..63f57b296be6 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs @@ -93,7 +93,7 @@ public AgentPoolUpgradeProfileData(string kubernetesVersion, ContainerServiceOST /// Serialized Name: AgentPoolUpgradeProfile.properties.latestNodeImageVersion /// /// Keeps track of any properties unknown to the library. - internal AgentPoolUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kubernetesVersion, ContainerServiceOSType osType, IList 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, string latestNodeImageVersion, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { KubernetesVersion = kubernetesVersion; OSType = osType; @@ -124,7 +124,7 @@ internal AgentPoolUpgradeProfileData() /// Serialized Name: AgentPoolUpgradeProfile.properties.upgrades /// [WirePath("properties.upgrades")] - public IList Upgrades { get; } + public IReadOnlyList Upgrades { get; } /// /// The latest AKS supported node image version. /// Serialized Name: AgentPoolUpgradeProfile.properties.latestNodeImageVersion diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs index f542c120239c..92bf1275f766 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ArmContainerServiceModelFactory.cs @@ -1657,6 +1657,21 @@ public static AgentPoolUpgradeProfileData AgentPoolUpgradeProfileData(ResourceId serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// + /// The Kubernetes version (major.minor.patch). + /// Serialized Name: AgentPoolUpgradeProfilePropertiesUpgradesItem.kubernetesVersion + /// + /// + /// Whether the Kubernetes version is currently in preview. + /// Serialized Name: AgentPoolUpgradeProfilePropertiesUpgradesItem.isPreview + /// + /// A new instance for mocking. + public static AgentPoolUpgradeProfilePropertiesUpgradesItem AgentPoolUpgradeProfilePropertiesUpgradesItem(string kubernetesVersion = null, bool? isPreview = null) + { + return new AgentPoolUpgradeProfilePropertiesUpgradesItem(kubernetesVersion, isPreview, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -2076,6 +2091,46 @@ public static ManagedClusterUpgradeProfileData ManagedClusterUpgradeProfileData( serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// + /// The Kubernetes version (major.minor.patch). + /// Serialized Name: ManagedClusterPoolUpgradeProfile.kubernetesVersion + /// + /// + /// The Agent Pool name. + /// Serialized Name: ManagedClusterPoolUpgradeProfile.name + /// + /// + /// The operating system type. The default is Linux. + /// Serialized Name: ManagedClusterPoolUpgradeProfile.osType + /// + /// + /// List of orchestrator types and versions available for upgrade. + /// Serialized Name: ManagedClusterPoolUpgradeProfile.upgrades + /// + /// A new instance for mocking. + public static ManagedClusterPoolUpgradeProfile ManagedClusterPoolUpgradeProfile(string kubernetesVersion = null, string name = null, ContainerServiceOSType osType = default, IEnumerable upgrades = null) + { + upgrades ??= new List(); + + return new ManagedClusterPoolUpgradeProfile(kubernetesVersion, name, osType, upgrades?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// The Kubernetes version (major.minor.patch). + /// Serialized Name: ManagedClusterPoolUpgradeProfileUpgradesItem.kubernetesVersion + /// + /// + /// Whether the Kubernetes version is currently in preview. + /// Serialized Name: ManagedClusterPoolUpgradeProfileUpgradesItem.isPreview + /// + /// A new instance for mocking. + public static ManagedClusterPoolUpgradeProfileUpgradesItem ManagedClusterPoolUpgradeProfileUpgradesItem(string kubernetesVersion = null, bool? isPreview = null) + { + return new ManagedClusterPoolUpgradeProfileUpgradesItem(kubernetesVersion, isPreview, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// major.minor version of Kubernetes release. /// Capabilities on this Kubernetes version. diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs index e8f4080acf32..88f357b3bc0d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.Serialization.cs @@ -43,13 +43,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WriteStartObject(); writer.WritePropertyName("controlPlaneProfile"u8); writer.WriteObjectValue(ControlPlaneProfile, options); - writer.WritePropertyName("agentPoolProfiles"u8); - writer.WriteStartArray(); - foreach (var item in AgentPoolProfiles) + if (options.Format != "W") { - writer.WriteObjectValue(item, options); + writer.WritePropertyName("agentPoolProfiles"u8); + writer.WriteStartArray(); + foreach (var item in AgentPoolProfiles) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); } - writer.WriteEndArray(); writer.WriteEndObject(); } @@ -78,7 +81,7 @@ internal static ManagedClusterUpgradeProfileData DeserializeManagedClusterUpgrad ResourceType type = default; SystemData systemData = default; ManagedClusterPoolUpgradeProfile controlPlaneProfile = default; - IList agentPoolProfiles = default; + IReadOnlyList agentPoolProfiles = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.cs index f173251f5b2e..0ddf97b79711 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.cs @@ -62,11 +62,10 @@ public partial class ManagedClusterUpgradeProfileData : ResourceData /// The list of available upgrade versions for agent pools. /// Serialized Name: ManagedClusterUpgradeProfile.properties.agentPoolProfiles /// - /// or is null. + /// is null. public ManagedClusterUpgradeProfileData(ManagedClusterPoolUpgradeProfile controlPlaneProfile, IEnumerable agentPoolProfiles) { Argument.AssertNotNull(controlPlaneProfile, nameof(controlPlaneProfile)); - Argument.AssertNotNull(agentPoolProfiles, nameof(agentPoolProfiles)); ControlPlaneProfile = controlPlaneProfile; AgentPoolProfiles = agentPoolProfiles.ToList(); @@ -86,7 +85,7 @@ public ManagedClusterUpgradeProfileData(ManagedClusterPoolUpgradeProfile control /// Serialized Name: ManagedClusterUpgradeProfile.properties.agentPoolProfiles /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedClusterPoolUpgradeProfile controlPlaneProfile, IList agentPoolProfiles, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ManagedClusterUpgradeProfileData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ManagedClusterPoolUpgradeProfile controlPlaneProfile, IReadOnlyList agentPoolProfiles, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { ControlPlaneProfile = controlPlaneProfile; AgentPoolProfiles = agentPoolProfiles; @@ -109,6 +108,6 @@ internal ManagedClusterUpgradeProfileData() /// Serialized Name: ManagedClusterUpgradeProfile.properties.agentPoolProfiles /// [WirePath("properties.agentPoolProfiles")] - public IList AgentPoolProfiles { get; } + public IReadOnlyList AgentPoolProfiles { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs index 6945b5c7bd53..8eb822491987 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs @@ -49,7 +49,7 @@ public partial class AgentPoolUpgradeProfilePropertiesUpgradesItem private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public AgentPoolUpgradeProfilePropertiesUpgradesItem() + internal AgentPoolUpgradeProfilePropertiesUpgradesItem() { } @@ -75,12 +75,12 @@ internal AgentPoolUpgradeProfilePropertiesUpgradesItem(string kubernetesVersion, /// Serialized Name: AgentPoolUpgradeProfilePropertiesUpgradesItem.kubernetesVersion /// [WirePath("kubernetesVersion")] - public string KubernetesVersion { get; set; } + public string KubernetesVersion { get; } /// /// Whether the Kubernetes version is currently in preview. /// Serialized Name: AgentPoolUpgradeProfilePropertiesUpgradesItem.isPreview /// [WirePath("isPreview")] - public bool? IsPreview { get; set; } + public bool? IsPreview { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs index 2c9bb17228f5..c4acbc937ebe 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.Serialization.cs @@ -45,7 +45,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("osType"u8); writer.WriteStringValue(OSType.ToString()); - if (Optional.IsCollectionDefined(Upgrades)) + if (options.Format != "W" && Optional.IsCollectionDefined(Upgrades)) { writer.WritePropertyName("upgrades"u8); writer.WriteStartArray(); @@ -95,7 +95,7 @@ internal static ManagedClusterPoolUpgradeProfile DeserializeManagedClusterPoolUp string kubernetesVersion = default; string name = default; ContainerServiceOSType osType = default; - IList upgrades = default; + IReadOnlyList upgrades = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs index fad311c4f6ac..be3e1463d5a1 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfile.cs @@ -85,7 +85,7 @@ public ManagedClusterPoolUpgradeProfile(string kubernetesVersion, ContainerServi /// Serialized Name: ManagedClusterPoolUpgradeProfile.upgrades /// /// Keeps track of any properties unknown to the library. - internal ManagedClusterPoolUpgradeProfile(string kubernetesVersion, string name, ContainerServiceOSType osType, IList upgrades, IDictionary serializedAdditionalRawData) + internal ManagedClusterPoolUpgradeProfile(string kubernetesVersion, string name, ContainerServiceOSType osType, IReadOnlyList upgrades, IDictionary serializedAdditionalRawData) { KubernetesVersion = kubernetesVersion; Name = name; @@ -122,6 +122,6 @@ internal ManagedClusterPoolUpgradeProfile() /// Serialized Name: ManagedClusterPoolUpgradeProfile.upgrades /// [WirePath("upgrades")] - public IList Upgrades { get; } + public IReadOnlyList Upgrades { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs index 9c3ca36be71a..092b812f3e7f 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterPoolUpgradeProfileUpgradesItem.cs @@ -49,7 +49,7 @@ public partial class ManagedClusterPoolUpgradeProfileUpgradesItem private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public ManagedClusterPoolUpgradeProfileUpgradesItem() + internal ManagedClusterPoolUpgradeProfileUpgradesItem() { } @@ -75,12 +75,12 @@ internal ManagedClusterPoolUpgradeProfileUpgradesItem(string kubernetesVersion, /// Serialized Name: ManagedClusterPoolUpgradeProfileUpgradesItem.kubernetesVersion /// [WirePath("kubernetesVersion")] - public string KubernetesVersion { get; set; } + public string KubernetesVersion { get; } /// /// Whether the Kubernetes version is currently in preview. /// Serialized Name: ManagedClusterPoolUpgradeProfileUpgradesItem.isPreview /// [WirePath("isPreview")] - public bool? IsPreview { get; set; } + public bool? IsPreview { get; } } } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md index a54e015d9b35..8eacba490d8f 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/autorest.md @@ -236,5 +236,7 @@ directive: - from: managedClusters.json where: $.definitions transform: > - $.ManagedClusterPoolUpgradeProfile.properties.upgrades['readonly'] = true; + $.ManagedClusterPoolUpgradeProfile.properties.upgrades['readOnly'] = true; + $.ManagedClusterUpgradeProfileProperties.properties.agentPoolProfiles['readOnly'] = true; + $.AgentPoolUpgradeProfileProperties.properties.upgrades['readOnly'] = true; ```