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 330edbc772f4..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(); diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/AgentPoolUpgradeProfileData.cs index e006ffa28938..63f57b296be6 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)); @@ -112,13 +112,13 @@ 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 @@ -130,6 +130,6 @@ internal AgentPoolUpgradeProfileData() /// 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..92bf1275f766 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 /// /// @@ -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 /// /// @@ -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, ContainerServiceOSSku? 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,163 +1266,18 @@ 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 - /// - /// 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 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 + /// + /// 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 @@ -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 /// /// @@ -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(ContainerServiceIPFamily? family = null, string ip = null) + { + return new ContainerServiceMachineIPAddress(family, ip, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -1706,15 +1698,15 @@ public static AgentPoolAvailableVersions AgentPoolAvailableVersions(ResourceIden /// 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 /// /// A new instance for mocking. public static AgentPoolAvailableVersion AgentPoolAvailableVersion(bool? isDefault = null, string kubernetesVersion = null, bool? isPreview = null) @@ -1722,56 +1714,6 @@ public static AgentPoolAvailableVersion AgentPoolAvailableVersion(bool? isDefaul 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 - /// - /// 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 command id. @@ -1815,145 +1757,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 - /// - /// - /// 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 + /// + /// 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 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 timesInWeek = null, IEnumerable notAllowedTimes = null, ContainerServiceMaintenanceWindow maintenanceWindow = null) { - tags ??= new Dictionary(); + timesInWeek ??= new List(); + notAllowedTimes ??= 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, + 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. - /// - /// 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 +1923,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,124 +2063,72 @@ 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 + /// Initializes a new instance of . + /// + /// The Kubernetes version (major.minor.patch). + /// Serialized Name: ManagedClusterPoolUpgradeProfile.kubernetesVersion /// - /// - /// Azure resource id of the machine. It can be used to GET underlying VM Instance - /// Serialized Name: MachineProperties.resourceId + /// + /// The Agent Pool name. + /// Serialized Name: ManagedClusterPoolUpgradeProfile.name /// - /// A new instance for mocking. - public static ContainerServiceMachineProperties ContainerServiceMachineProperties(IEnumerable networkIPAddresses = null, ResourceIdentifier resourceId = null) + /// + /// 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) { - networkIPAddresses ??= new List(); + upgrades ??= new List(); - return new ContainerServiceMachineProperties(networkIPAddresses != null ? new MachineNetworkProperties(networkIPAddresses?.ToList(), serializedAdditionalRawData: null) : null, resourceId, serializedAdditionalRawData: null); + return new ManagedClusterPoolUpgradeProfile(kubernetesVersion, name, osType, upgrades?.ToList(), serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// - /// To determine if address belongs IPv4 or IPv6 family - /// Serialized Name: MachineIpAddress.family + /// Initializes a new instance of . + /// + /// The Kubernetes version (major.minor.patch). + /// Serialized Name: ManagedClusterPoolUpgradeProfileUpgradesItem.kubernetesVersion /// - /// - /// IPv4 or IPv6 address of the machine - /// Serialized Name: MachineIpAddress.ip + /// + /// Whether the Kubernetes version is currently in preview. + /// Serialized Name: ManagedClusterPoolUpgradeProfileUpgradesItem.isPreview /// - /// A new instance for mocking. - public static ContainerServiceMachineIPAddress ContainerServiceMachineIPAddress(ContainerServiceIPFamily? family = null, string ip = null) + /// A new instance for mocking. + public static ManagedClusterPoolUpgradeProfileUpgradesItem ManagedClusterPoolUpgradeProfileUpgradesItem(string kubernetesVersion = null, bool? isPreview = null) { - return new ContainerServiceMachineIPAddress(family, ip, serializedAdditionalRawData: null); + return new ManagedClusterPoolUpgradeProfileUpgradesItem(kubernetesVersion, isPreview, serializedAdditionalRawData: null); } /// Initializes a new instance of . diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ContainerServiceAgentPoolData.cs index 9194fea74558..59d36e9210e0 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 /// /// @@ -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/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..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(); } diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/ManagedClusterUpgradeProfileData.cs index d308bcddf016..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. - internal ManagedClusterUpgradeProfileData(ManagedClusterPoolUpgradeProfile controlPlaneProfile, IEnumerable agentPoolProfiles) + /// is null. + public ManagedClusterUpgradeProfileData(ManagedClusterPoolUpgradeProfile controlPlaneProfile, IEnumerable agentPoolProfiles) { Argument.AssertNotNull(controlPlaneProfile, nameof(controlPlaneProfile)); - Argument.AssertNotNull(agentPoolProfiles, nameof(agentPoolProfiles)); ControlPlaneProfile = controlPlaneProfile; AgentPoolProfiles = agentPoolProfiles.ToList(); @@ -103,7 +102,7 @@ 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 diff --git a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.cs index faf6373131ea..19cc4749774c 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/AgentPoolAvailableVersion.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.ContainerService.Models { /// /// The AgentPoolAvailableVersion. - /// Serialized Name: AgentPoolAvailableVersion + /// Serialized Name: AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem /// public partial class AgentPoolAvailableVersion { @@ -56,15 +56,15 @@ internal AgentPoolAvailableVersion() /// 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) @@ -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; } /// /// 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/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 index 70124695282a..4564a1ba2352 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPFamily.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceIPFamily.cs @@ -11,8 +11,8 @@ namespace Azure.ResourceManager.ContainerService.Models { /// - /// The IP version to use for cluster networking and IP assignment. - /// Serialized Name: IpFamily + /// To determine if address belongs IPv4 or IPv6 family + /// Serialized Name: IPFamily /// public readonly partial struct ContainerServiceIPFamily : IEquatable { @@ -29,13 +29,13 @@ public ContainerServiceIPFamily(string value) private const string IPv6Value = "IPv6"; /// - /// IPv4 - /// Serialized Name: IpFamily.IPv4 + /// IPv4 family + /// Serialized Name: IPFamily.IPv4 /// public static ContainerServiceIPFamily IPv4 { get; } = new ContainerServiceIPFamily(IPv4Value); /// - /// IPv6 - /// Serialized Name: IpFamily.IPv6 + /// IPv6 family + /// Serialized Name: IPFamily.IPv6 /// public static ContainerServiceIPFamily IPv6 { get; } = new ContainerServiceIPFamily(IPv6Value); /// Determines if two values are the same. 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/ContainerServiceOSSku.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSSku.cs index 6882e982f370..80d0279cc72d 100644 --- a/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSSku.cs +++ b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ContainerServiceOSSku.cs @@ -12,7 +12,7 @@ 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 { @@ -36,42 +36,42 @@ 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); /// /// 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); /// /// 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); /// /// 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); /// /// 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); /// /// 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); /// /// 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); /// - /// 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. 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/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/ManagedClusterAgentPoolProfile.cs b/sdk/containerservice/Azure.ResourceManager.ContainerService/src/Generated/Models/ManagedClusterAgentPoolProfile.cs index 7ff98fe000f9..e9d30d2f6a59 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 /// /// 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..f7724b1609da 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 /// /// @@ -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/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..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(); 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..be3e1463d5a1 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)); @@ -104,19 +104,19 @@ 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 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/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..8eacba490d8f 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 @@ -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,12 @@ 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; + $.ManagedClusterUpgradeProfileProperties.properties.agentPoolProfiles['readOnly'] = true; + $.AgentPoolUpgradeProfileProperties.properties.upgrades['readOnly'] = true; ``` 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");